0% found this document useful (0 votes)
38 views5 pages

Section - 2 - Finite Difference Introduction

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)
38 views5 pages

Section - 2 - Finite Difference Introduction

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/ 5

Finite Difference Approximation Using Taylor Series

Consider a function 𝑓(𝑥), and we want to approximate its value at 𝑥 + Δ𝑥 in


terms of its value at 𝑥.

The Taylor expansion of 𝑓(𝑥 + Δ𝑥) around 𝑥 is:


𝑓 ′′ 𝑥 2+
𝑓 ′′′ 𝑥
3
𝑓(𝑥 + Δ𝑥) = 𝑓(𝑥) + 𝑓′(𝑥)Δ𝑥 + Δ𝑥 Δ𝑥 +⋯
2! 3!
The Taylor expansion of 𝑓(𝑥 − Δ𝑥) around 𝑥 is:
𝑓 ′′ 𝑥 𝑓 ′′′ 𝑥
𝑓 𝑥 − Δ𝑥 = 𝑓 𝑥 − 𝑓 ′ 𝑥 Δ𝑥 + Δ𝑥 2− Δ𝑥 3 +⋯
2! 3!
Finite Differnece
𝑓 ′′ 𝑥 2
𝑓 ′′′ 𝑥 3
𝑓(𝑥 + Δ𝑥) = 𝑓(𝑥) + 𝑓′(𝑥)Δ𝑥 + Δ𝑥 + Δ𝑥 +⋯
2! 3!
′′
𝑓 𝑥 ′′′
𝑓 𝑥

𝑓 𝑥 − Δ𝑥 = 𝑓 𝑥 − 𝑓 𝑥 Δ𝑥 + Δ𝑥 2− Δ𝑥 3 +⋯
2! 3!
To get the 1st order derivative ,we need to approximate the previous expansion by neglecting the terms with high
order derivatives
𝑓 𝑥 + Δ𝑥 = 𝑓 𝑥 + 𝑓 ′ 𝑥 Δ𝑥 + Δ𝑥 2
𝑓 𝑥 − Δ𝑥 = 𝑓 𝑥 − 𝑓 ′ 𝑥 Δ𝑥 + 𝑂 Δ𝑥 2
• 1st Derivative (Forward Difference)
𝑓 𝑥 + Δ𝑥 − 𝑓 𝑥
𝑓′ 𝑥 = + 𝑂 Δ𝑥
Δ𝑥
• 1st Derivative (Backward Difference)

𝑓(𝑥) − 𝑓 𝑥 − Δ𝑥
𝑓 𝑥 = + 𝑂 Δ𝑥
Δ𝑥
• 1st Derivative (Central Difference)
𝑓(𝑥 + Δ𝑥) − 𝑓 𝑥 − Δ𝑥
𝑓′ 𝑥 = + 𝑂 Δ𝑥 2
2Δ𝑥
Finite Differnece
𝑓 ′′ 𝑥 2
𝑓 ′′′ 𝑥
𝑓(𝑥 + Δ𝑥) = 𝑓(𝑥) + 𝑓′(𝑥)Δ𝑥 + Δ𝑥 + Δ𝑥 3 + ⋯
2! 3!
′′ ′′′
𝑓 𝑥 𝑓 𝑥
𝑓 𝑥 − Δ𝑥 = 𝑓 𝑥 − 𝑓 ′ 𝑥 Δ𝑥 + Δ𝑥 2 − Δ𝑥 3 + ⋯
2! 3!
′′
𝑓 𝑥 2
𝑓 ′′′ 𝑥
𝑓(𝑥 + 2Δ𝑥) = 𝑓(𝑥) + 2𝑓′(𝑥)Δ𝑥 + 2Δ𝑥 + 2Δ𝑥 3 + ⋯
2! 3!
′′ ′′′
𝑓 𝑥 𝑓 𝑥
𝑓 𝑥 − 2Δ𝑥 = 𝑓 𝑥 − 2𝑓 ′ 𝑥 Δ𝑥 + 2Δ𝑥 2 − 2Δ𝑥 3 + ⋯
2! 3!

• 2nd Derivative (Central Difference)


′′
𝑓 𝑥 − Δ𝑥 − 2𝑓 𝑥 + 𝑓 𝑥 + Δ𝑥 2
𝑓 𝑥 = + 𝑂 Δ𝑥
Δ𝑥 2
• 2nd Derivative (Forward Difference)
′′
𝑓 𝑥 + 2Δ𝑥 − 2𝑓 𝑥 + Δ𝑥 + 𝑓 𝑥
𝑓 𝑥 = + 𝑂 Δ𝑥
Δ𝑥 2
• 2nd Derivative (Backward Difference)
𝑓 𝑥 − 2𝑓 𝑥 − Δ𝑥 + 𝑓 𝑥 − 2Δ𝑥
𝑓 ′′ 𝑥 = + 𝑂 Δ𝑥
Δ𝑥 2
Finite Differnece
Truncation Error
It is the difference between the original PDE and the approximate FDE
𝑇. 𝐸 = 𝑃𝐷𝐸 − 𝐹𝐷𝐸
Stability
The scheme is stable if the errors are not growing from step to another

Consistency
The Truncation error vanishes as the mesh is refined

Convergence
Convergence = Stability + Consistency
The solution of the FDE approaches the solution of the PDE
By: Mina Romany
For any further questions please contact me on
Whatsapp,
Or on e-mail: m_romanygad@eng.cu.edu.eg

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy