微分方程作图.ppt
《微分方程作图.ppt》由会员分享,可在线阅读,更多相关《微分方程作图.ppt(29页珍藏版)》请在冰豆网上搜索。
微分方程作图1,微分方程作图,蜀南竹海海中海2019.5.1,微分方程作图2,with(DEtools):
调用微分方程工具with(plots):
调用绘图工具de:
=diff(y(x),x)=2*x*y(x);定义微分方程fxc:
=DEplot(wffc,y(x),x=-2.2,y=-2.2):
画斜率场jfq:
=contourplot(y/exp(x2),x=-2.2,y=-2.2):
画积分曲线display(fxc,jfqx);,用数学软件Maple可以画出微分方程的的积分曲线和方向场的图形。
画图的命令如下:
微分方程作图3,的几何意义:
方向场(斜率场),例如,,微分方程,表示:
曲线y=f(x)在点(x,y)处的切线斜率为2xy,微分方程作图4,with(DEtools):
with(plots):
wffc:
=diff(y(x),x)=2*x*y(x):
dsolve(wffc);fangxiangcang:
=DEplot(wffc,y(x),x=-2.2,y=-2.2,thickness=2):
jifenquxian:
=contourplot(y/exp(x2),x=-2.2,y=-2.2,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,方向场与积分曲线,微分方程作图5,with(DEtools):
with(plots):
wffc:
=diff(y(x),x)=(cos(y(x)-y(x)*cos(x)/(x*sin(y(x)+sin(x)-1):
dsolve(wffc);fangxiangcang:
=DEplot(wffc,y(x),x=0.4*Pi,y=0.4*Pi,thickness=2):
jifenquxian:
=contourplot(y*sin(x)-x*cos(y)-y,x=0.4*Pi,y=0.4*Pi,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,方向场与积分曲线,微分方程作图6,with(DEtools):
with(plots):
wffc:
=diff(y(x),x)=(cos(y(x)-y(x)*cos(x)/(x*sin(y(x)+sin(x)-1):
dsolve(wffc);fangxiangcang:
=DEplot(wffc,y(x),x=-2.2,y=-2.2,thickness=2):
jifenquxian:
=contourplot(y*sin(x)-x*cos(y)-y,x=-2.2,y=-2.2,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,方向场与积分曲线,微分方程作图7,微分方程:
标准形式:
作出微分方程的积分曲线的图形。
微分方程作图8,with(DEtools):
with(plots):
wffc:
=x*diff(y(x),x)+y(x)=sin(x):
dsolve(wffc);fangxiangcang:
=DEplot(wffc,y(x),x=-2.2,y=-2.2,thickness=2):
jifenquxian:
=contourplot(x*y+cos(x),x=-2.2,y=-2.2,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,微分方程作图9,微分方程:
作出微分方程的积分曲线的图形。
原方程化为:
微分方程作图10,with(DEtools):
with(plots):
wffc:
=(x-y(x)3)*diff(y(x),x)+y(x)=0:
dsolve(wffc);fangxiangcang:
=DEplot(wffc,y(x),x=-2.2,y=-2.2,thickness=2):
jifenquxian:
=contourplot(x*y-y4/4,x=-2.2,y=-2.2,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,微分方程作图11,with(DEtools):
DEplot(x-y(x)3)*diff(y(x),x)+y(x)=0,y(x),x=-2.2,y=-2.2,y(0)=1,y(0)=0.3,y(0)=1.5,y(0)=-0.5,y(0)=-1,y(0)=-1.5,linecolor=blue,black,gold,navy,green,maroon,color=violet,stepsize=0.01,scaling=constrained);,微分方程作图12,with(DEtools):
with(plots):
wffc:
=diff(y(x),x)=2*x*y(x):
dsolve(wffc);fangxiangcang:
=DEplot(wffc,y(x),x=-2.2,y=-2.2,thickness=2):
jifenquxian:
=contourplot(y/exp(x2),x=-2.2,y=-2.2,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,方向场与积分曲线,微分方程作图13,with(DEtools):
DEplot(diff(y(x),x)=2*x*y(x),y(x),x=-2.2,y(0)=-1,y(0)=-0.5,y(0)=0,y(0)=0.5,y(0)=1,y(0)=1.5,y=-4.4,linecolor=gold,black,blue,red,brown,green,color=grey,stepsize=0.01,scaling=constrained);,方向场与积分曲线,微分方程作图14,wffc:
=3*x*y(x)2*diff(y(x),x)=x3+y(x)3:
dsolve(wffc,implicit);fangxiangcang:
=DEplot(wffc,y(x),x=-2.2,y=-2.2,thickness=2):
jifenquxian:
=contourplot(x2-2*y3/x,x=-2.2,y=-2.2,contours=20,color=blue,thickness=2):
display(fangxiangcang,jifenquxian);,的方向场及积分曲线,微分方程作图15,方程的通解:
wffc:
=diff(y(x),x$2)-diff(y(x),x)-2*y(x)=0:
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-1.1),_C2=-1.1):
plot(toplot,x=-1.1,y=-10.10,thickness=3,color=red);,通解中的部分曲线,微分方程作图16,wffc:
=diff(y(x),x$2)-diff(y(x),x)-2*y(x)=0:
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-2.2),_C2=-2.2):
plot(toplot,x=-1.1,y=-10.10,thickness=3,color=red);,更多的曲线,方程的通解:
微分方程作图17,求特解:
方程的通解:
特解:
微分方程作图18,通解中的部分曲线和特解曲线,wffc:
=diff(y(x),x$2)+2*diff(y(x),x)+y(x)=0:
tongjie:
=dsolve(wffc,y(x):
tejie:
=dsolve(wffc,y(0)=4,D(y)(0)=-2,y(x):
tongjiequxian:
=seq(seq(rhs(tongjie),_C1=3.5),_C2=0.4):
p1:
=plot(tongjiequxian,x=-2.2,y=0.8,thickness=1,color=red):
p2:
=plot(rhs(tejie),x=-2.2,y=0.8,thickness=5,color=blue):
display(p1,p2,scaling=constrained);,微分方程作图19,wffc:
=diff(y(x),x$2)+2*diff(y(x),x)+y(x)=0:
tongjie:
=dsolve(wffc,y(x):
tejie:
=dsolve(wffc,y(0)=4,D(y)(0)=-2,y(x):
tongjiequxian:
=seq(seq(rhs(tongjie),_C1=2.6),_C2=0.8):
p1:
=plot(tongjiequxian,x=-2.2,y=0.8,color=blue):
p2:
=plot(rhs(tejie),x=-2.2,y=0.8,thickness=5,color=red):
display(p1,p2);,微分方程作图20,方程的通解:
微分方程作图21,通解中的部分曲线,wffc:
=diff(y(x),x$2)-4*diff(y(x),x)+13*y(x)=0:
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-1.1),_C2=-1.1):
plot(toplot,x=-1.1,y=-10.10,thickness=3,color=red);,微分方程作图22,通解中的部分曲线,wffc:
=diff(y(x),x$2)-4*diff(y(x),x)+13*y(x)=0:
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-2.2),_C2=-2.2):
plot(toplot,x=-2.1.5,y=-20.20,thickness=3,color=red);,微分方程作图23,wffc:
=diff(y(x),x$2)-4*diff(y(x),x)+13*y(x)=0:
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-3.3),_C2=-3.3):
plot(toplot,x=-2.1,y=-20.20,thickness=2,color=blue);,微分方程作图24,方程:
方程的通解:
微分方程作图25,wffc:
=diff(y(x),x$2)+y(x)=2*x2-3:
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-3.3),_C2=-3.3):
plot(toplot,x=-2.2,y=-12.6,thickness=2,color=blue);,微分方程作图26,方程:
通解:
微分方程作图27,wffc:
=diff(y(x),x$2)-2*diff(y(x),x)-3*y(x)=exp(-x):
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-3.3),_C2=-3.3):
plot(toplot,x=-2.2,y=-12.12,color=blue,thickness=2);,微分方程作图28,方程:
通解:
微分方程作图29,wffc:
=diff(y(x),x$2)-2*diff(y(x),x)+y(x)=(1+x)*exp(x):
tongjie:
=dsolve(wffc,y(x):
toplot:
=seq(seq(rhs(tongjie),_C1=-3.3),_C2=-3.3):
plot(toplot,x=-4.3,y=-10.10,color=blue);,