Dear All
I would need to take the derivative of very long functions (and at the
end call fcode()), so
eg:
f1(x)=...
f2(x)=...
f3(x)=...+f2(x)
f(x)=f1(x)*f3(x)
and I target df/dx. The sympy code would look like
x = symbols('x')
f1=...
f2=...
f3=...+f2
f=f1*f3
fcode(diff(f,x))
and this will produce a long expression.
Then is it possible to tell sympy to keep some of the intermediate
function? eg
df/dx = df1/dx * f3 + ...
and not explicitly substitute f3 with its expression, so that at the
end my fortran code would look like
f1=
f2=...
f3=...+f2
df1dx=...
df2dx=...
df3dx=...+df2dx
dfdx=df1dx*f3+f1*df3dx
Many thanks
V
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
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/sympy?hl=en.