用Matlab解微分方程.docVIP

  • 12
  • 0
  • 约1.17千字
  • 约 2页
  • 2021-11-09 发布于贵州
  • 举报
用Matlab解微分方程 用Matlab解微分方程 PAGE 用Matlab解微分方程 用Matlab软件求解微分方程 1.解析解 (1)一阶微分方程 求的通解:dsolve(Dy=1+y^2,x) 求的通解:dsolve(Dy=1+x^2-y,x) 求的特解:dsolve(Dy=1+y^2,’y(0)=1’,x) (2)高阶微分方程 求解其中,,命令为: dsolve(x^2*D2y+x*Dy+(x^^2)*y=0,y(pi/2)=2,Dy(pi/2)=-2/pi,x) 求的通解,命令为: dsolve(D3y-2*Dy+y-4*x=0,x) 输出为: ans=8+4*x+C1*exp(x)+C2*exp(-1/2*(5^(1/2)+1)*x)+C3*exp(1/2*(5^(1/2)-1)*x) (3)一阶微分方程组 求的通解:[f,g]=dsolve(Df=3*f+4*g,Dg=-4*f+3*g,x) 输出为: f =exp(3*x)*(cos(4*x)*C1+sin(4*x)*C2) g =-exp(3*x)*(sin(4*x)*C1-cos(4*x)*C2) 若再加上初始条件,则求特解: [f,g]=dsolve(Df=3*f+4*g,Dg=-4*f+3*g,f(0)=0,g(0)=1,x) 输出为: f =exp(3*x)*sin(4*x) g =

文档评论(0)

1亿VIP精品文档

相关文档