4.8.23 · HinglishNumerical Methods

Modified Euler (Heun's method)

1,445 words7 min readRead in English

4.8.23 · Maths › Numerical Methods

, ko solve karna — lekin plain Euler se zyada smart tarike se.

The Big Picture


Deriving It From Scratch

Step 1 — Exact statement. ODE ko ek step pe integrate karo:

Yeh step kyun? Yeh exact hai (Fundamental Theorem of Calculus). Numerical methods mein poora khel yeh hai ki hum is integral ko kaise approximate karte hain.

Step 2 — Integration rule choose karo. Plain Euler left-rectangle rule use karta hai: . Yeh crude hai. Iske bajaye trapezoidal rule use karo:

Yeh step kyun? Trapezoid dono ends pe height ko average karta hai → yeh slopes ke straight-line average se match karta hai, exactly wahi jo hamari intuition maang rahi thi.

Step 3 — The catch. Hume chahiye lekin hum jaante nahi — yahi toh hum solve kar rahe hain! Toh hum isse ek saste Euler step se predict karte hain.


Why It's More Accurate (Order of the method)

Quick Taylor check: true value hai Heun ka average-slope formula aur terms ko exactly reproduce karta hai (isliye yeh order 2 hai); yeh pehli baar term pe disagree karta hai.

Figure — Modified Euler (Heun's method)

Worked Examples


Common Mistakes


Recall Feynman: ek 12-saal ke bache ko samjhao

Tum hiking kar rahe ho aur jaanna chahte ho ki ek step ke baad tum kahan honge. Plain Euler tumhare pair abhi trail jis direction mein point kar rahi hai usi direction mein set karta hai aur chalta hai — lekin trails curve karti hain, toh tum bhatak jaate ho. Heun ka trick: ek practice step lo taaki dekhein ki trail end pe kahan point karti hai, phir start-direction aur end-direction ke average se chalo. Commit karne se pehle aage dekhne se tum real path ke kaafi kareeb land karte ho.


Active Recall

Heun's method ke neeche kaun sa integration rule hai?
Trapezoidal rule jo pe apply hota hai.
Heun's method ka predictor likho.
(ek plain Euler step).
Heun's method ka corrector likho.
.
Predictor ki zaroorat kyun hai?
Trapezoid ko chahiye lekin unknown hai, toh hum isse cheap Euler se predict karte hain.
Heun's method ka global error order kya hai?
— second order; ko half karne se error ~4× kam hota hai.
Plain Euler ka global error order kya hai?
— first order.
Heun's method kis Runge–Kutta method ke equivalent hai?
RK2 (equal weights ke saath 2-stage Runge–Kutta).
mein kyun use karte hain na ki ?
Kyunki end-slope ko ki predicted end-value pe evaluate karna hota hai, start value pe nahi.
ke liye Heun se batao.
( ke saath).
Corrector ko iterate karne se kya milta hai?
Yeh implicit trapezoidal equation ko better solve karta hai, accuracy aur improve hoti hai.

Connections

  • Euler's Method — predictor step exactly plain Euler hai.
  • Trapezoidal Rule — corrector disguise mein yahi integration rule hai.
  • Runge-Kutta Methods — Heun = RK2; RK4 famous higher-order cousin hai.
  • Order of Accuracy and Step Size — kyun beats .
  • Predictor-Corrector Methods — Heun sabse simple example hai.
  • Taylor Series Methods — prove karne ke liye use hoti hai ki Heun second order hai.

Concept Map

integrate over step

approximate integral

left rectangle

trapezoidal rule

overshoots undershoots

needs unknown y1

cheap guess

predictor plus corrector

average of k1 and k2

matches h and h squared terms

halving h

ODE y'=f x,y

Exact integral form

Choose integration rule

Plain Euler start slope only

Average both end slopes

Systematic error

Predictor fixes it

Heun's method

2-stage Runge-Kutta RK2

Second order global error h squared

Cuts error 4x