Is there a way to define the antiderivative of a function in order to be evaluated when integrating?
I would like to define a function foo1(x - a) as an inherited class of sympy.core.function which behaves like the heaviside-function: when the argument of the function (x - a) is negative, foo1(x - a) is 0, otherwise 1. When integrating the function, another function foo2(x - a) should be returned which has the property to return 0 as long as (x - a) is negative, and the argument (x - a) otherwise. It is important that the function is not decomposed, i.e. it is not expressed as (x-a)*(sign(x- a) + 1)/2 because the function foo2 has to be integrated several times again (I already got how to solve this problem by defining the diff- method) The question is: Is there any way to define foo2 as the antiderivative of foo1? Overwriting foo1.integrate() does not work as integrate(foo1) does not deliver the result. And by defining the diff-method, I didn't get the result either. Thanks a lot for helping a beginner! -- 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.
