4.8.24 · D4 · HinglishNumerical Methods

ExercisesRunge-Kutta 4th order (RK4) — derivation

2,464 words11 min read↑ Read in English

4.8.24 · D4 · Maths › Numerical Methods › Runge-Kutta 4th order (RK4) — derivation

Yeh page ek self-testing ladder hai. Har problem ko uski solution kholne se pehle khud try karo. Levels "kya tum RK4 pehchaan sakte ho?" se shuru hokar "kya tum iske saath cheezein build aur prove kar sakte ho?" tak jaate hain. Yahan use hue har symbol ki definition parent note RK4 derivation mein hai — use reference ke liye khula rakho.

Figure — Runge-Kutta 4th order (RK4) — derivation

Level 1 — Recognition

Goal: kya tum recipe padh ke uske parts identify kar sakte ho?

L1.1

RK4 recipe mein, kis -value par evaluate hota hai, aur yeh kaun si previous slope reuse karta hai?

Recall Solution

. Toh yeh midpoint par sample hota hai, aur yeh reuse karta hai (ek refined midpoint slope). Figure s01 dekho: dono amber arrows ( aur ) midpoint par ek hi vertical dashed line share karte hain; sirf estimated ki height alag hoti hai.

L1.2

Ek student likhta hai jahan use kar raha hai. Kya yahan extra sahi hai, ya hona chahiye?

Recall Solution

hona chahiye, na ki . Hamare convention mein har mein ka ek factor pehle se hai (kyunki ). likhne se se do baar multiply ho jaata, jo step deta — galat dimensions. wali form tabhi correct hai jab doosre convention mein ek pure slope ho (koi nahi).


Level 2 — Application

Goal: real numbers par recipe chalao.

L2.1

, ko use karke ek step se nikalo. (Parent ke example se alag step size hai.)

Recall Solution

Yahan , , , .

  • — left edge par slope.
  • — midpoint, use karke.
  • — refined midpoint, use karke.
  • — right edge, poora use karke. Exact: . Error .

L2.2

, ko se ek step mein tak solve karo. (Note: mein koi -dependence nahi hai, isliye saare stages trivially ek hi shift use karte hain.)

Recall Solution

, , .

  • .
  • .
  • .
  • . Bracket check karte hain: , aur . Exact: . Yahan step ek fast-decaying equation ke liye bada hai, isliye error () dikh raha hai — ek reminder ki "4th order" chhote ke baare mein ek statement hai.

Level 3 — Analysis

Goal: sirf numbers nahi, behaviour ke baare mein reason karo.

L3.1

ke liye (right-hand side sirf par depend karta hai), dikhao ki RK4 update ke liye Simpson's rule mein collapse ho jaata hai.

Recall Solution

Jab sirf par depend karta hai, toh -arguments irrelevant hain, isliye: Update mein substitute karke: Yeh last line bilkul Simpson's rule hai par integral ke liye. Toh RK4 hai hi Simpson's rule, -dependence allow karne ke liye generalize kiya gaya. Isliye weights hain: dono midpoint samples Simpson ke single "" mein merge ho jaate hain.

L3.2

RK4 ka local (per-step) error hai. Explain karo ki fixed interval par global error sirf kyun hota hai.

Recall Solution

Fixed length cross karne ke liye tum steps lete ho — yaani .

"Har step add karta hai" ka matlab. Ek single step par method ka answer true curve se (kuch constant) ki bounded amount se differ karta hai. Uss constant ko kaho: yeh package karta hai solution kitna curvy hai (roughly, interval par uski 5th derivative ka size) aur ka fixed numerical factor jo RK4 chhod jaata hai. ke chhote hone par shrink nahi karta — yeh problem par depend karta hai, step par nahi — isliye ek step ke error ki poori -dependence mein hai. Isliye hum likhte hain "local error ".

Errors add kyun hote hain (error propagation). Calculation ko ek relay ki tarah socho: har step previous step ke (pehle se thode galat) answer se start hota hai aur apni nayi galti add karta hai. Toh har step par do cheezein hoti hain — (i) ek nayi error commit hoti hai, aur (ii) pehle se maujood errors aage carry hote hain. Ek well-behaved (stable) equation ke liye carried-forward errors blow up nahi hote; woh zyada se zyada bounded factor se badhte hain. Us case mein total sirf fresh contributions ko sum karne se dominate hota hai, ek per step: ki ek power steps ki badhti number se "khaai" jaati hai: jab chhota hota hai tum zyada steps lete ho, isliye zyada chhoti errors pile up hoti hain, ka ek factor cancel ho jaata hai. Dekho Local vs Global Truncation Error. Isliye RK4 ko 4th order kehte hain (global statement), chahye har step th-order accurate kyun na ho.


Level 4 — Synthesis

Goal: RK4 ko doosre ideas ke saath combine karo aur ek se zyada step chalao.

L4.1

, ko ke do RK4 steps use karke estimate karo. Single-step-of- result ( parent se) aur exact se compare karo.

Recall Solution

, .

Step 1 ():

Step 2 ():

  • Bracket sum , toh . Exact ; error . Single bade step ne diya (error ). Step half karne se error roughly se cut hua — yeh 4th-order method ki pehchaan hai.

L4.2

L4.1 ke observation ko use karke, bina compute kiye predict karo ki agar same problem ke liye ke chaar steps use karo toh error kya hoga. Reasoning batao.

Recall Solution

Global error . se jaane par half hota hai, toh error se scale hota hai. Toh hum predict karte hain . (Direct computation mein error aata hai — rule kaam karta hai.)


Level 5 — Mastery

Goal: prove karo aur build karo.

L5.1

Algebraically dikhao ki , par size ke single step ke saath RK4 deta hai yaani ke pehle paanch terms. (Yeh direct proof hai ki RK4 Taylor se tak match karta hai.)

Recall Solution

, ke saath:

Ab weights se combine karo: ki power se collect karo:

  • : → contributes .
  • : → contributes .
  • : → contributes .
  • : → contributes .

Toh . se divide karo: Yeh exactly ke pehle paanch terms hain. Pehla term jo RK4 miss karta hai woh hai — confirm karta hai local error . Dekho Taylor Series Methods.

L5.2

Coupled system ko ke saath ek RK4 step use karke estimate karo. (Yeh hai, simple harmonic motion; exact answer hai.) Vector RK4 use karo: aur maano.

Recall Solution

Vector RK4 bilkul scalar RK4 jaisa hai, bas componentwise apply hota hai. , , lo.

: , toh .

: argument ; ; toh .

: argument ; ; toh .

: argument ; ; toh .

Componentwise combine karo, :

  • :
  • :

Toh . Exact: . Dono lagbhag tak match karte hain — RK4 systems ko same 4th-order accuracy ke saath handle karta hai, koi nayi machinery nahi chahiye.


Connections

Active Recall