Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Defining constants after solving ODE/PDE


Solving the differential equation $f'(x) = f(x)$ the answer leads to $f(x) = ce^x$ where $c$ is a constant. How can I generically solve this ODE in SAGE and define $c$ afterwards (I don't want to use ics)?

Consider this script

x = var('x')
f = function('f',x)
f = desolve(diff(f,x) == f(x), f, ival=x)
print str(f(x))
>> ce^x
#I want to define c afterwards

A method I found:

#continue the previous prompt
f(x,c) = f(x)
h(x) = f(x,10)

Is there something else that I can do?