Solving first order differential equation
조회 수: 1 (최근 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에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!