Numerical Methods Notes
Numerical Methods Notes
with Examples
1. Methods for Non-Linear Equations
Bisection Method
Used to find the root of a function in a given interval [a, b] where f(a)f(b)<0. Example:
Find root of f(x)=x^3−x−2 between x=1 and x=2.
Newton-Raphson Method
Uses tangents to find roots. Formula: xₙ₊₁ = xₙ - f(xₙ)/f'(xₙ). Example:
Find root of f(x)=x^2−2 using x₀=1.
Secant Method
Like Newton-Raphson but without derivative. Uses two initial guesses. Formula: xₙ₊₁ = xₙ -
f(xₙ)*(xₙ - xₙ₋₁)/(f(xₙ) - f(xₙ₋₁)).
2. Numerical Integration
Trapezoidal Rule
Approximates area using trapezoids. Formula: (h/2)[f(a)+2f(x₁)+...+2f(xₙ₋₁)+f(b)].
Example:
Integrate f(x)=x^2 from 0 to 2.
Euler Method
Simple approximation method for dy/dx = f(x, y). Formula: yₙ₊₁ = yₙ + h*f(xₙ, yₙ). Example:
Solve dy/dx = x + y, y(0) = 1 using h=0.1.