In Sage 4.3.3 and later
(2*sol).log_simplify().solve(y)
gives
[y(t) == -(e^(2*c + 2*t) + 1)/(e^(2*c + 2*t) - 1)]
You may want to rename constant:
C=var('C')
SOL=(2*sol).log_simplify().solve(y)[0]
SOL.subs(c=1/2*ln(C)).simplify_full()
y(t) == -(C*e^(2*t) + 1)/(C*e^(2*t) - 1)
Robert M.
On 8 bře, 07:53, fromken <[email protected]> wrote:
> Hi there,
>
> I've got a problem with expressing a solution of ODE as follow.
>
> t = var('t')
> y = function('y', t)
> eqn = diff(y, t) - y^2 +1
> sol = desolve(eqn, dvar = y, ivar = t, contrib_ode=True)
> sol.show()
>
> The above expression resulted in 1/2*log(y(t)-1) - 1/2*log(y(t)+1) = c
> + t.
> However, I want more simpler form of the solution like y(t) = (exp(2*t
> +2) + 1) / (1-exp(2*t+2)).
> How can I get the solution?
> Thanks in advance.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org