Solving first order differential equation
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
James Tursa
le 12 Avr 2021
Modifié(e) : James Tursa
le 12 Avr 2021
Double check your assignment. That is probably supposed to be dx/dt, not dx/dx.
Réponses (1)
Abhishek Gupta
le 15 Avr 2021
Modifié(e) : Abhishek Gupta
le 15 Avr 2021
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 commentaires
Voir également
Catégories
En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!