In [1]:
import sympy as sp
sp.init_printing()
In [13]:
x, y, k = sp.symbols('x y k')
f = sp.Function('f')
In [6]:
sp.Integral(f(x), x)
Out[6]:
In [7]:
sp.Derivative(f(x), x)
Out[7]:
In [8]:
sp.diff(f(x),x)
Out[8]:
In [9]:
sp.diff(x**2, x)
Out[9]:
In [14]:
sp.dsolve(sp.diff(f(x)) - k*f(x), f(x))
Out[14]:
In [25]:
sol = sp.dsolve(sp.Derivative(f(x),x) - k*f(x), f(x));
sol
Out[25]:
In [33]:
const_sol = sol.subs(x,0).subs(f(0),1);
const_sol
Out[33]:
In [40]:
sol.subs(const_sol.args[1], const_sol.args[0])
Out[40]:
In [ ]: