分别求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('一阶与二阶微分混合图形');
这是画的图:
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('一阶与二阶微分混合图形');
问题提法有问题!!怎么是微分方程????:mad:
用哪个函数做图?
对于syms x声名后做图用哪个函数?
vBulletin® v3.8.3,版权所有 ©2000-2025,Jelsoft Enterprises Ltd.