Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Compact output of solution of DE

When I'm trying to solve DE:

t = var('t')
y = function('y', t)
de = t*(y^2)*diff(y,t) + y^3 == 1
sol = desolve(de,[y,t], [1,2])

the output is pretty ugly:

-1/3*log(y(t)^2 + y(t) + 1) - 1/3*log(y(t) - 1) == -1/3*log(7) + log(t)

When I'm solving this in matlab:

clear;
syms y(t)
y(t) =  dsolve(t*(y^2)*diff(y,t) + y^3 == 1, y(1) ==2)

The output looks much better:

y(t) = (exp(log(7) - 3*log(t)) + 1)^(1/3)

Can I see output in sage looking similiar to this from matlab? Simplify(sol) dosen't work. Maybe I've made mistake somewhere, but I can't determine without knowing the form y(t) from sage.

And btw, typing:

t*(y^2)*y'+ y^3 = 1, y(1) = 2

into wolframalpha.com results yet another solution. I'm lost...