12.07.2015 Views

3.6.1 Making Power Series Expansions - Wolfram Research

3.6.1 Making Power Series Expansions - Wolfram Research

3.6.1 Making Power Series Expansions - Wolfram Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.6 <strong>Power</strong> <strong>Series</strong> and Limits 5073.6 <strong>Power</strong> <strong>Series</strong> and Limits<strong>3.6.1</strong> <strong>Making</strong> <strong>Power</strong> <strong>Series</strong> <strong>Expansions</strong><strong>Series</strong>[expr, {x, x 0 , n}]nd the power series expansion of expr about the pointx = x 0 to order at most (x ; x 0 ) n<strong>Series</strong>[expr, {x, x 0 , n x }, {y, y 0 , n y }]nd series expansions with respect to y then xFunctions for creating power series.Here is the power series expansion forexp(x) about the point x = 0 to order x 4 .In[1]:= <strong>Series</strong>[ Exp[x], {x, 0, 4} ]2 3 4x x x 5Out[1]= 1 + x + -- + -- + -- + O[x]2 6 24Here is the series expansion of exp(x)about the point x =1.In[2]:= <strong>Series</strong>[ Exp[x], {x, 1, 4} ]2 3E (-1 + x) E (-1 + x)Out[2]= E + E (-1 + x) + ------------------ + -------------------- +2 64E (-1 + x) 5----------------- + O[-1 + x]24If it does not know the series expansion ofa particular function, it writes the resultsymbolically in terms of derivatives.In[3]:= <strong>Series</strong>[ f[x], {x, 0, 3} ]2 (3) 3f''[0] x f [0] x 4Out[3]= f[0] + f'[0] x + -------------- + ----------------- + O[x]2 6In mathematical terms, <strong>Series</strong> can be viewed as a way of constructing Taylorseries for functions.The standard formula for the Taylor series expansion P about the point x = x 0 of afunction g(x) with k th derivative g (k) (x) isg(x)=k=0 g(k) (x 0 ) (x;x 0) k. Wheneverk!this formula applies, it gives the same results as <strong>Series</strong>. (For common functions,<strong>Series</strong> nevertheless internally uses somewhat more ecient algorithms.)<strong>Series</strong> can also generate some power series that involve fractional and negativepowers, not directly covered by the standard Taylor series formula.Web sample page from The Mathematica Book, First Edition, by Stephen <strong>Wolfram</strong>, published by Addison-Wesley PublishingCompany (hardcover ISBN 0-201-19334-5; softcover ISBN 0-201-19330-2). To order Mathematica or this book contact <strong>Wolfram</strong><strong>Research</strong>: info@wolfram.com; http://www.wolfram.com/; 1-800-441-6284.c 1988 <strong>Wolfram</strong> <strong>Research</strong>, Inc. Permission is hereby granted for web users to make one paper copy of this page for theirpersonal use. Further reproduction, or any copying of machine-readable files (including this one) to any server computer, is strictlyprohibited.


508 3. Advanced Mathematics in MathematicaHere is a power series that containsnegative powers of x.In[4]:= <strong>Series</strong>[ Exp[x]/x^2, {x, 0, 4} ]-2 1 1 x 2Out[4]= x + - + - + - + O[x]x 2 6Here is a power series involving fractionalpowers of x.In[5]:= <strong>Series</strong>[ Exp[Sqrt[x]], {x, 0, 2} ]3- 52 2 -x x x 2Out[5]= 1 + Sqrt[x] + - + -- + -- + O[x]2 6 24<strong>Series</strong> can also handle series that involvelogarithmic terms.In[6]:= <strong>Series</strong>[ Exp[2x] Log[x], {x, 0, 2} ]2Out[6]= Log[x] + 2 Log[x] x + O[x]There are, of course, mathematical functions for which no standard power seriesexist. Mathematica recognizes many such cases.<strong>Series</strong> sees that exp( x 1 ) has an essentialsingularity atx = 0, and does not produceapower series.In[7]:= <strong>Series</strong>[ Exp[1/x], {x, 0, 2} ]Exp::esss: Essential singularity encountered in1Exp[- + O[x]].x1-xOut[7]= <strong>Series</strong>[E , {x, 0, 2}]<strong>Series</strong> can nevertheless give you the power In[8]:= <strong>Series</strong>[ Exp[1/x], {x, Infinity, 3} ]series for exp(x 1 ) about the point x = 1. 1 1 1 1 4Out[8]= 1 + - + ------ + ------ + O[-]x 2 3 x2 x 6 xEspecially when negative powers occur, there is some subtlety inexactlyhowmany terms of a particular power series the function <strong>Series</strong> will generate.One way to understand what happens is to think of the analogy between powerseries taken to a certain order, and real numbers taken to a certain precision. <strong>Power</strong>series are \approximate formulae" in much the same sense as nite-precision realnumbers are approximate numbers.The procedure that <strong>Series</strong> follows in constructing a power series is largely analogousto the procedure that N follows in constructing a real number approximation.Both functions eectively start by replacing the smallest pieces of your expressionby nite order, or nite precision, approximations, and then evaluating the resultingexpression. If there are, for example, cancellations, this procedure may give a nalWeb sample page from The Mathematica Book, First Edition, by Stephen <strong>Wolfram</strong>, published by Addison-Wesley PublishingCompany (hardcover ISBN 0-201-19334-5; softcover ISBN 0-201-19330-2). To order Mathematica or this book contact <strong>Wolfram</strong><strong>Research</strong>: info@wolfram.com; http://www.wolfram.com/; 1-800-441-6284.c 1988 <strong>Wolfram</strong> <strong>Research</strong>, Inc. Permission is hereby granted for web users to make one paper copy of this page for theirpersonal use. Further reproduction, or any copying of machine-readable files (including this one) to any server computer, is strictlyprohibited.


3.6 <strong>Power</strong> <strong>Series</strong> and Limits 509result whose order or precision is less than the order or precision that you originallyasked for.Even though you ask for a series up toorder x 3 , the result you get only goes toorder x 1 . <strong>Series</strong> would need to generatethe series for Sin[x] to order x 5 to get aseries up to order x 3 after division by x 2 .You can always get a series to the orderyou want by initially asking for enoughextra terms.In[9]:= <strong>Series</strong>[ Sin[x]/x^2, {x, 0, 3} ]1 x 2Out[9]= - - - + O[x]x 6In[10]:= <strong>Series</strong>[ Sin[x]/x^2, {x, 0, 5} ]31 x x 4Out[10]= - - - + ---- + O[x]x 6 120When you make apower series expansion in a variable x, Mathematica assumesthat all objects that do not explicitly contain x are in fact independent ofx. <strong>Series</strong>thus does partial derivatives (eectively using D) to build up Taylor series.Both a and n are assumed to beindependent ofx.In[11]:= <strong>Series</strong>[ (a + x)^n , {x, 0, 2} ]2n -1 + n n -n n 2 3Out[11]= a + a n x + a (------- + -------) x + O[x]2 22 a 2 aa[x] is now given as an explicit function ofx.In[12]:= <strong>Series</strong>[ (a[x] + x)^n, {x, 0, 2} ]n-1 + nOut[12]= a[0] + n (1 + a'[0]) a[0] x +2 2 2-(1 + a'[0]) a''[0] n (1 + a'[0])(n (------------------------ + --------) + --------------------------)2 2 a[0] 22 a[0] 2 a[0]n 2 3a[0] x + O[x]You can use <strong>Series</strong> to generate power series in a sequence of dierent variables.<strong>Series</strong> works like Integrate, Sum and so on, and expands rst with respect to thelast variable you specify.<strong>Series</strong> performs a series expansionsuccessively with respect to each variable.The result in this case is a series in x,whose coecients are series in y.In[13]:= <strong>Series</strong>[Exp[x y], {x, 0, 3}, {y, 0, 3}]24 y 5 2Out[13]= 1 + (y + O[y] ) x + (-- + O[y] ) x +23y 6 3 4(--- + O[y] ) x + O[x]6Web sample page from The Mathematica Book, First Edition, by Stephen <strong>Wolfram</strong>, published by Addison-Wesley PublishingCompany (hardcover ISBN 0-201-19334-5; softcover ISBN 0-201-19330-2). To order Mathematica or this book contact <strong>Wolfram</strong><strong>Research</strong>: info@wolfram.com; http://www.wolfram.com/; 1-800-441-6284.c 1988 <strong>Wolfram</strong> <strong>Research</strong>, Inc. Permission is hereby granted for web users to make one paper copy of this page for theirpersonal use. Further reproduction, or any copying of machine-readable files (including this one) to any server computer, is strictlyprohibited.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!