Thank you Fredrik for the clarification. I agree to use annihilators to store the function inside.
Regarding the numerical computation at a point, SymPy doesn't support numerical methods as of now AFAIK. As mpmath is included in SymPy, we can use `odefun` for numerical computation, but it doesn't support complex points. Is this good for now or do we need to implement a method when the point is complex? On Tuesday, March 8, 2016 at 1:59:43 PM UTC+5:30, Fredrik Johansson wrote: > > > > On Monday, March 7, 2016 at 7:12:44 PM UTC+1, Subham Tibra wrote: >> >> Hi Ondrej, thank you for your response. >> >> ore_algebra in Sage has implemented `annihilator_of_composition` which >> finds annihilator of a holonomic function after application with an >> algebraic function but doesn't support initial conditions. >> >> Do we want to get initial conditions of the resulting function when we >> will implement this operation or just the annihilator? >> >> For instance, we have a holonomic function `sin(x)` defined by diff. eq. >> and we want to apply this with the function z(x) = x**2 - 4 >> >> f(x) = holonomic(diff(diff(f)) + f, f(0) = 0, f'(0) = 1, x) >> g(x) = f(z(x)) = f(x**2 - 4) >> g'(x) = f'(z(x))*z'(x) -(1) >> >> Now, as we have value of f(x) at the point 0, we find the point where >> z(x) is 0 which is x = 2 or -2, if we take x=2 we have g(2) = 0, for >> finding g'(2) we put x = 2 in equation(1) so g'(2) = (1)*(2*2) = 4, and the >> annihilator of g will be obtained by the algorithm which we will be >> implemented. >> >> Is this method decent enough for implementing, if we need the initial >> conditions? >> >> I had some other problems, if you can please take a look at my previous >> post in this same thread that'd be very helpful. >> >> I thought about the API and liked the way gfun does it in maple. I >> thought of something like this, initial condition will be given as a list [ >> f(x0), f'(x0), ... ]. >> >> In []: holonomic(diffeq, x, initial_condition, x0 = 0) >> Out[]:holonomic(diffeq, x, f(x0) = f1, .... ) >> >> Is it possible to provide initial conditions like this way: >> >> In []:holonomic(diffeq, x, f(x0) = f1, f(x1) = f2 .... ) >> Out[]:holonomic(diffeq, x, f(x0) = f1, .... ) >> >> where we can provide initial conditions as f(x0) = x1. We can also >> provide annihilators instead of differential equation as in sage. Which way >> will be more preferred for it's use in SymPy? >> > > The internal data structure should probably be the annihilator. The input > could be given either as a differential equation or an annihilator. If the > given differential equation is inhomogeneous, you need to convert it to > homogeneous form, so a bit of preprocessing is needed anyway. > > Fredrik > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/a905aff8-d696-4904-ada7-e0770130edc8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
