登录论坛

查看完整版本 : 请教绘图问题


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
这是画的图:
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('一阶与二阶微分混合图形');

经过前面之后,后面的这样比较好:
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声名后做图用哪个函数?