# Solving first order differential equation

조회 수: 8(최근 30일)
Rahal Rodrigo 2021년 4월 12일
편집: Abhishek Gupta 2021년 4월 15일
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.
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Rahal Rodrigo 2021년 4월 12일
Thanks for your reply and your suggestion. The assignment says dx/dx (only 1 task has it like so), so I'll assume its a typo and take it as dx/dt. Thanks again.

댓글을 달려면 로그인하십시오.

### 답변(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: -

댓글을 달려면 로그인하십시오.

### 범주

Find more on Ordinary Differential Equations in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by