Visual walkthrough — ODE solvers — Euler's method (derivation, global error)
4.8.22 · D2· Maths › Numerical Methods › ODE solvers — Euler's method (derivation, global error)
Hum ek aisi curve ko dhundh rahe hain jo hum likh nahi sakte. Hum sirf har point par uski slope jaante hain. Dekho kaise yeh ek fact ek working method ban jaata hai, step by step.
Step 1 — Hume kya diya gaya hai: ek slope field, curve nahi
KYA. Hamare paas ek Initial Value Problem hai:
Har symbol ko zor se padho:
- — horizontal position (kitni door tak hum chal chuke hain).
- — us position par curve ki height (jo hum jaanna chahte hain).
- — "yahan curve kitna steep hai", iske tangent line ka rise over run.
- — ek machine: isme point daalo, yeh slope wapas deta hai. Yeh hamare paas hai.
- — woh ek point jo hum bilkul pakke se jaante hain. Haara starting pin.
YEH FRAMING KYUN. Hum directly integrate nahi kar sakte kyunki , par depend karta hai, aur exactly wahi unknown hai. To formula ki jagah, ko ek aisa machine socho jo plane ke har point par ek chhoti si arrow paint karta hai — ek slope field. True solution woh curve hai jo hamesha local arrow ke saath align hoti hai.
PICTURE. Neeche, pastel arrows ke liye slope field hain. Akela black dot hamara jaana-maana start hai. Koi curve abhi nahi bani — yehi toh poori problem hai.

Step 2 — Ek honest move: thodi door tak tangent par trust karo
KYA. Hamare jaane-maane point par arrow slope ke saath point karta hai. Hum us point se guzarni wali straight line banate hain jiska slope exactly wahi hai — tangent line — aur use thodi horizontal doori tak follow karte hain.
Term by term: hai . Woh rise current height mein add karo aur tum new height par pahunch jaate ho.
KYUN. Bilkul start mein tangent line curve hi hoti hai (woh chhooti hain aur slope share karti hain). Thodi door tak woh karib rehti hain. Hum curve follow nahi kar sakte — hamare paas formula nahi hai — lekin hum uske tangent ko follow kar sakte hain, kyunki tangent ko sirf slope chahiye, jo hume free mein deta hai.
PICTURE. Right triangle arithmetic ko visible banata hai: horizontal leg , vertical leg , aur hypotenuse woh tangent hai jis par hum chalte hain.

Step 3 — Step formula kahan se aata hai? Taylor's theorem
KYA. Taylor's theorem distance aage ki sachi height ko exactly likhta hai:
- slope hai — jo ODE kehta hai ke barabar hai.
- curvature hai: slope khud kitni tezi se badal rahi hai. koi chhupa hua point hai aur ke beech.
- term tab chhota hota hai jab chhota ho, kyunki ek chhote number ko square karne se woh bahut zyada chhota ho jaata hai.
YEH TOOL KYUN AUR KOI NAHI. Taylor kyun? Kyunki yeh woh ek expansion hai jo curve ko "ek straight line plus ek labelled, honest remainder" mein tod deti hai. Woh remainder hume exactly batata hai hum kya phenk rahe hain jab hum sirf straight-line part rakhte hain. Koi aur tool hamare haath mein error term nahi deta.
term hataao aur aapko Step 2 ka boxed Euler step milta hai. Haata hua local truncation error hai — ek single step ki error.
PICTURE. Sachi curve tangent line ke upar exactly ke gap se uthti hai. Woh gap woh correction hai jo hum ignore karna choose karte hain.

Step 4 — Repeat: steps ko ek staircase mein chain karo
KYA. Hum sirf tak pahunche. Aage jaane ke liye, landing point ko nayi start maano, wahan slope padho, aur phir step karo:
KYUN. Yahi "self-bootstrapping" idea hai: har jawab agale sawaal ka input ban jaata hai. Hume poori curve ek saath kabhi nahi chahiye thi — sirf woh slope chahiye thi jahan hum abhi khade hain.
Khatre ka janam dikho: par hum already sachi curve se thoda neeche hain, to jo slope hum padhte hain woh galat point ki slope hai. Chhoti galtiyan agla step feed karti hain.
PICTURE. Tangent segments ki ek polyline (moodi hui line) — Euler path — smooth true curve ke saath saath chadh rahi hai. Gap bante dekho.

Step 5 — Local error: ek step ki galti hai
KYA. Ek step mein ki gayi galti (yeh maante hue ki hum curve par exactly shuru hue) woh term hai jo humne drop ki:
Notation ka matlab: "chhote ke liye ek constant times jaisa behave karta hai." aadha karo, aur yeh single-step galti chauthai ho jaati hai.
YEH KYUN MATTER KARTA HAI. Yahi tempting trap hai. bahut accha lagta hai. Lekin yeh ek step ki cost hai, aur hum bahut saare steps lete hain ek fixed distance cross karne ke liye.
PICTURE. Ek step mein zoom karo: "tangent kahan land karta hai" aur "curve actually kahan hai" ke beech ka vertical bracket LTE hai — ke proportional ek chhota sa sliver.

Step 6 — Global error: hum ki ek power kyun khote hain
KYA. Ek fixed endpoint tak pahunchne ke liye hume chahiye Jaise chhota hota hai, badhta hai (chhote steps → unki zyada tadaad). Galtiyan jodao:
- : ka yeh factor ki ek power kha jaata hai.
- Result: global error hai, nahi.
KYUN. Yehi poori wajah hai ki Euler ko first order kehte hain. Har step sasta hai (), lekin tum uske liye baar pay karte ho. ki ek power bachti hai.
PICTURE. Same interval mein do staircases: ek coarse (bada , kam steps, wide final gap) aur ek fine (chhota , zyada steps, narrow gap). Final gap ke proportion mein chhota hota hai — linearly, quadratically nahi.

Step 7 — Degenerate case: jab ek bada step overshoot kare
KYA. , , lo. True solution smoothly decay karti hai: . Lekin Euler deta hai: Yeh zero par crash karta hai aur wahan reh jaata hai. Sach mein .
KYUN. Start par tangent poore step ke liye curve se zyada steep hai, to use seedha follow karne se gentle decay bilkul overshoot ho jaati hai. Governing quantity hai jahan : yahan . Agar woh number se zyada ho jaaye, to numbers blow up ho jaate. Yahi Numerical Stability aur Backward Euler & Implicit Methods ka darwaaza hai.
PICTURE. Smooth decaying curve versus Euler point jo (0,0) par crash karta hai aur wahan reh jaata hai — tangent line seedhi true curve ke andar se guzar rahi hai.

Ek-picture summary
Ek canvas par sab kuch: slope field, jaana-maana start, tangent staircase jo hum chalte hain, true curve se badhta gap, aur label ki coarse step se wide gap milta hai () jabki fine step se narrow.

Recall Poore walkthrough ki Feynman retelling
Tum fog mein khoye ho aur sirf apne paon ke paas dekh sako ki path kidhar point kar raha hai. Tum aage ka path nahi dekh sakte. To tum us direction mein mukh karo aur ek chhota sa step lo (Step 2). Taylor's theorem bas woh honest bookkeeper hai jo whisper karta hai, "Seedha chalke tumne curve ko lagbhag miss kiya" (Step 3). Nayi jagah par tum phir neeche dekho, nayi direction mein mukh karo, phir step lo — yahi staircase hai (Step 4). Ek step ki error chhoti hai, jaise (Step 5). Lekin poori valley cross karne ke liye tum lagbhag steps lete ho, to total drift times hai, jo sirf hai (Step 6). Isliye apna step size aadha karne se final error bhi sirf aadhi hoti hai — Euler first order hai. Aur agar tum ek wildly bada step lete ho aise curve par jo tezi se ghoom raha hai, tum us se right past leap kar sakte ho aur kahin silly jagah land kar sakte ho (Step 7) — yeh warning hai ki step size stability bhi control karta hai.
Connections
- Taylor Series Expansion — Step 3 ke exact remainder ke peeche ka theorem
- Finite Difference Approximations — tangent step ko forward difference ki tarah padho
- Runge-Kutta Methods — error zyada khatam karne ke liye har step mein kaafi slopes sample karo
- Backward Euler & Implicit Methods — Step 7 ke overshoot ka ilaaj
- Numerical Stability — Step 7 se condition
- Lipschitz Continuity — Step 6 bound mein provide karta hai