4.6.2 · D3 · Maths › Ordinary Differential Equations › Direction fields and Euler's method — visual - numerical int
Yeh page parent topic ki drill sheet hai. Hum yahan Euler's method aur direction fields ke har tarah ke situation ko cover karenge — positive slopes, negative slopes, bilkul zero slope, upar bend karta curve, neeche bend karta curve, itna bada step jo tumhe galat answer deta hai, ek real word problem, aur ek exam-style trap.
Koi bhi symbol aane se pehle, ek reminder plain words mein:
Intuition Woh ek rule jisko sab kuch follow karta hai
Equation d x d y = f ( x , y ) ek slope machine hai. Tum ise ek point ( x , y ) (ek horizontal position x aur ek height y ) dete ho, yeh tumhe ek single number return karta hai: solution curve ki steepness ठीक wahan . Euler ki recipe hai: ek point pe kharo, machine se slope maango, us direction mein ek chhota seedha step lo, repeat karo.
Step, ek baar aur hamesha ke liye:
y n + 1 = y n + h f ( x n , y n ) , x n + 1 = x n + h .
Yahan h (step size ) woh horizontal distance hai jo tum har move mein chalte ho. "Nayi height = purani height + (kitna right chale) × (yahan kitna steep hai)."
Definition Convex vs concave — over/undershoot ke liye sirf yahi fact chahiye
Solution curve ka picture banao.
Yeh convex hai ("upar bend karta hai", bowl ki tarah paani rokta hai) jab iska second derivative y ′′ > 0 ho. Seedhi tangent line tab curve ke neeche hoti hai, isliye Euler ka step bahut neeche land karta hai — ek under -shoot.
Yeh concave hai ("neeche bend karta hai", dome ki tarah paani bahaata hai) jab y ′′ < 0 ho. Tab tangent line curve ke upar hoti hai, isliye Euler ka step bahut upar land karta hai — ek over -shoot.
y ′′ bas "slope ka slope" hai: agar slope right chalte hue badh raha hai, toh y ′′ > 0 (bowl); agar slope ghat raha hai, toh y ′′ < 0 (dome). Yeh ek picture yaad rakho — yahi neeche har over/undershoot decide karta hai.
Har Euler / direction-field problem neeche diye cells ka koi combination hota hai. Jo worked examples follow karte hain, unhe un cell(s) ke saath tag kiya gaya hai jo woh cover karte hain, taaki ant mein koi bhi cell blank na rahe .
#
Cell (case class)
Isme kya khaas hai
Covered by
A
Slope f > 0 (rising)
height har step mein upar jaati hai
Ex 1, Ex 4
B
Slope f < 0 (falling)
height har step mein neeche jaati hai
Ex 2, Ex 3
C
Slope f = 0 (flat point)
ek step jo sirf sideways move karta hai
Ex 3
D
Convex solution y ′′ > 0 (bowl)
Euler under -shoots (tangents curve ke neeche)
Ex 1, Ex 3, Ex 6
E
Concave solution y ′′ < 0 (dome)
Euler over -shoots (tangents curve ke upar)
Ex 2
F
Equilibrium / degenerate f ≡ 0 line
solution flat line hai, Euler hamesha wahan rukta hai
Ex 3b
G
Step-size effect (halve h )
error roughly half ho jaata hai
Ex 4
H
Big h overshoot / instability
Euler blow past karke oscillate kar sakta hai
Ex 5
I
Real-world word problem
f ka naam, units, answer interpret karna
Ex 6
J
Exam twist (backward vs forward, sign trap)
woh classic marks-khoone-wali mistakes
Ex 7
d x d y = x + y , y ( 0 ) = 1 , h = 0.5 , y ( 1 ) nikalo.
Forecast: Slope f = x + y start pe 0 + 1 = 1 (positive) hai aur jaise-jaise x aur y dono badhte hain yeh sirf badhta jaata hai — slope increasing hai, isliye y ′′ > 0 : ek bowl (convex). Compute karne se pehle: kya Euler true curve ke upar ya neeche land karega? Abhi guess karo.
Step 1 (n = 0 ): start pe slope machine read karo.
f ( 0 , 1 ) = 0 + 1 = 1.
Yeh step kyun? Euler hamesha slope ko us point pe evaluate karta hai jahan woh khara hai — step ke left end pe.
Step lo:
y 1 = 1 + 0.5 ⋅ 1 = 1.5 , x 1 = 0.5.
Yeh step kyun? rise = run × slope = 0.5 × 1 = 0.5 , isliye height 1 se 1.5 tak chadhi.
Step 2 (n = 1 ): machine ko naye point pe re-read karo.
f ( 0.5 , 1.5 ) = 0.5 + 1.5 = 2.
y 2 = 1.5 + 0.5 ⋅ 2 = 2.5 , x 2 = 1.0.
Yeh step kyun? Slope ko dobara compute karna padega — yeh 1 se 2 ho gayi kyunki hum move kiye.
Answer: y ( 1 ) ≈ 2.5 .
Verify: Exact solution hai y = 2 e x − x − 1 (yeh ek separable-adjacent linear ODE hai — Separable First-Order ODEs techniques se compare karo). Phir y ( 1 ) = 2 e − 2 ≈ 3.44 . Euler ne 2.5 diya, ek under -shoot — forecast se match karta hai, kyunki bowl ke liye (y ′′ > 0 ) har seedha tangent step true curve ke neeche hota hai. Figure dekho: har red step black curve ke neeche end hota hai.
Figure 1 — Euler ke seedhe steps (red) true convex "bowl" curve ke neeche hain: ek undershoot.
Intuition Example se pehle — dome aur bowl mein farq kaise batayein
Learners aksar ek "decay" equation chunte hain dome expect karke aur dhoka khate hain. Obvious guesses ke liye do quick tests fail hote hain:
y ′ = y (rises): iska slope-of-slope y ′′ = 2 1 > 0 hai — ek bowl , dome nahi. Slope badhta rehta hai.
y ′ = − y (falls): iska slope-of-slope bhi y ′′ = + 2 1 > 0 hai — phir bhi bowl . Falling curves neeche se flatten ho sakti hain, jo convex hai.
Ek reliable criterion: ek dome ke liye slope genuinely decreasing hona chahiye (y ′′ < 0 ). Yeh clean example karta hai y ′ = 2 x + 1 1 , jiska solution y = x + 1 ka y ′′ = − 4 1 ( x + 1 ) − 3/2 < 0 hai. Isliye badhna lekin dhire-dhire concave ka recipe hai.
d x d y = 2 x + 1 1 , y ( 0 ) = 1 , h = 1 , y ( 3 ) nikalo. (Ek genuine dome, Cell E.)
Forecast: Slope 2 1 1 = 0.5 se start hoti hai aur x badhne se ghatti hai — ek decreasing slope, isliye y ′′ < 0 : ek dome (concave). Compute karne se pehle: kya Euler true curve ke upar ya neeche land karega? Abhi guess karo.
Step 1 (n = 0 , x = 0 pe): slope sirf x pe depend karti hai.
f ( 0 ) = 2 1 1 = 0.5.
y 1 = 1 + 1 ⋅ 0.5 = 1.5 , x 1 = 1.
Yeh step kyun? rise = run × slope = 1 × 0.5 = 0.5 .
Step 2 (n = 1 , x = 1 pe):
f ( 1 ) = 2 2 1 ≈ 0.3536.
y 2 = 1.5 + 1 ⋅ 0.3536 = 1.8536 , x 2 = 2.
Yeh step kyun? Slope pehle se shallower hai (0.354 < 0.5 ) — slope ghatt raha hai, dome ka signature (y ′′ < 0 ).
Step 3 (n = 2 , x = 2 pe):
f ( 2 ) = 2 3 1 ≈ 0.2887.
y 3 = 1.8536 + 1 ⋅ 0.2887 = 2.1423 , x 3 = 3.
Answer: y ( 3 ) ≈ 2.142 .
Verify: Exact y = x + 1 , isliye y ( 3 ) = 4 = 2 . Euler ne 2.142 diya — ek over -shoot, bilkul waise jaisa dome (y ′′ < 0 ) predict karta hai: har tangent line true curve ke upar hoti hai, isliye har step bahut upar land karta hai. Yeh Cell E sahi se done. Sanity: slopes 0.5 → 0.354 → 0.289 tak gire, confirm karta hai curve puri tarah neeche bend ho raha tha.
Figure 2 — Concave "dome" curve ke liye red Euler steps true curve ke upar ride karte hain: ek overshoot.
Worked example Part (a) — ek
falling, convex decay: d x d y = − y , y ( 0 ) = 2 , h = 0.5 , y ( 1 ) nikalo.
Forecast: f = − y < 0 y > 0 ke liye (Cell B, falling). Bowl hai ya dome? Slope-of-slope: y ′′ = d x d ( − y ) = − y ′ = − ( − y ) = + y > 0 — ek bowl (convex). Isliye predict karo ek under -shoot bhale hi curve falling ho: "falling" over/undershoot decide nahi karta; y ′′ karta hai.
Step 1 (n = 0 ):
f ( 0 , 2 ) = − 2. y 1 = 2 + 0.5 ( − 2 ) = 1 , x 1 = 0.5.
Yeh step kyun? Negative slope ⇒ step neeche jaata hai: rise = 0.5 × ( − 2 ) = − 1 .
Step 2 (n = 1 ):
f ( 0.5 , 1 ) = − 1. y 2 = 1 + 0.5 ( − 1 ) = 0.5 , x 2 = 1.0.
Yeh step kyun? Slope neeche wale point pe recompute hui; yeh shallower hai (− 1 vs − 2 ) — slope zero ki taraf upar ja raha hai, yaani increasing, confirm karta hai y ′′ > 0 .
Answer: y ( 1 ) ≈ 0.5 .
Verify: Exact y = 2 e − x , y ( 1 ) = 2 e − 1 ≈ 0.736 . Euler ne 0.5 diya — ek under -shoot, bowl prediction (y ′′ = 2 e − x > 0 ) se match karta hai. Units/sanity: y positive raha aur ghata, jaise kisi bhi decay mein hona chahiye. (Yeh woh case hai jo logon ko trip karta hai: falling lekin convex .)
Worked example Part (b) — Cell C + F:
equilibrium line pe zero slope. d x d y = y ( 1 − y ) , y ( 0 ) = 1 , h = 0.5 , y ( 1.5 ) nikalo.
Forecast: f = y ( 1 − y ) = 0 exactly y = 1 pe. y = 1 pe machine zero return karti hai — ek horizontal dash. Kya hoga agar Euler us flat line pe start kare?
Step 1 (n = 0 ):
f ( x , 1 ) = 1 ( 1 − 1 ) = 0. y 1 = 1 + 0.5 ⋅ 0 = 1 , x 1 = 0.5.
Yeh step kyun? Slope exactly 0 ⇒ step sirf sideways hai — height unchanged.
Steps 2 & 3: ab bhi y = 1 hai, isliye f = 0 phir: y 2 = 1 , x 2 = 1.0 ; y 3 = 1 , x 3 = 1.5.
Yeh step kyun? y = 1 ek equilibrium hai (ek degenerate case: f ≡ 0 ek puri horizontal line ke saath). Euler isme phansa rehta hai hamesha ke liye — jo exactly sahi hai.
Answer: y ( 1.5 ) = 1 (flat).
Verify: y ( 0 ) = 1 ke saath exact solution constant y ≡ 1 hai (ek equilibrium stability analysis mein padha jata hai). Euler ise perfectly reproduce karta hai: zero slope ⇒ zero rise. Direction field mein yeh height y = 1 pe horizontal dashes ki row hai; nearby curves iske toward draw hoti hain. Figure dekho: red equilibrium line bilkul flat hai.
Figure 3 — Logistic direction field: red line y = 1 pe har dash horizontal hai, isliye Euler kabhi use nahi chhodta.
Worked example Example 1 jaisa hi (
y ′ = x + y , y ( 0 ) = 1 ) lekin h = 0.25 , y ( 1 ) tak char steps.
Forecast: Example 1 mein h = 0.5 se 2.5 mila; truth hai 3.44 . Euler ek first-order method hai — plain words mein, iska matlab hai total error step h ke proportion mein ghatta hai : h halve karo, aur error roughly half ho jaata hai (quarter nahi — proportion, square nahi). Isliye half step se hum expect karte hain answer 3.44 ke kareeb (around 2.9 ). Compute karne se pehle guess karo.
Step 1 (n = 0 ): ( 0 , 1.0000 ) pe, slope f = 0 + 1 = 1.0000 ; step y 1 = 1.0000 + 0.25 ( 1.0000 ) = 1.2500 , x 1 = 0.25 .
Yeh step kyun? Slope start point pe read karo aur run×slope = 0.25 × 1 = 0.25 se rise lo.
Step 2 (n = 1 ): ( 0.25 , 1.2500 ) pe, slope f = 0.25 + 1.25 = 1.5000 ; step y 2 = 1.2500 + 0.25 ( 1.5000 ) = 1.6250 , x 2 = 0.50 .
Yeh step kyun? Slope naye point pe recompute ki — yeh 1 se 1.5 tak baadhi kyunki x aur y dono bade.
Step 3 (n = 2 ): ( 0.50 , 1.6250 ) pe, slope f = 0.50 + 1.625 = 2.1250 ; step y 3 = 1.6250 + 0.25 ( 2.1250 ) = 2.1563 , x 3 = 0.75 .
Yeh step kyun? Phir se current spot pe fresh slope; aur bhi steep, isliye rise per step badhti rehti hai.
Step 4 (n = 3 ): ( 0.75 , 2.1563 ) pe, slope f = 0.75 + 2.1563 = 2.9063 ; step y 4 = 2.1563 + 0.25 ( 2.9063 ) = 2.8828 , x 4 = 1.00 .
Yeh step kyun? Final slope wahan read ki jahan hum ab khade hain; ek aur run×slope humein x = 1 pe land karta hai.
Table ki tarah collect kiya:
n
x n
y n
f = x n + y n
y n + 1 = y n + 0.25 f
0
0.00
1.0000
1.0000
1.2500
1
0.25
1.2500
1.5000
1.6250
2
0.50
1.6250
2.1250
2.1563
3
0.75
2.1563
2.9063
2.8828
Answer: y ( 1 ) ≈ 2.883 .
Verify: Truth hai 3.44 . Errors: h = 0.5 ne error 3.44 − 2.50 = 0.94 diya; h = 0.25 ne 3.44 − 2.88 = 0.56 . Ratio 0.56/0.94 ≈ 0.60 — exactly 2 1 nahi kyunki "error proportional to h " sirf leading behaviour hai jo exact tab banta hai jab h bahut chhota ho; yahan h abhi bhi kaafi bada hai. Lekin error clearly ghata chhote h se, jaisa first-order accuracy ka waada hai. Gap bahut tezi se close karne ke liye tum RK4 switch karoge, jiska error h 4 ki tarah ghatta hai. Do staircases compare karta figure dekho.
Figure 4 — Do Euler staircases: finer step (red) true curve ke saath coarse wale se zyada closely hugs karta hai.
d x d y = − 5 y , y ( 0 ) = 1 . Char steps ke liye h = 0.5 try karo, phir explain karo.
Forecast: True solution y = e − 5 x smoothly 0 ki taraf decay karta hai. Lekin slope steep hai (factor 5 ). Ek fast-decaying curve ko ek bada step kya kar sakta hai? Guess karo: smooth decay, ya wild oscillation?
Steps y n + 1 = y n + h ( − 5 y n ) = y n ( 1 − 5 h ) = y n ( 1 − 2.5 ) = − 1.5 y n use karke:
y 1 = − 1.5 , y 2 = 2.25 , y 3 = − 3.375 , y 4 = 5.0625.
Yeh step kyun? Amplification factor 1 − 5 h = 1 − 2.5 = − 1.5 hai. Iska size ∣ − 1.5∣ = 1.5 > 1 , isliye har step magnify karta hai aur sign flip karta hai — numbers explode aur oscillate karte hain.
Answer: Euler { − 1.5 , 2.25 , − 3.375 , 5.0625 } deta hai — true y ( 0.5 ) = e − 2.5 ≈ 0.082 ke comparison mein bilkul bakwaas.
Verify: Explicit Euler ke liye y ′ = λ y pe stability rule hai ∣1 + hλ ∣ ≤ 1 . Yahan λ = − 5 , isliye hamein ∣1 − 5 h ∣ ≤ 1 chahiye, yaani 0 ≤ h ≤ 0.4 . Hamara h = 0.5 ise violate karta hai, isliye blow-up. h = 0.1 se dobara karo: factor = 1 − 0.5 = 0.5 , jisse y 1 = 0.5 , y 2 = 0.25 , ⋯ → 0 — well-behaved. Yeh exactly Stability and Stiff Equations ki "stiff equation" warning hai: chhota h sirf accuracy ke liye nahi, kabhi kabhi yeh survival ke liye hai. Figure dekho: exploding red zig-zag vs tame decay.
Figure 5 — Oversized step se red Euler iterates zig-zag karte hain aur blow up karte hain, jabki true solution quietly decay karta hai.
Common mistake "Zyada steps ka matlab hamesha correct answer hai."
Kyun sahi lagta hai: chhota h Examples 1 aur 4 mein helpful tha.
Fix: chhota h accuracy mein help karta hai, lekin ek threshold hai (h ≤ 0.4 upar) jiske neeche method stable hai aur jiske upar yeh chahe kuch bhi ho diverge karta hai. Accuracy aur stability do alag requirements hain.
Definition Yahan independent variable ke liye update rule
Independent variable ab time t (minutes) hai, isliye marching rule padhta hai
t n + 1 = t n + h , T n + 1 = T n + h f ( t n , T n ) .
Yeh exactly pehle wala rule hai jisme x ko t se aur y ko T (temperature) se rename kiya gaya hai. t 0 = 0 se start karte hue, ek step t 1 = t 0 + h = 1 pe land karta hai, agla t 2 = 2 pe, aur aise hi aage.
Worked example Ek cup of coffee Newton's law se cool hoti hai: temperature
T (°C) d t d T = − k ( T − 20 ) follow karta hai jisme k = 0.2 min − 1 , room 20° C pe, T ( 0 ) = 90° C se start. h = 1 min use karke 2 minutes baad T estimate karo.
Forecast: Coffee room temperature se bahut upar hai, isliye pehle tezi se cool honi chahiye, phir slow (slope ∝ gap T − 20 ). 2 minutes ki cooling mein zyada giregi ya thodi? Ek range guess karo.
f ka naam: yahan f ( t , T ) = − 0.2 ( T − 20 ) . Units check: [ k ] = 1/ min , [ T − 20 ] = ° C, isliye [ f ] = ° C / min — ek genuine rate of temperature change. Achha.
Step 1 (n = 0 , t 0 = 0 , T 0 = 90 pe):
f = − 0.2 ( 90 − 20 ) = − 0.2 ⋅ 70 = − 14 ° C/min .
T 1 = 90 + 1 ⋅ ( − 14 ) = 76° C , t 1 = t 0 + h = 1.
Yeh step kyun? rise = run × rate = 1 min × ( − 14°/ min ) = − 14° .
Step 2 (n = 1 , t 1 = 1 , T 1 = 76 pe):
f = − 0.2 ( 76 − 20 ) = − 0.2 ⋅ 56 = − 11.2° C/min .
T 2 = 76 + 1 ⋅ ( − 11.2 ) = 64.8° C , t 2 = t 1 + h = 2.
Yeh step kyun? Gap ghata, isliye cooling rate bhi ghati (− 11.2 vs − 14 ) — woh "slow down" behaviour jo humne forecast kiya tha.
Answer: T ( 2 ) ≈ 64.8° C.
Verify: Exact solution T = 20 + 70 e − 0.2 t , isliye T ( 2 ) = 20 + 70 e − 0.4 ≈ 20 + 70 ( 0.6703 ) = 66.9° C. Euler ka 64.8 true 66.9 ko under -shoot karta hai: cooling curve T mein ek bowl hai (T ′′ > 0 ), tangents neeche hoti hain, Cell D se consistent. Physically estimate sahi lagta hai (abhi bhi hot coffee), aur error ki direction exactly convexity ke predict kiye hue hai.
d x d y = 2 x − y , y ( 1 ) = 3 . Ek exam ek forward-Euler step h = − 0.5 ke saath y ( 0.5 ) estimate karne ke liye poochta hai. (Note karo negative step — hum left chalte hain.)
Forecast: Negative h ka matlab hai chhote x ki taraf move karna. Formula unchanged hai; trap hai (a) galat point ka slope use karna, aur (b) h ke sign ko galat handle karna. Dono watch karo.
Step 1 (n = 0 , x 0 = 1 , y 0 = 3 pe):
f ( 1 , 3 ) = 2 ⋅ 1 − 3 = − 1.
Yeh step kyun? Explicit (forward) Euler us point pe slope use karta hai jahan tum chhod rahe ho , ( x 0 , y 0 ) — destination pe nahi . Destination point use karna backward/implicit Euler hoga, ek alag method (aur yahan algebra ke bina solve nahi hoga).
y 1 = y 0 + h f = 3 + ( − 0.5 ) ( − 1 ) = 3 + 0.5 = 3.5 , x 1 = 1 + ( − 0.5 ) = 0.5.
Yeh step kyun? Do negatives multiply hokar plus bante hain: downward slope par left chalte hue y upar jaata hai. Dono sign flips ko respect karna padega.
Answer: y ( 0.5 ) ≈ 3.5 .
Verify: y ′ = 2 x − y , y ( 1 ) = 3 ka exact solution y = 2 x − 2 + 3 e 1 − x hai. Check: x = 1 pe, y = 2 − 2 + 3 = 3 ✓. x = 0.5 pe: y = 1 − 2 + 3 e 0.5 = − 1 + 3 ( 1.6487 ) = 3.946 . Euler ka ek bada backward step 3.5 diya — sahi ballpark, aur yeh correctly upar move kiya negative slope ke bawajood, kyunki h < 0 . Do classic mark-losers (destination-slope trap, h ka sign) dono handle ho gaye.
Recall Kis cell ne under/overshoot cause kiya?
f ka sign (rising/falling) direction decide karta hai; y ′′ ka sign (bowl/dome) over- ya under-shoot decide karta hai. ::: Convex y ′′ > 0 (bowl) ⇒ tangents neeche ⇒ Euler undershoots; concave y ′′ < 0 (dome) ⇒ tangents upar ⇒ Euler overshoots.
Recall
y ′ = λ y ke liye stability threshold?
Explicit Euler ke blow up na karne ke liye h kya satisfy karna chahiye? ::: ∣1 + hλ ∣ ≤ 1 ; λ = − 5 ke liye yeh h ≤ 0.4 chahiye.
Recall Negative step size — kya badalta hai?
Kya update formula tab badalta hai jab h < 0 ho? ::: Nahi — same formula y n + 1 = y n + h f ( x n , y n ) ; negative h automatically left chalti hai.
Mnemonic Two-sign checklist
"Direction from f , curvature from y ′′ ." Ek batata hai up/down (f ka sign), doosra batata hai Euler ka jhooth: bowl ⇒ undershoot, dome ⇒ overshoot.