用matlab求解 求以下微分方程 1.求y'=x的通解.2.求y''=y'+1的通解.3.求y''=y'+1满足初始条件y(0)=1,Dy(0)=0的特解.
问题描述:
用matlab求解 求以下微分方程 1.求y'=x的通解.2.求y''=y'+1的通解.
3.求y''=y'+1满足初始条件y(0)=1,Dy(0)=0的特解.
答
命令行中输入:
y=dsolve('Dy=x','x')
结果:1/2*x^2+C1
y=dsolve('D2y=Dy+1','x')
结果exp(x)*C1-x+C2
y=dsolve('D2y=Dy+1','Dy(0)=0','y(0)=1','x')
结果exp(x)-x
答
y=dsolve('Dy=x','x')
y=dsolve('D2y=Dy+1','x')
y=dsolve('D2y=Dy+1','Dy(0)=0','y(0)=1','x')