4.8.13 · HinglishNumerical Methods

Numerical differentiation — forward, backward, central differences

1,447 words7 min readRead in English

4.8.13 · Maths › Numerical Methods


WHAT / WHY / HOW

WHAT kar rahe hain hum? (aur higher derivatives) ko ek table of values ya ek aisi function se estimate karna jise hum sample kar sakein, bina exact symbolic derivative ke.

WHY matter karta hai yeh? Real problems mein experiments, simulations se aata hai, ya itna messy hota hai ki haath se differentiate karna mushkil ho. ODE solvers, optimisation, aur PDEs sab inhi formulas par based hain.

HOW milte hain formulas? Taylor series se. Neeche jo bhi hai woh derive kiya gaya hai, kabhi seedha thopa nahi gaya.


Derivation from first principles (Taylor series)

ke around Taylor expansion, step karke:

1. Forward difference

Yeh step kyun? Hum akele chahte hain, toh pehli expansion ko ke liye solve karo.

se divide karo:

2. Backward difference

Yeh step kyun? Same idea lekin expansion ko solve karo.

3. Central difference (the star)

Yeh step kyun? Dono expansions ko subtract karo taaki symmetric terms cancel ho jayein.

terms equal aur opposite hain → woh khatam ho jaate hain. se divide karo:

4. Central second derivative

Yeh step kyun? Dono expansions ko add karo taaki odd terms (, ) cancel ho jayein aur bach jaye.

ke liye solve karo:

Figure — Numerical differentiation — forward, backward, central differences

Worked examples


Common mistakes (steel-manned)


80/20 — actually kya yaad rakhna hai

Recall Feynman: ek 12-saal ke bachche ko explain karo

Socho tum ek pahaad par ho aur jaanna chahte ho ki bilkul wahan kitni dhaaldari hai jahan tum khade ho.

  • Forward: ek kadam aage lete ho, dekhte ho kitna upar/neeche gaye, yahi tumhara dhaaldari ka andaaza hai.
  • Backward: same lekin ek kadam peeche lete ho.
  • Central: ek kadam aage AND ek kadam peeche dono check karte ho, aur un dono jagahon ke beech ka farq use karte ho. Kyunki tumne dono taraf nazar daali, tumhara dhaaldari ka andaaza kaafi zyada sahi hota hai — chote-mote bumps cancel ho jaate hain. Agar bahut bade kadam lo ( bada) toh chote bumps miss ho jaate hain; agar bahut hi chote kadam lo toh tumhara ruler itna precise nahi hota aur answer noisy ho jaata hai. Toh ek samajhdaari se chota step chuno.

Flashcards

Forward difference formula for ?
, error .
Backward difference formula for ?
, error .
Central difference for aur uska order?
, error .
Central second-derivative formula?
, error .
Central forward se zyada accurate kyun hai?
Dono Taylor expansions subtract karne se term cancel hoti hai, error khatam hota hai, sirf bachta hai.
Forward difference ka leading error term kya hai?
.
Central first-difference ka leading error term kya hai?
.
ko arbitrarily small kyun nahi bana sakte?
Roundoff/cancellation error ki tarah badhta hai; total error ka optimum finite par hota hai.
Even-derivative formula derive karne ki trick?
aur ki Taylor series ADD karo (odd terms cancel ho jaate hain).
Forward ya backward central ki jagah kab use karna chahiye?
Data table ke edges par jab ek neighbour missing ho.

Connections

Concept Map

cannot reach h to 0

derives all formulas

derives all formulas

subtract expansions

add expansions

uses x and x+h

uses x-h and x

averages both views

error

error

f'' terms cancel

odd terms cancel

more accurate

Derivative as limit

Finite step h approximation

Taylor series expansion

Forward difference

Backward difference

Central difference

Central second derivative

O of h first order

O of h squared second order

Central preferred