Hi Chris,

This is a very old issue, #879. I tried to tackle it once, a long time
ago, removing the non-implemented raise and chasing the problems that
appear futher down the series logic (it gets into some infinite
loops), but the series code is quite complicated and I never got it to
work. I think to really solve it would require some serious clean up
of the series logic. I don't think it is really needed to solve first
#1620 and #1688 as stated in the issue dependencies.

The last stuff I tried is in my branch 879
(https://github.com/renatocoutinho/sympy/commits/879).

Best regards,
Renato

On Sat, Mar 9, 2013 at 4:19 PM, smichr <smi...@gmail.com> wrote:
> f(x) = f(x0) + (x-x0)*f(x).diff(x)|x=x0 + ....
>
> Is there any reason not to allow that rhs as the return for
>>>> f(x).series(x)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "sympy\core\expr.py", line 2341, in series
>     s = self.subs(x, rep).series(x, x0=0, n=n, dir='+')
>   File "sympy\core\expr.py", line 2354, in series
>     s1 = self._eval_nseries(x, n=n, logx=None)
>   File "sympy\core\function.py", line 447, in _eval_nseries
>     supported.'''))
> NotImplementedError:
> series for user-defined functions are not supported.
>
> Maybe it could return something like this:
>
>>>> def fseries(eq, x0, n):
> ...   return Add(*[(x - x0)**i*Subs(eq.diff(x, i), x, x0) for i in range(n +
> 1)])
>
>>>> pprint(fseries(f(x), 1, 2).doit())
>          /  2      \|
>        2 | d       ||              /d       \|
> (x - 1) *|---(f(x))||    + (x - 1)*|--(f(x))||    + f(1)
>          |  2      ||              \dx      /|x=1
>          \dx       /|x=1
>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to