Solving first order differential equation
2 次查看(过去 30 天)
显示 更早的评论
How is it possible to solve the following differential eqiuation using syms and dsolve? I'm quite confused on how to solve dx/dx on matlab. The condition is x(0)=4. Any help would be greatly appreciated.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/580951/image.png)
2 个评论
James Tursa
2021-4-12
编辑:James Tursa
2021-4-12
Double check your assignment. That is probably supposed to be dx/dt, not dx/dx.
回答(1 个)
Abhishek Gupta
2021-4-15
编辑:Abhishek Gupta
2021-4-15
Hi,
You can solve the given ODE as follows: -
syms x(t);
ode = 2*diff(x,t) + 7*x == t;
cond = x(0) == 4;
xSol(t) = dsolve(ode,cond);
For more details, check out the following documentation link: -
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!