OK, thanks a lot. That seems to work well. Just a quick follow
up question. I feel like there must be a better way to get the
result back into Sage variable. Could I be doing something
in a better way ...

sage: from sympy.abc import x
sage: phi = Function("phi")
sage: s = symbols('s')
sage: my_sol = dsolve(Derivative(phi(x),x,x) + s*phi(x), phi(x))
sage: my_sol
C1*sin(x*s**(1/2)) + C2*cos(x*s**(1/2))
sage: type(my_sol)
<class 'sympy.core.add.Add'>
sage: ss_sol = sage_eval(str(my_sol), locals={'x':x,'C1':C1,'C2':C2,'s':s})
sage: ss_sol
C1*sin(sqrt(s)*x) + C2*cos(sqrt(s)*x)
sage: type(ss_sol)
<type 'sage.symbolic.expression.Expression'>


On 07/18/2010 03:24:12 PM, David Joyner wrote:
sage: from sympy import Function, Derivative, dsolve, symbols
sage: from sympy.abc import x
sage: f = Function("f")
sage: k = symbols('k')
sage: dsolve(Derivative(f(x),x,x)-k**2*f(x), f(x))
C1*sin(x*(-k**2)**(1/2)) + C2*cos(x*(-k**2)**(1/2))


On Sun, Jul 18, 2010 at 4:31 PM, Mike Witt <[email protected]> wrote:
> http://trac.sagemath.org/sage_trac/ticket/8931
>
> I'm just curious if anyone can suggest a work-around for this?
> -Mike
>
> --
> 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
>

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






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

Reply via email to