0% found this document useful (0 votes)
45 views8 pages

Lecture-1 2

The document discusses numerical methods and Taylor series expansions. Taylor series are used to approximate functions as infinite sums by taking derivatives at a point. Examples are provided of finding Taylor series for common functions like e^x, sin(x), and ln(x) centered at different points.

Uploaded by

gelamendoza232
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views8 pages

Lecture-1 2

The document discusses numerical methods and Taylor series expansions. Taylor series are used to approximate functions as infinite sums by taking derivatives at a point. Examples are provided of finding Taylor series for common functions like e^x, sin(x), and ln(x) centered at different points.

Uploaded by

gelamendoza232
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

NUMERICAL METHODS

- Are mathematical techniques used for solving mathematical problems that


cannot be solved or are difficult to solve analytically.
- An analytical solution is an exact answer in the form of a mathematical
expression in terms of the variables associated with the problem that is
being solved. A numerical solution is an approximate numerical value(a
number) for the solution.

Physical Meaning of Derivative and Integrals


Physical meaning of derivatives is it represents rate of change of parameter.
While the physical meaning/ interpretation of integrals is the area under its curve.

Taylor Series Expansion


- Series expansion of a function about a point. It is an infinite sum of terms
that are expressed in terms of the function’s derivatives at a single point. A
one-dimensional Taylor series is an expansion of a real function f(x) about
a point x=c is given by

𝒇𝒏 (𝒄)(𝒙 − 𝒄)𝒏
𝒇(𝒙) =
𝒏!
𝒏 𝟎

First step, write down a general nth-degree polynomial:

𝑓(𝑥) = 𝑎 + 𝑎 (𝑥 − 𝑐) + 𝑎 (𝑥 − 𝑐) + 𝑎 (𝑥 − 𝑐) + . . . ..

Where a0, a1… are coefficients on each polynomial term and c is a constant
that represents where along the x-axis we want to start our approximation
(if we don’t care where we start, just let c = 0, which is technically known as
Maclaurin Series). This series known as “power series” can be written in
closed form as the following:

(𝒙 − 𝒄)𝒏
𝒇(𝒙) = 𝒂𝒏
𝒏!
𝒏 𝟎

Next step, take few derivatives:

𝑓 (𝑥) = 𝑎 + 2𝑎 (𝑥 − 𝑐) + 3𝑎 (𝑥 − 𝑐) + 4𝑎 (𝑥 − 𝑐) + . . ..

𝑓 (𝑥) = 2𝑎 + 6𝑎 (𝑥 − 𝑐) + 12𝑎 (𝑥 − 𝑐) + 20𝑎 (𝑥 − 𝑐) + . . . ..

𝑓 (𝑥) = 6𝑎 + 24𝑎 (𝑥 − 𝑐) + 60𝑎 (𝑥 − 𝑐) + 120𝑎 (𝑥 − 𝑐) + . . . ..

This is the key step, notice that if we evaluate them at x=c, most of
their terms will go to zero. That will leave behind only the coefficients
a1, a2,… multiplied by some constant.:
𝑓(𝑐) = 𝑎 = 𝑎 0!

𝑓 (𝑐) = 𝑎 = 𝑎 1!

𝑓 (𝑐) = 2𝑎 = 𝑎 2!

𝑓 (𝑐) = 3 . 2 𝑎 = 𝑎 3!

𝑓 (𝑐) = 4 . 3 . 2 𝑎 = 𝑎 4!

Solve for a1, a2,…:

𝑓(𝑐)
𝑎 =
0!

𝑓′(𝑐)
𝑎 =
1!
𝑓′′(𝑐)
𝑎 =
2!

𝑓′′′(𝑐)
𝑎 =
3!

𝑓′′′′(𝑐)
𝑎 =
4!

Next step is to plug them back into our beginning expression for a
general nth-degree polynomial:

𝑓(𝑐) 𝑓′(𝑐) 𝑓′′(𝑐) 𝑓′′′(𝑐) 𝑓′′′′(𝑐)


𝑓(𝑥) = + + + + + . . .
0! 1! 2! 3! 4!

The last step is to write this infinite series in closed form:

𝒇𝒏 (𝒄)(𝒙 − 𝒄)𝒏
𝒇(𝒙) =
𝒏!
𝒏 𝟎
Examples:
1. Find a taylor series for the function 𝑓(𝑥) = 𝑒 centered at c=3.

𝑓(𝑥) = 𝑒
𝑓 (𝑥) = 𝑒 = 𝑓 (𝑥) = 𝑓 (𝑥) = 𝑓 ( ) (𝑥)

𝑓(3) = 𝑒 = 𝑓 (𝑥) = 𝑓 (𝑥) = 𝑓 (𝑥) = 𝑓 ( ) (𝑥)

𝑓 (𝑐)(𝑥 − 𝑐) 𝑓 (𝑐)(𝑥 − 𝑐) 𝑓 ( ) (𝑐)(𝑥 − 𝑐)


𝑓(𝑥) = 𝑓(𝑐) + 𝑓 (𝑐)(𝑥 − 𝑐) + + +
2! 3! 4!
+. . .

𝑒 (𝑥 − 3) 𝑒 (𝑥 − 3) 𝑒 (𝑥 − 3)
𝑒 = 𝑒 + 𝑒 (𝑥 − 3) + + + +. . .
2! 3! 4!

𝒆𝟑 (𝒙 − 𝟑)𝒏
𝒆𝒙 =
𝒏!
𝒏 𝟎

2. Find the taylor series for 𝑓(𝑥) = 𝑒 about c =0

𝑓(𝑥) = 𝑒 = 𝑓 (𝑥) = 𝑓 (𝑥)


𝑓 (𝑥) = −𝑒 = 𝑓′′′(𝑥)

𝑓(0) = 1 = 𝑓 (𝑥) = 𝑓 (𝑥)


𝑓 (0) = −1 = 𝑓′′′(0)

𝑓 (𝑐)(𝑥 − 𝑐) 𝑓 (𝑐)(𝑥 − 𝑐) 𝑓 ( ) (𝑐)(𝑥 − 𝑐)


𝑓(𝑥) = 𝑓(𝑐) + 𝑓 (𝑐)(𝑥 − 𝑐) + + +
2! 3! 4!
+. . .

(𝑥 − 0) (𝑥 − 0) (𝑥 − 0)
𝑒 = 1 − (𝑥 − 0) + − + −. . . .
2! 3! 4!
𝑥 𝑥 𝑥
𝑒 = 1−𝑥+ − + −. . . .
2! 3! 4!

𝒙
(−𝟏)𝒏 (𝒙𝒏 )
𝒆 =
𝒏!
𝒏 𝟎

3. Find the Maclaurin series for the function f(x) = sin x , c=0

𝑓(𝑥) = 𝑠𝑖𝑛𝑥
𝑓′(𝑥) = 𝑐𝑜𝑠𝑥
( )
𝑓 = −𝑠𝑖𝑛𝑥
𝑓′′′(𝑥) = −𝑐𝑜𝑠𝑥
𝑓 (𝑥) = 𝑠𝑖𝑛𝑥
𝑓 (𝑥) = 𝑐𝑜𝑠𝑥
𝑓 (𝑥) = −𝑠𝑖𝑛𝑥
𝑓 (𝑥) = −𝑐𝑜𝑠𝑥

𝑓(0) = 0 = 𝑓 (0) = 𝑓 (0) = 𝑓 (0)


( )
𝑓 = 1 = 𝑓 (0)

𝑓 (𝑥) = −1 = 𝑓 ( ) (0)

𝑓 (𝑐)𝑥 𝑓 (𝑐)𝑥 𝑓 ( ) (𝑐)𝑥


𝑓(𝑥) = 𝑓(𝑐) + 𝑓 (𝑐)(𝑥 − 𝑐) + + + +. . .
2! 3! 4!

𝑥 𝑥 𝑥
𝑠𝑖𝑛𝑥 = 0 + 𝑥 + 0 − +0+ +0− + . . . .
3! 5! 7!
𝑥 𝑥 𝑥
𝑠𝑖𝑛𝑥 = 𝑥 − + − +. . . . .
3! 5! 7!

(−𝟏)𝒏 𝒙𝟐𝒏 𝟏
𝒔𝒊𝒏𝒙 =
(𝟐𝒏 + 𝟏)!
𝒏 𝟎

4. Find the taylor series for the function f(x) = lnx , c= 2

𝑓(𝑥) = 𝑙𝑛𝑥
1
𝑓′(𝑥) =
𝑥
1
𝑓 (𝑥) = −
𝑥
2
𝑓′′′(𝑥) =
𝑥
6
𝑓 (𝑥) = −
𝑥
24
𝑓 (𝑥) =
𝑥

𝑓(2) = 𝑙𝑛2
1
𝑓′(2) =
2
( ) 1
𝑓 =−
2
2
𝑓′′′(𝑥) =
2
6
𝑓 (𝑥) = −
2
24
𝑓 (𝑥) =
2

𝑓 (𝑐)(𝑥 − 𝑐) 𝑓 (𝑐)(𝑥 − 𝑐) 𝑓 ( ) (𝑐)(𝑥 − 𝑐)


𝑓(𝑥) = 𝑓(𝑐) + 𝑓 (𝑐)(𝑥 − 𝑐) + + +
2! 3! 4!
+. . .
(𝑥 − 2) (𝑥 − 2) 2(𝑥 − 2) 6(𝑥 − 2) 24(𝑥 − 2)
𝑙𝑛𝑥 = 𝑙𝑛2 + − + − +
2 2 (2!) 2 (3!) 2 (4!) 2 (5!)

(−1) (𝑛 − 1)!
𝑓 (2) =
2

(−1) (𝑛 − 1)!
𝑙𝑛𝑥 = 𝑙𝑛2 + (𝑥 − 2)
2 (𝑛!)

( 𝟏)𝒏 𝟏
𝒍𝒏𝒙 = 𝒍𝒏𝟐 + ∑𝒏 𝟏 𝟐𝒏 (𝒏) (𝒙 − 𝟐)𝒏

5. Find the taylor series for the function 𝑥 − 10𝑥 + 6 when x = 3

𝑓 (𝑥) = 3𝑥 − 20𝑥
𝑓 (𝑥) = 6𝑥 − 20
𝑓 (𝑥) = 6
𝑓 (𝑥) = 0

𝑓(3) = −57
𝑓 (3) = −33
𝑓 ′(3) = −2
𝑓′′ (3) = 6
𝑓 (3) = 0

2(𝑥 − 3) 6(𝑥 − 3)
𝑥 − 10𝑥 + 6 = −57 − 33(𝑥 − 3) − + +0+0+ . . . . .
2! 3!

𝒙𝟑 − 𝟏𝟎𝒙𝟐 + 𝟔 = −𝟓𝟕 − 𝟑𝟑(𝒙 − 𝟑) − (𝒙 − 𝟑)𝟐 + (𝒙 − 𝟑)𝟑


6. Find the taylor series 𝑓(𝑥) = 𝑥 𝑒 about x = 0

(−𝟏)𝒏 (𝟑𝒏 𝒙𝟐𝒏 𝟒 )


𝒙𝟒 𝒆 𝟑𝒙𝟐
=
𝒏!
𝒏 𝟎

7. Find the taylor series for 𝑓(𝑥) = 𝑥 cos (𝑥 ) about x =0

(−𝟏)𝒏 𝒙𝟒𝒏 𝟐
𝑥 cos (𝑥 )
𝟐𝒏!
𝒏 𝟎

You might also like