Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

assign function to an existing function

Hi,

Consider the following code:

sage.var('R')

rho = sage.function('rho')(R)

r = rho(R=R).function(R)

Is there a way to assign some function to to rho (e.g., as the solution of a differential equation, i.e., rho = desolve(…)) such that r is modified?

Thanks!

Martin

assign function to an existing function

Hi,

Consider the following code:

sage.var('R')

rho = sage.function('rho')(R)

r = rho(R=R).function(R)

Is there a way to assign some function to to rho (e.g., as the solution of a differential equation, i.e., rho = desolve(…)) such that r is modified?

Thanks!

Martin

assign function to an existing function

Hi,

Consider the following code:

sage.var('R')

rho = sage.function('rho')(R)

r = rho(R=R).function(R)

Is there a way to assign some function to rho (e.g., as the solution of a differential equation, i.e., rho = desolve(…)) such that r is modified?modified? For instance, if I do:

y = sage.function('y')(R)

rho = sage.desolve(sage.diff(y,R) - y(R), dvar=y, ivar=R, ics=[0,1]).function(R) -> R |--> e^R

Then I get:

r(0) -> rho(0)

rho(0) -> 1

So rho is of course modified, but not r.

Thanks!

Martin