I would like to use the symbols
from sympy import *
phi,p,R,n,x1,k,f = symbols('phi,p,R,n,x1,k,f')
to write an abstract function
f = R(phi) - p * n * R(phi)**2 * x1 - k * cos(R(phi)) (1)
and compute its first derivative over phi. Is something like this possible in sympy?
Function composition is available for sympy functions and it seems to work directly in the diff
as an argument, but the line (1) results in
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-17-0771d7cb2d7b> in <module>
----> 1 f = R(phi) - p * n * R(phi)**2 * x1 - l * cos(R(phi))
TypeError: 'Symbol' object is not callable