Hi Peter,

On 2018-12-30, Peter Luschny <peter.lusc...@gmail.com> wrote:
> With Sage 8.4:
>     LargeSchroeder = SR((1 - x - sqrt(1 - 6*x + x^2))/(2*x))

Putting "SR" around the expression probably isn't needed, as by default
x is a symbolic variable (of course this doesn't hold if you have
defined x to be something else).

>     print(LargeSchroeder.taylor(x, 0, 6).list())
>     print(LargeSchroeder.series(x, 6).list())

Why "print" (assuming that you are in an interactive session)?

> Bug or feature? Moreover
>
>     taylor? .. gives hints
>     series? .. Object `series` not found.

It seems that you are confusing functions and methods. If you do
LargeSchroeder.taylor? and LargeSchroeder.series?, you'll see
documentation of both.

Explanation: In addition to "taylor" being a method of symbolic
expressions, it also is a function defined in Sage's global name
space; this is not the case for "series", that's why "series?" doesn't
give you an answer.

Now for the differences of both methods: Unfortunately, the documentation of
LargeSchroeder.series? isn't very clear. Apparently .taylor(x,0,6) returns a
polynomial (or to be precise: A symbolic expression that looks like a
polynomial but is not implemented as an element of a polynomial ring, which
from my experience is a difference that is not sufficiently appreciated by
most calculus students using computer algebra systems), whereas
LargeSchroeder.series(x,6) returns a Laurent series, i.e., it contains
negative exponents:

  sage: LargeSchroeder.series(x,6)
  (-1/2)*x^(-1) + 3/2 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + Order(x^6)
  sage: LargeSchroeder.taylor(x,0,6)
  1806*x^6 + 394*x^5 + 90*x^4 + 22*x^3 + 6*x^2 + 2*x + 1

It surprises me that .series(x,6) has a pole (after all, LargeSchroeder's 
discontinuity in x=0 seems removable), so perhaps it's a bug, but
perhaps it's a feature after all --- I cannot tell from the documentation
if it is intended or not.

Best regards,
Simon


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to