My guess is that the paper is looking for the full series, as a
summation. If that's the case, then it isn't implemented.

If it really is looking for an expansion up to some number of terms,
just take (sin(x).series()/cos(x).series()).series() ==
tan(x).series().  Note that unlike Mathematica, SymPy does not
automatically re-compute the series evaluation when you combine series
expansions with other expressions---you need to call series() again.

Aaron Meurer

On Mon, Oct 21, 2013 at 1:21 PM, Pablo Puente <[email protected]> wrote:
> Hi,
>
> I understand that series() supports unevaluated Taylor series setting
> n=None.
>
> I am writing a Wester test case X3 that probably needs unevaluated Taylor
> series; series(sin(x))/series(cos(x))==series(tan(x)) . In Mathematica
> syntax:
> In[10]:= (* Note: sin(x) = x - x^3/6 + x^5/120 - x^7/5040 + O(x^9)
>          cos(x) = 1 - x^2/2 + x^4/24 - x^6/720 + O(x^8)
>          tan(x) = x + x^3/3 + 2/15 x^5 + 17/315 x^7 + O(x^9) *)
> 0. Second
>
> In[11]:= tsin = Series[Sin[x], {x, 0, 7}]
> 0. Second
>
>               3    5      7
>              x    x      x         8
> Out[11]= x - -- + --- - ---- + O[x]
>              6    120   5040
>
> In[12]:= tcos = Series[Cos[x], {x, 0, 7}]
> 0. Second
>
>               2    4    6
>              x    x    x         8
> Out[12]= 1 - -- + -- - --- + O[x]
>              2    24   720
> In[13]:= (* Note that additional terms will be computed as needed *)
> 0. Second
>
> In[14]:= tsin/tcos
> 0.01 Second
>
>               3      5       7
>              x    2 x    17 x        8
> Out[14]= x + -- + ---- + ----- + O[x]
>              3     15     315
>
> In[15]:= Series[Tan[x], {x, 0, 7}]
> 0.01 Second
>
>               3      5       7
>              x    2 x    17 x        8
> Out[15]= x + -- + ---- + ----- + O[x]
>              3     15     315
>
> if I try with Sympy  series(sin(x), n=None)/series(cos(x), n=None)) I get
> TypeError: unsupported operand type(s) for /: 'generator' and 'generator'.
>
> Is i use  series(sin(x))/series(cos(x)) it returns (x - x**3/6 + x**5/120 +
> O(x**6))/(1 - x**2/2 + x**4/24 + O(x**6))
>
> Is the unevaluated Talyor series support incomplete or is there any other
> way SymPy can implement this test case?
>
> Thanks,
> Pablo Puente
>
> --
> 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 http://groups.google.com/group/sympy.
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to