I need help using dsolve, when using dsolve in matlab 2015b I get the returned an answer with solve.

1 view (last 30 days)
input
syms y t
dsolve('Dy == (exp(y))/((t*exp(y))-sin(y))')
return:
ans =
solve(cos(y) + 2*sin(y) - 5*t*exp(y) + 5*C5*exp(2*y) == 0, y)

Answers (1)

Walter Roberson
Walter Roberson on 12 Oct 2015
When you pass a string to dsolve, your string needs to be in MuPAD syntax, which uses = for comparison instead of == .
I recommend providing dsolve with all of the hints that you can:
syms y(t)
dsolve( diff(y(t), t) == exp(y(t))/(t*exp(y(t))-sin(y(t))) )
  3 Comments
Torsten
Torsten on 12 Oct 2015
Given t, solve
cos(y) + 2*sin(y) - 5*t*exp(y) + 5*C4*exp(2*y) = 0
for y and you get your solution function y(t).
This can by done by fzero, e.g.
Best wishes
Torsten.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!