> No, AFAIK, nothing other than explicit substitution with .subs(). Hello,
there are a few weird results. I'd like to solve this homogenous edo : $tx'=x+\sqrt{x^2+y^2}$. using x=tu sage: t=var('t') sage: x(t) = function('x',t) sage: id(t)=t sage: u=function('u',t) sage: d=diff(u*id,t) apparently, you can't substitute inside diff sage: DE=(t*d==x+sqrt(t**2+x**2)).subs_expr(x==u*id) sage: desolve(DE,[u,t]) arcsinh(u(t)) == c + integrate(abs(t)/t^2, t) sage: assume(t>0) sage: desolve(DE,[u,t]) arcsinh(u(t)) == c + integrate(1/t, t) sage: desolve(DE,[u,t],[1,0]) oups, first problem : Division by 0 #0: ic1(soln=asinh(u) = 'integrate(abs(t)/t^2,t)+%c,xc=t = 0,yc=u = 1) (ode2.mac line 297) -- an error. To debug this try: debugmode(true); sage: sol=desolve(DE,[u,t]).simplify_exp() arcsinh(u(t)) == c + log(t) OK sage: desolve(DE,[u,t],[0,1]).simplify_exp() but the problem reamins the same. Welle, let's make the substitution by hand : sage: solp=sol.subs(c=0) sage: solp arcsinh(u(t)) == log(t) sage: Sol=solve(solp,u)[0] sage: Sol u(t) == sinh(log(t)) sage: x(t)=t*Sol.rhs() sage: x(t) t*sinh(log(t)) here comes our hyp2exp problem... sage: sh(a)=(exp(a)-exp(-a))/2 sage: x(t).substitute_function(sinh,sh).simplify_full() t*sinh(log(t)) argh sage: x t |--> t*sinh(log(t)) x is what we expect. Is it t ? sage: x(a).substitute_function(sinh,sh).simplify_full() a*sinh(log(a)) no...and now, weirder and weirder... sage: a*sinh(log(a)).substitute_function(sinh,sh).simplify_full() 1/2*a*log(a) - 1/2 sage: t*sinh(log(t)).substitute_function(sinh,sh).simplify_full() 1/2*t^2 - 1/2 this 1/2*a*log(a) - 1/2 is a bit unexpected... well, I'm discovering sage but these results look strange. cheers, Guillaume -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org