MATLAB: I’m trying to use dsolve to solve this differential equation, but it does not work

differential equationsdsolveimplicit

I'm trying to solve this differential equation using dsolve in matlab, so this is what Im trying to run:
eqn = 'Dy=-exp(y)/(t*exp(y)-sin(y))';
dsolve(eqn,'t')
I know that there is no explicit solution to it, but I was taught that matlab should return a implicit solution. However it doesn't. I've tried it on different versions of matlab, but still no luck. Can someone please help me out?
**this is the error it returns:
??? Error using ==> mupadmex
Error in MuPAD command: wrong 2nd argument [normal]
Error in ==> sym.sym>sym.mupadmexnout at 2003
out = mupadmex(fcn,args{:});
Error in ==> dsolve>mupadDsolve at 190
[var_list,R] = mupadmexnout('mllib::dsolve',sys,x,ignor
Error in ==> dsolve at 97
[R,vars] = mupadDsolve(ignoreConstraints,varargin{1

Best Answer

Do you want to solve for y(t) rather than for t ? dsolve() really isn't suitable for solving for variables.