how to find the numeric solution for differential equations
Show older comments
i need to find the numeric solution for
3y''(t)+6y'(t)+3y=1
y(0)=1
y'(0)=-1/3
i have to use : diff, cond , dsolver, simplify and subs.
9 Comments
Torsten
on 23 May 2021
Look at the "dsolve" documentation. You will find many examples there similar to yours.
Jonathan Jubran
on 23 May 2021
Torsten
on 23 May 2021
Take a look at the example "Solve differential equations with conditions" under
de.mathworks.com/help/symbolic/dsolve.html
It's almost a solution for your case.
Jonathan Jubran
on 23 May 2021
Jonathan Jubran
on 23 May 2021
Torsten
on 23 May 2021
And what is your definition of "numeric solution" ? Are you given some specified points t where you should evaluate y(t) ? Or do you want to plot the solution over a specified interval ?
Jonathan Jubran
on 23 May 2021
Torsten
on 23 May 2021
If you named your solution ysol, then
t = 0:0.01:10;
ysolt = subs(ysol(t))
should give you the corresponding vector of function values.
Answers (0)
Categories
Find more on Symbolic Math Toolbox 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!