Operations on Power Series

The Wolfram Language allows you to perform many operations on power series. In all cases, the Wolfram Language 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 x:

Series[Exp[x],{x,0,4}]

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

%^2

Taking the logarithm gives you the result 2x, but only to order (x^4):

Log[%]

The Wolfram Language 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 (x^10):

Series[Cos[x],{x,0,10}]

This gives a power series that is accurate only to order (x^6):

1/(1-%)

The Wolfram Language also allows you to do calculus with power series.

Here is a power series for tan(x):

Series[Tan[x],{x,0,10}]

Here is its derivative with respect to x:

D[%,x]

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

Integrate[%,x]

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

The 1 is automatically absorbed into the power series:

1+Series[Exp[x],{x,0,4}]

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

%+x^2

If you add (RefLink[Sin, paclet:ref/Sin])[x], the Wolfram Language generates the appropriate power series for (RefLink[Sin, paclet:ref/Sin])[x], and combines it with the power series you have:

%+Sin[x]

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

(a+x) %^2

The Wolfram Language 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 the Wolfram Language to give you anything but a symbolic result.

The Wolfram Language does not know how to apply the function f to a power series, so it just leaves the symbolic result:

f[Series[Exp[x],{x,0,3}]]