How to get symbolic output notation, exp(1)=e?
6 views (last 30 days)
Show older comments
Anders Nordlöf
on 14 Nov 2020
Commented: Anders Nordlöf
on 14 Nov 2020
Hi!
Im trying to using symbolic ODE-solver
syms u(x);
sympref('FloatingPointOutput',false);
Du=diff(u);
ode=diff(u,x,2)==4*u
cond1=u(0)==0
cond2=Du(1)==exp(2)-exp(-2)
conds=[cond1 cond2];
uSol(x)=dsolve(ode,conds)
uSol = simplify(uSol)
But the output comes in the form of

which I would prefer to be presented in the form of

Any suggestions how to do this?
0 Comments
Accepted Answer
Walter Roberson
on 14 Nov 2020
Edited: Walter Roberson
on 14 Nov 2020
syms u(x);
sympref('FloatingPointOutput',false);
Du=diff(u);
ode=diff(u,x,2)==4*u
cond1=u(0)==0
cond2=Du(1)==exp(sym(2))-exp(sym(-2))
conds=[cond1 cond2];
uSol(x)=dsolve(ode,conds)
uSol = simplify(uSol)
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

