> > > 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 > > When holding a hammer, everything looks like a...cse problem: any reason not to just define your function, take the derivative, and let cse sift things out for you?
>>> f1=x+y >>> f2=exp(x+y) >>> f3=f1*f2 >>> f3.diff(x) (x + y)*exp(x + y) + exp(x + y) >>> cse(_) ([(x0, x + y)], [(x0 + 1)*exp(x0)]) -- 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.
