Dsolve solves differential equation with a very long output, is something wrong?
3 views (last 30 days)
Show older comments
Hi Matlab Community,
I am currently running version R2022a and I am trying to solve the following system of differential equations using dsolve by the following way: 

The output (see image below) of the struct is so long that I cannot see it all entirely, seeing as the three dots in the end indicate that it continues. Have I done something wrong from the code or is there any way to expand/simplify so i can see the entire fields? I tried closing down any windows in matlab and still cannot see it all.

Thank you.
0 Comments
Accepted Answer
Torsten
on 19 Apr 2023
Edited: Torsten
on 19 Apr 2023
syms lambda mu real positive
syms t p1(t) p2(t) p3(t)
eqn1 = diff(p1,t) == -5*lambda*p1 + mu*p2;
eqn2 = diff(p2,t) == 5*lambda*p1 -(4*lambda+mu)*p2;
eqn3 = diff(p3,t) == 4*lambda*p2;
cond1 = p1(0)==1;
cond2 = p2(0)==0;
cond3 = p3(0)==0;
sol = dsolve([eqn1,eqn2,eqn3],[cond1,cond2,cond3]);
simplify(sol.p1)
simplify(sol.p2)
simplify(sol.p3)
simplify(sol.p1+sol.p2+sol.p3)
More Answers (0)
See Also
Categories
Find more on Assumptions 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!

