Compact output of solution of DE

asked 2015-03-24 21:51:52 +0100

Photon gravatar image

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...

edit retag flag offensive close merge delete

Comments

This is the standard output form from Maxima (the engine that does such symbolics inside Sage). Various combos using log_simplify('all') and expand_* didn't help, though...

kcrisman gravatar imagekcrisman ( 2015-03-25 02:05:13 +0100 )edit