#16197: provide missing function expansions of power series
----------------------------------------------+------------------------
       Reporter:  rws                         |        Owner:
           Type:  enhancement                 |       Status:  new
       Priority:  major                       |    Milestone:  sage-6.2
      Component:  calculus                    |   Resolution:
       Keywords:  function, series expansion  |    Merged in:
        Authors:                              |    Reviewers:
Report Upstream:  N/A                         |  Work issues:
         Branch:                              |       Commit:
   Dependencies:                              |     Stopgaps:
----------------------------------------------+------------------------

Old description:

> Not the same as `SR.taylor()`.
> {{{
> sage: R.<x> = PowerSeriesRing(ZZ)
> sage: sqrt(1-4*x^2)
> 1 - 2*x^2 - 2*x^4 - 4*x^6 - 10*x^8 - 28*x^10 - 84*x^12 - 264*x^14 -
> 858*x^16 - 2860*x^18 + O(x^20)
> sage: sin(1+4*x^2)
> ...
> TypeError: cannot coerce arguments: no canonical coercion from Power
> Series Ring in x over Integer Ring to Symbolic Ring
> sage: var('X')
> X
> sage: ex=sin(1+4*X^2)
> sage: ex.series()
> ...
> TypeError: series() takes exactly 2 positional arguments (0 given)
> }}}
> What is missing and can be had from Pari:
> * `acos`, `acosh`, `agm`, `asin`, `asinh`, `atan`, `atanh`, `cos`,
> `cosh`, `cotanh`, `dilog`, `gamma`, `intformal`, `lngamma`, `psi`, `sin`,
> `sinh`, `tan`, `tanh`
> For example:
> {{{
> ? atan(4*x^2+1)
> %1 = 0.78539816339744830961566084581987572105 + 2*x^2 - 4*x^4 + 16/3*x^6
> - 128/5*x^10 + 256/3*x^12 - 1024/7*x^14 + O(x^16)
> }}}

New description:

 Some functions do not support rings/power-series*:
 {{{
 sage: R.<x> = PowerSeriesRing(ZZ)
 sage: sqrt(1-4*x^2)
 1 - 2*x^2 - 2*x^4 - 4*x^6 - 10*x^8 - 28*x^10 - 84*x^12 - 264*x^14 -
 858*x^16 - 2860*x^18 + O(x^20)
 sage: sin(1+4*x^2)
 ...
 TypeError: cannot coerce arguments: no canonical coercion from Power
 Series Ring in x over Integer Ring to Symbolic Ring
 }}}
 What is missing:
 * `acos`, `acosh`, `asin`, `asinh`, `atan`, `atanh`, `cos`, `cosh`,
 `cotanh`, `dilog`, `gamma`, `intformal`, `lngamma`, `psi`, `sin`, `sinh`,
 `tan`, `tanh`

--

Comment (by rws):

 I wrote earlier:
 > The rest of the ticket concerns possibly missing functions and I will
 move this to another ticket.
 Nothing missing there except the a.g.m., fortunately.

 Replying to [comment:3 kcrisman]:
 > Hmm, that's an interesting suggestion.  One could imagine it's a bug the
 other way around, but I have no vested interest in this - I think a
 default for either one could be useful, in principle, and (importantly)
 wouldn't be backward-incompatible.   But what would the default be?  It's
 hard to imagine one non-arbitrary... hmm.
 This is now #16201
 > What do Mathematica and/or Maple and/or Magma do with this?  If there is
 a standard one could use that.
 If I ask for "cosine power series" in Wolfram Alpha I get
 `1-x^2/2+x^4/24-x^6/720+O(x^7)`

--
Ticket URL: <http://trac.sagemath.org/ticket/16197#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to