This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Wolfram Research, Inc.

Advanced Topic: The Representation of Power SeriesAdvanced Topic: Composition and Inversion of Power Series

3.6.3 Operations on Power Series

Mathematica allows you to perform many operations on power series. In all cases, Mathematica gives results only to as many terms as can be justified from the accuracy of your input.

Here is a power series accurate to fourth order in .

In[1]:= Series[ Exp[x], {x, 0, 4} ]


When you square the power series, you get another power series, also accurate to fourth order.

In[2]:= %^2


Taking the logarithm gives you the result 2x, but only to order .

In[3]:= Log[%]


Mathematica keeps track of the orders of power series in much the same way as it keeps track of the precision of approximate real numbers. Just as with numerical calculations, there are operations on power series which can increase, or decrease, the precision (or order) of your results.

Here is a power series accurate to order .

In[4]:= Series[ Cos[x], {x, 0, 10} ]


This gives a power series that is accurate only to order .

In[5]:= 1 / (1 - %)


Mathematica also allows you to do calculus with power series.

Here is a power series for .

In[6]:= Series[Tan[x], {x, 0, 10}]


Here is its derivative with respect to x.

In[7]:= D[%, x]


Integrating with respect to x gives back the original power series.

In[8]:= Integrate[%, x]


When you perform an operation that involves both a normal expression and a power series, Mathematica "absorbs" the normal expression into the power series whenever possible.

The 1 is automatically absorbed into the power series.

In[9]:= 1 + Series[Exp[x], {x, 0, 4}]


The x^2 is also absorbed into the power series.

In[10]:= % + x^2


If you add Sin[x], Mathematica generates the appropriate power series for Sin[x], and combines it with the power series you have.

In[11]:= % + Sin[x]


Mathematica also absorbs expressions that multiply power series. The symbol a is assumed to be independent of x.

In[12]:= (a + x) %^2


Mathematica knows how to apply a wide variety of functions to power series. However, if you apply an arbitrary function to a power series, it is impossible for Mathematica to give you anything but a symbolic result.

Mathematica does not know how to apply the function f to a power series, so it just leaves the symbolic result.

In[13]:= f[ Series[ Exp[x], {x, 0, 3} ] ]


Advanced Topic: The Representation of Power SeriesAdvanced Topic: Composition and Inversion of Power Series