0% found this document useful (0 votes)
24 views7 pages

Finite Difference Method Overview

Uploaded by

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

Finite Difference Method Overview

Uploaded by

jitesh dhule
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Finite Difference Method and Its Approximations

1. Concept of Finite Difference Method (FDM)


The Finite Difference Method (FDM) is a numerical technique used to approximate
derivatives of functions using discrete data points instead of continuous calculus. If we have
a function f(x), we approximate its derivatives using function values at equally spaced
points: x₀, x₁, x₂, …, xₙ, where xᵢ₊₁ = xᵢ + h and h is the step size. This method forms the basis
of numerical differentiation and is widely used in solving differential equations and
engineering simulations such as heat transfer and fluid flow.

2. Forward Finite Difference Approximation


Using the Taylor series expansion of f(x+h):

f(x+h) = f(x) + h f'(x) + (h²/2!) f''(x) + (h³/3!) f'''(x) + …

Rearranging for f'(x):

f'(x) = [f(x+h) - f(x)]/h - (h/2) f''(x) - (h²/6) f'''(x) - …

Hence, the Forward Difference Formula is:

f'(x) ≈ [f(x+h) - f(x)] / h

Error term: O(h) (First-order accurate)

3. Backward Finite Difference Approximation


Using the Taylor series expansion of f(x-h):

f(x-h) = f(x) - h f'(x) + (h²/2!) f''(x) - (h³/3!) f'''(x) + …

Rearranging for f'(x):

f'(x) = [f(x) - f(x-h)]/h - (h/2) f''(x) + (h²/6) f'''(x) - …

Hence, the Backward Difference Formula is:

f'(x) ≈ [f(x) - f(x-h)] / h

Error term: O(h) (First-order accurate)

4. Central Finite Difference Approximation


Expanding f(x+h) and f(x-h) using Taylor series and subtracting:

f(x+h) - f(x-h) = 2h f'(x) + (2h³/3!) f'''(x) + …

Hence, f'(x) = [f(x+h) - f(x-h)] / (2h) - (h²/6) f'''(x) - …


Therefore, the Central Difference Formula is:

f'(x) ≈ [f(x+h) - f(x-h)] / (2h)

Error term: O(h²) (Second-order accurate)

5. Second Derivative Approximation


Adding the Taylor expansions of f(x+h) and f(x-h):

f(x+h) + f(x-h) = 2f(x) + h² f''(x) + (h⁴/12) f⁽⁴⁾(x) + …

Rearranging for f''(x):

f''(x) = [f(x+h) - 2f(x) + f(x-h)] / h² - (h²/12) f⁽⁴⁾(x) - …

Therefore, the Central Difference Formula for Second Derivative is:

f''(x) ≈ [f(x+h) - 2f(x) + f(x-h)] / h²

Error term: O(h²) (Second-order accurate)

6. Numerical Example
Let f(x) = eˣ, at x = 1, with h = 0.1.

f(1) = 2.7183, f(1.1) = 3.0042, f(0.9) = 2.4596

Forward Difference: f'(1) ≈ (3.0042 - 2.7183)/0.1 = 2.8588

Backward Difference: f'(1) ≈ (2.7183 - 2.4596)/0.1 = 2.587

Central Difference: f'(1) ≈ (3.0042 - 2.4596)/(0.2) = 2.723

True value: f'(1) = e¹ = 2.7183 → Central difference is most accurate.

Second Derivative (Central): f''(1) ≈ (3.0042 - 2(2.7183) + 2.4596)/0.01 = 2.72 (close to true
value 2.7183).

Performance of Finite Difference Method in Solving Column Buckling


under Axial Load

1. Introduction
Column buckling is a fundamental problem in structural mechanics. The critical load at
which a column buckles can be obtained using the Euler–Bernoulli beam theory. Analytical
solutions exist for simple boundary conditions such as pinned–pinned, but for complex
conditions or variable properties, numerical methods such as the Finite Difference Method
(FDM) are used.
2. Governing Differential Equation
The differential equation governing elastic buckling of a column under axial compressive
load P is:
EI * (d²y/dx²) + P * y = 0
where EI is the flexural rigidity, P is the axial load, and y is the lateral deflection.

3. Finite Difference Discretization


Using a uniform grid of spacing h, the second derivative is approximated as:
y''(x_i) ≈ (y_{i+1} - 2y_i + y_{i-1}) / h²
Substituting this into the governing equation gives:
EI * (y_{i+1} - 2y_i + y_{i-1}) / h² + P * y_i = 0

This can be expressed in matrix form as an eigenvalue problem:


[M]{y} = (h² * P / EI){y}
where M is a tridiagonal matrix with 2 on the main diagonal and -1 on the off-diagonals.

4. Numerical Implementation
The problem was solved numerically using Python for a pinned–pinned column of length L
= 1 m, flexural rigidity EI = 210 × 10⁹ × 10⁻⁶ N·m². The analytical Euler buckling load is
given by:
Pₙ = (n²π²EI) / L², for n = 1, 2, 3, …

5. Results and Discussion


The finite difference model was applied with various numbers of interior nodes (N). The
first buckling load obtained from FDM was compared to the analytical Euler load.

N (Interior Nodes) Step size (h) P₁ (FDM) [N] Relative Error

10 0.0909 2.0586×10⁶ 0.00678

20 0.0476 2.0688×10⁶ 0.00186

40 0.0244 2.0716×10⁶ 0.00049

80 0.0123 2.0724×10⁶ 0.00013

160 0.0062 2.0726×10⁶ 0.00003

320 0.0031 2.0726×10⁶ 0.000008

The finite difference results converge rapidly to the analytical Euler load. The relative error
decreases approximately with the square of the step size, demonstrating second-order
accuracy.
6. Mode Shape Comparison
The first buckling mode obtained numerically matches the analytical mode shape y =
sin(πx/L) very closely. The deflected shapes for N = 320 overlap almost perfectly with the
analytical solution, validating the method.

Truncation Error in Finite Difference Approximations

1. Introduction
Finite Difference Methods (FDM) are used to approximate derivatives of functions using
discrete values at equally spaced points. Since these approximations are based on truncated
Taylor series, they introduce an inherent error known as truncation error.

2. Concept of Truncation Error


Truncation error occurs when the Taylor series expansion is truncated after a finite number
of terms. It represents the difference between the exact derivative and the approximate
value obtained using the finite difference formula.

Mathematically, the truncation error (TE) is expressed as:


TE = (Exact derivative) − (Finite difference approximation)

3. Derivation of Truncation Errors

3.1 Forward Difference Approximation


The first derivative using the forward difference scheme is:
f'(x) ≈ [f(x + h) − f(x)] / h

Expanding f(x + h) using Taylor series:


f(x + h) = f(x) + h f'(x) + (h²/2!) f''(x) + (h³/3!) f'''(x) + ...

Substituting this into the forward difference equation:


[f(x + h) − f(x)] / h = f'(x) + (h/2) f''(x) + (h²/6) f'''(x) + ...

Thus, the truncation error is:


TE = (h/2) f''(x) + O(h²)
Hence, the forward difference is first-order accurate (O(h)).

3.2 Backward Difference Approximation


The first derivative using the backward difference scheme is:
f'(x) ≈ [f(x) − f(x − h)] / h

Expanding f(x − h) using Taylor series:


f(x − h) = f(x) − h f'(x) + (h²/2!) f''(x) − (h³/3!) f'''(x) + ...

Substituting this into the backward difference equation:


[f(x) − f(x − h)] / h = f'(x) − (h/2) f''(x) + (h²/6) f'''(x) − ...
Thus, the truncation error is:
TE = −(h/2) f''(x) + O(h²)
Hence, the backward difference is also first-order accurate (O(h)).

3.3 Centered Difference Approximation


The first derivative using the centered difference scheme is:
f'(x) ≈ [f(x + h) − f(x − h)] / (2h)

Expanding both f(x + h) and f(x − h) using Taylor series and subtracting:
f(x + h) − f(x − h) = 2h f'(x) + (2h³/3!) f'''(x) + ...

Dividing by 2h gives:
[f(x + h) − f(x − h)] / (2h) = f'(x) + (h²/6) f'''(x) + O(h⁴)

Thus, the truncation error is:


TE = (h²/6) f'''(x) + O(h⁴)
Hence, the centered difference is second-order accurate (O(h²)).

Truncation Error in Finite Difference Approximations

1. Introduction
Finite difference methods (FDM) are numerical techniques to approximate derivatives. In
any finite difference scheme, truncation error arises because the derivative is
approximated using a discrete set of points rather than the exact continuous derivative.

2. Definition of Truncation Error

Truncation error (TE) is the difference between the exact derivative and its finite
difference approximation. It indicates the accuracy of the numerical method and depends
on the step size h.

TE = Exact derivative - Finite difference approximation

3. Forward Difference Scheme

Approximation for the first derivative:

f'(x) \approx (f(x+h) - f(x))/h

Using Taylor series expansion of f(x+h):

f(x+h) = f(x) + h f'(x) + (h^2/2) f''(x) + (h^3/6) f'''(x) + O(h^4)


Substituting into the forward difference formula:

(f(x+h) - f(x))/h = f'(x) + (h/2) f''(x) + O(h^2)

Truncation error:

TE_forward = (h/2) f''(x) + O(h^2)

Thus, the forward difference is first-order accurate.

4. Backward Difference Scheme

Approximation for the first derivative:

f'(x) \approx (f(x) - f(x-h))/h

Taylor series expansion of f(x-h):

f(x-h) = f(x) - h f'(x) + (h^2/2) f''(x) - (h^3/6) f'''(x) + O(h^4)

Substituting into backward difference formula:

(f(x) - f(x-h))/h = f'(x) - (h/2) f''(x) + O(h^2)

Truncation error:

TE_backward = -(h/2) f''(x) + O(h^2)

Also first-order accurate.

5. Centered Difference Scheme

Approximation for the first derivative:

f'(x) \approx (f(x+h) - f(x-h))/(2h)

Using Taylor expansions:

f(x+h) = f(x) + h f'(x) + (h^2/2) f''(x) + (h^3/6) f'''(x) + O(h^4)

f(x-h) = f(x) - h f'(x) + (h^2/2) f''(x) - (h^3/6) f'''(x) + O(h^4)


Subtracting: f(x+h) - f(x-h) = 2h f'(x) + (h^3/3) f'''(x) + O(h^5)

Dividing by 2h:

(f(x+h) - f(x-h))/(2h) = f'(x) + (h^2/6) f'''(x) + O(h^4)

Truncation error:

TE_centered = (h^2/6) f'''(x) + O(h^4)

Hence, the centered difference is second-order accurate, more precise than forward or
backward schemes.

You might also like