MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   数学 (https://www.labfans.com/bbs/forumdisplay.php?f=15)
-   -   请教绘图问题 (https://www.labfans.com/bbs/showthread.php?t=8440)

smszlhm 2009-05-18 19:57

请教绘图问题
 
分别求y(x)=ln(x^3+x+3)的一阶微分方程和二阶微分方程,并且分别画出一阶微分方程和二阶微的图形?求求明天要交作业了!

cfchenchen 2009-06-22 14:46

回复: 请教绘图问题
 
syms x
y=log(x^3+x+3);
y1=diff(y)
y2=diff(y1)


这是分别求一阶与二阶微分的

cfchenchen 2009-06-22 14:47

回复: 请教绘图问题
 
结果:
y1 =

(3*x^2+1)/(x^3+x+3)


y2 =

6*x/(x^3+x+3)-(3*x^2+1)^2/(x^3+x+3)^2

cfchenchen 2009-06-22 14:48

回复: 请教绘图问题
 
这是画的图:
x=linspace(-0.5,110,100);
y1 =(3*x.^2+1)./(x.^3+x+3);
y2 =6*x./(x.^3+x+3)-(3*x.^2+1).^2./(x.^3+x+3).^2;
subplot(2,2,1);plot(x,y1);title('一阶微分图形');
subplot(2,2,2);plot(x,y2);title('二阶微分图形');
subplot(2,2,3);plot(x,y1,x,y2);title('一阶与二阶微分混合图形');

kayneo 2009-11-14 15:58

回复: 请教绘图问题
 
[QUOTE=cfchenchen;29692]这是画的图:
x=linspace(-0.5,110,100);
y1 =(3*x.^2+1)./(x.^3+x+3);
y2 =6*x./(x.^3+x+3)-(3*x.^2+1).^2./(x.^3+x+3).^2;
subplot(2,2,1);plot(x,y1);title('一阶微分图形');
subplot(2,2,2);plot(x,y2);title('二阶微分图形');
subplot(2,2,3);plot(x,y1,x,y2);title('一阶与二阶微分混合图形');[/QUOTE]

经过前面之后,后面的这样比较好:
a=linspace(-0.5,110,100);
y1=subs(y1,x,a);
y2=subs(y2,x,a);

subplot(2,2,1);plot(a,y1);title('一阶微分图形');
subplot(2,2,2);plot(a,y2);title('二阶微分图形');
subplot(2,2,3);plot(a',[y1',y2']);title('一阶与二阶微分混合图形');;title('一阶与二阶微分混合图形');

ast286 2009-12-22 09:49

回复: 请教绘图问题
 
问题提法有问题!!怎么是微分方程????:mad:

mutou1991 2010-03-07 15:56

回复: 请教绘图问题
 
这个不是很难的 不过这个不用限制定义域

adolph 2010-03-10 20:46

回复: 请教绘图问题
 
用哪个函数做图?
对于syms x声名后做图用哪个函数?


所有时间均为北京时间。现在的时间是 20:00

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.