A Convergent Series for
|x| = Abs[x]

by
K. D.  Stroyan
University of Iowa

copyright 1997 by Academic Press, Inc. - All rights reserved.

Special Mathematica Functions used in this NoteBook

Off[General::spell1];
Needs["Graphics`Colors`"]
seriesGraphs[f_, series_, radius_, numterms_Integer, opns___Rule] :=
	Module[ {functions, graylevels, i, j,n,x,terms},
	Do[
	functions = Table[series[x,n], {n, 0, i}] ;
	AppendTo[functions, f[x]] ;
	graylevels = Table[{GrayLevel[j]}, {j, 6/10, 0, -6/(10 i)}] ; 
	graylevels=AppendTo[graylevels,{AbsoluteThickness[2],Red}];
	Plot[Release[functions], {x, -radius, radius},
		PlotStyle -> graylevels,PlotLabel ->i"terms",
		opns,AspectRatio->Automatic];
	,{i, 1, numterms}];
	Do[
	Plot[Release[{f[x], series[x,n]}],{x, -radius, radius},
		PlotLabel ->n"terms ", opns,
		PlotStyle -> {{AbsoluteThickness[2],Red},{GrayLevel[0]}},
		AspectRatio->Automatic];
	,{n, 1, numterms}];
	];

Needs["Graphics`Colors`"]
powerGraphs[f_,  radius_, numterms_, opns___Rule] :=
	Module[ {functions, graylevels, i, j,n,x,terms},
	Do[
	functions = Table[Normal[Series[f[x],{x,0,n}]], {n, 0, i}] ;
	AppendTo[functions, f[x]] ;
	graylevels = Table[{GrayLevel[j]}, {j, 6/10, 0, -6/(10 i)}] ; 
	graylevels=AppendTo[graylevels,{AbsoluteThickness[2],Red}];
	Plot[Release[functions], {x, -radius, radius},
		PlotStyle -> graylevels, PlotLabel ->i"terms",
		opns,AspectRatio->Automatic];
	,{i, 1, numterms}];
	Do[
	Plot[Release[{Normal[Series[f[x],{x,0,n}]],f[x]}],{x, -radius, radius},
		PlotLabel ->n"terms ", opns, 
		PlotStyle -> {{GrayLevel[0]},{AbsoluteThickness[2],Red}},AspectRatio->Automatic];
	,{n, 1, numterms}];
	];
On[General::spell1];

Notebook Overview

Power series are not just series made from powers of x.

References to the Text

This NoteBook  goes with Exercise 26.1.5.

The Series Converging to |x|:

The  y = | x |  Series (a convergent NON-power series of powers)

The absolute value function has a graph in the shape of the letter "V".  There is no tangent line at the kink.  We can approximate this with a series using the simple fact that

| t |  = (Sqrt[(t^2)])

and the binomial series (see above),

(Sqrt[1 + x]) = 
        1 + (1/2) x + (1/2) ((1/2) - 1) (x^2) + 
          ⋯

substituting  x = (t^2) - 1, so

| t | =(Sqrt[(t^2)]) = 
        (Sqrt[1 + ((t^2) - 1)]) = Binomial Series[x = (t^2) - 1]

This example shows that we need some theory in order to differentiate series term-by-term.

Graphical Approximation

Clear[f, x, series, n]f[x_] := Abs[x]series[x_, n_] := 
      (∑_(k = 0)^n) Binomial[(1/2), k] ((((x^2) - 1))^k)radius = 2; numterms = 10; seriesGraphs[f, series, radius, numterms, 
      PlotRange -> {-0.1, 3}];

Term-by-term Differentiation

dSeries[x_, n_] := Evaluate[D[series[x, n], x]]dSeries[x, n]dSeries[x, 1]dSeries[x, 2]dSeries[x, 3]dSeries[x, 4]dSeries[x, 5]

Fine, we differentiated the series.  Does it still converge?

f[x_] := 0seriesGraphs[f, dSeries, 2, 10, PlotRange -> {-2, 2}];

Wow, it does!  It certainly converges at  x = 0, since it is always equal to  0  when  x = 0.  Unfortunately, zero is not the derivative of the sum, but only the sum of the derivatives.

dSeries is NOT a power series

Let's take another look at some terms of the differentiated series, this time expanding in increasing powers of  x.  Notice that each new term in the series affects the coefficients of lower powers of x.  This is why the theorem on differnetiating power series is NOT contradicted by the fact that dSeries does NOT converge to its derivative at  x = 0.

TableForm[Table[Expand[dSeries[x, n], x], {n, 1, 5}]]

Exercises

Exercise 26.1.5

a)  Since dSeries[x,n] = d(BinomialSeries[1/2][ y,n ])/dx with y = (x^2) - 1 for another convergent series, use the chain rule to prove symbolically that dSeries converges at certain x's.  Which x's?

b) dSeries[x,n] converges, but it does not converge to the derivative of Abs[x] = |x| when  x = 0.  Why?