Solving a differential equation?

2 views (last 30 days)
Anjana
Anjana on 6 Mar 2015
Answered: Torsten on 6 Mar 2015
I am trying to solve the equation exp(y) + (t*exp(y) - sin(y))y' = 0 using dsolve and make a contour plot and what I have is
syms y t;
sol = dsolve('exp(y) + (t*exp(y) - sin(y))*Dy = 0')
This keeps giving me the error Warning: Explicit solution could not be found; implicit solution returned.
How do I fix this?

Answers (1)

Torsten
Torsten on 6 Mar 2015
The message is not an error message.
It's just an information that the solution to your differential equation can not be given in explicit form
y(t)=something.
If you want to make a contour plot, specify an initial condition and try "ezplot".
If this does not work, use a numerical ODE integrator (e.g. ODE45).
Best wishes
Torsten.

Community Treasure Hunt

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

Start Hunting!