[英]Octave to solve differential equations
How do I solve the differential equation y'+y=t with y(0)=24?我如何用 y(0)=24 求解微分方程 y'+y=t?
Do I need to defined the differential equation with a file in the form .m?我需要用 .m 格式的文件定义微分方程吗?
dy/dt + y = t
Multiply integrating factor e^t
on both sides.在两侧乘以积分因子
e^t
。 Then,然后,
d/dt [(e^t)y] = te^t
y = t-1+ce^(-t)
Because, y(0)=24
then c=25
因为,
y(0)=24
那么c=25
y = t-1+25e^(-t)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.