Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Taylor series
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Calculation of Taylor series== Several methods exist for the calculation of Taylor series of a large number of functions. One can attempt to use the definition of the Taylor series, though this often requires generalizing the form of the coefficients according to a readily apparent pattern. Alternatively, one can use manipulations such as substitution, multiplication or division, addition or subtraction of standard Taylor series to construct the Taylor series of a function, by virtue of Taylor series being power series. In some cases, one can also derive the Taylor series by repeatedly applying [[integration by parts]]. Particularly convenient is the use of [[computer algebra system]]s to calculate Taylor series. ===First example=== In order to compute the 7th degree Maclaurin polynomial for the function <math display="block">f(x)=\ln(\cos x),\quad x\in\bigl({-\tfrac\pi2}, \tfrac\pi2\bigr),</math> one may first rewrite the function as <math display="block">f(x)={\ln}\bigl(1+(\cos x-1)\bigr),</math> the composition of two functions <math>x \mapsto \ln(1 + x)</math> and <math>x \mapsto \cos x - 1.</math> The Taylor series for the natural logarithm is (using [[big O notation]]) <math display="block">\ln(1+x) = x - \frac{x^2}2 + \frac{x^3}3 + O{\left(x^4\right)}</math> and for the cosine function <math display="block">\cos x - 1 = -\frac{x^2}2 + \frac{x^4}{24} - \frac{x^6}{720} + O{\left(x^8\right)}.</math> The first several terms from the second series can be substituted into each term of the first series. Because the first term in the second series has degree 2, three terms of the first series suffice to give a 7th-degree polynomial: <math display="block">\begin{align}f(x) &= \ln\bigl(1+(\cos x-1)\bigr) \\ &= (\cos x-1) - \tfrac12(\cos x-1)^2 + \tfrac13(\cos x-1)^3+ O{\left((\cos x-1)^4\right)} \\ &= - \frac{x^2}2 - \frac{x^4}{12} - \frac{x^6}{45}+O{\left(x^8\right)}. \end{align}\!</math> Since the cosine is an [[even function]], the coefficients for all the odd powers are zero. ===Second example=== Suppose we want the Taylor series at 0 of the function <math display="block">g(x)=\frac{e^x}{\cos x}.\!</math> The Taylor series for the exponential function is <math display="block">e^x =1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!}+\cdots,</math> and the series for cosine is <math display="block">\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots.</math> Assume the series for their quotient is <math display="block">\frac{e^x}{\cos x} = c_0 + c_1 x + c_2 x^2 + c_3 x^3 + c_4x^4 + \cdots</math> Multiplying both sides by the denominator <math>\cos x</math> and then expanding it as a series yields <math display="block">\begin{align} e^x &= \left(c_0 + c_1 x + c_2 x^2 + c_3 x^3 + c_4x^4 + \cdots\right)\left(1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots\right) \\[5mu] &= c_0 + c_1x + \left(c_2 - \frac{c_0}{2}\right)x^2 + \left(c_3 - \frac{c_1}{2}\right)x^3+\left(c_4-\frac{c_2}{2}+\frac{c_0}{4!}\right)x^4 + \cdots \end{align}</math> Comparing the coefficients of <math>g(x)\cos x</math> with the coefficients of <math>e^x,</math> <math display="block"> c_0 = 1,\ \ c_1 = 1,\ \ c_2 - \tfrac12 c_0 = \tfrac12,\ \ c_3 - \tfrac12 c_1 = \tfrac16,\ \ c_4 - \tfrac12 c_2 + \tfrac1{24} c_0 = \tfrac1{24},\ \ldots. </math> The coefficients <math>c_i</math> of the series for <math>g(x)</math> can thus be computed one at a time, amounting to long division of the series for <math>e^x</math> and {{nobr|<math>\cos x</math>:}} <math display="block">\frac{e^x}{\cos x}=1 + x + x^2 + \tfrac23 x^3 + \tfrac12 x^4 + \cdots.</math> ===Third example=== Here we employ a method called "indirect expansion" to expand the given function. This method uses the known Taylor expansion of the exponential function. In order to expand {{math|(1 + ''x'')''e<sup>x</sup>''}} as a Taylor series in {{mvar|x}}, we use the known Taylor series of function {{math|''e''<sup>''x''</sup>}}: <math display="block">e^x = \sum^\infty_{n=0} \frac{x^n}{n!} =1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!}+\cdots.</math> Thus, <math display="block">\begin{align}(1+x)e^x &= e^x + xe^x = \sum^\infty_{n=0} \frac{x^n}{n!} + \sum^\infty_{n=0} \frac{x^{n+1}}{n!} = 1 + \sum^\infty_{n=1} \frac{x^n}{n!} + \sum^\infty_{n=0} \frac{x^{n+1}}{n!} \\ &= 1 + \sum^\infty_{n=1} \frac{x^n}{n!} + \sum^\infty_{n=1} \frac{x^n}{(n-1)!} =1 + \sum^\infty_{n=1}\left(\frac{1}{n!} + \frac{1}{(n-1)!}\right)x^n \\ &= 1 + \sum^\infty_{n=1}\frac{n+1}{n!}x^n\\ &= \sum^\infty_{n=0}\frac{n+1}{n!}x^n.\end{align}</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Taylor series
(section)
Add topic