Yeh step kyun?f(x) subtract karo aur h se divide karo — exactly wohi jo formula karta hai.
hf(x+h)−f(x)=f′(x)+2hf′′(x)+6h2f′′′(x)+⋯
To
D+f(x)−f′(x)=2hf′′(x)+O(h2)=O(h).Yeh kyun matter karta hai: leading error ∝h hai → first order accurate. Exact remainder (Lagrange form) 2hf′′(ξ) hai kisi ξ∈(x,x+h) ke liye.
Dono expansions likho:
f(x+h)=f(x)+hf′+2h2f′′+6h3f′′′+⋯f(x−h)=f(x)−hf′+2h2f′′−6h3f′′′+⋯Subtract kyun karo? Even-power terms (f, f′′) cancel ho jaate hain, sirf odd wale bachte hain:
f(x+h)−f(x−h)=2hf′(x)+3h3f′′′(x)+⋯2h se divide karo:
D0f(x)−f′(x)=6h2f′′′(x)+O(h4)=O(h2).Yeh kyun matter karta hai: cancellation O(h) term ko khatam kar deta hai → second order. h ko half karne se truncation error ~4 guna kam ho jaata hai.
Machine f(x) exactly store nahi karta; wo f~(x)=f(x)+δ store karta hai, jahan ∣δ∣≤εm∣f(x)∣ aur εm≈2.2×10−16 (double precision machine epsilon) hai.
Central formula ke liye, computed numerator mein 2ε tak error hota hai jahan ε=εm∣f∣ hai, isliye:
εround≲2h2ε=hε.1/h kyun? Hum ek aisa roundoff divide karte hain jo shrink nahi hota ek tiny h se → yeh blow up ho jaata hai. Yahi catastrophic cancellation hai: f(x+h) aur f(x−h) almost equal hote hain, isliye subtract karne par significant digits kho jaate hain.
Differentiate kyun?E(h) ka minimum wahan hai jahan E′(h)=0.
E′(h)=3hM3−h2ε=0⇒h3=M33εhopt=(M33ε)1/3∼ε1/3≈6×10−6
Us point par E∼ε2/3≈10−11 — machine precision nahi! Forward difference ke liye hopt∼ε1/2≈10−8, E∼ε1/2 milta hai.
Socho tum ek pahaad ki dhaalan naap rahe ho do kadam door jaake dekh kar kitna upar gaye. Bade kadam ek rough answer dete hain (tum pahaad ka curve miss kar lete ho) — yahi truncation error hai. Tiny kadam perfect hone chahiye... lekin tumhara ruler sirf itne hi digits padh sakta hai, isliye jab dono heights almost same hoti hain, tab unka tiny difference mostly measurement ka kachra hota hai — yahi rounding error hai. Ek "just right" step size hoti hai, na bahut badi, na bahut chhoti. Apne point ke aas-paas kadam rakhna (ek aage, ek peeche) sirf aage kadam rakhne se zyada clever hai, kyunki dono sides ke errors cancel ho jaate hain.