4.8.25 · D5 · HinglishNumerical Methods

Question bankAdaptive step-size — RK45, error control

2,491 words11 min read↑ Read in English

4.8.25 · D5 · Maths › Numerical Methods › Adaptive step-size — RK45, error control

Before the traps, a one-line memory refresh so the notation below is never used cold:

Recall Is page par use hone waale symbols

= step size · = estimated local error · = the budget · = order of the controlled result (4 for RK45) · = slope samples (function evaluations) · = safety factor · = clamps on how much may change.


Constant actually kya hai

Neeche ke har trap ka aadhar model hai. Students ko ek mystery letter maante hain, toh pehle isko pin down karte hain — ek picture ke saath.

Figure — Adaptive step-size — RK45, error control

Figure log axes par ko ke against plot karta hai. Kyunki hai, logs lene par ek straight line of slope milti hai; us line ki height (uska intercept) hi hai. Ek curvy region poori line ko upar utha deta hai — same slope, bada — toh tolerance dashed line ke neeche aane ke liye ek chota chahiye.


Step controller ek picture mein

Figure — Adaptive step-size — RK45, error control

True ya false — justify karo

Har item: true/false decide karo, phir ek sentence ka reason do. Reason hi answer hai.

Error estimate do extra function evaluations ki cost lagata hai.
False. aur dono same stages ke weighted sums hain, toh estimate har expensive -call ko reuse karta hai aur sirf ek cheap dot product add karta hai.
RK45 ke liye step-update exponent hai kyunki accepted result 4th-order hai.
False. Order- method ka local error per step ki tarah scale karta hai, toh isko invert karne wala exponent hai, nahi.
Agar ek step reject ho jaaye toh tumhe aage advance karna chahiye lekin naye chote ke saath.
False. Rejection ka matlab hai trustworthy nahi hai; tumhe same par rehna hoga aur chote ke saath step recompute karna hoga.
Tolerance ko chota (stricter) banana chosen steps ko chota banana tend karta hai.
True. Kyunki hai, chote ke saath enforce karne ke liye ek chota chahiye, toh solver zyada, tinier steps leta hai.
Safety factor isliye exist karta hai taaki solver faster run kare.
False. predicted error ko tol se thoda neeche aim karta hai; kyunki khud sirf ek estimate hai, isse retried step pehli try mein pass hone ki probability badh jaati hai — reliability ke liye, raw speed ke liye nahi.
Sirf absolute tolerance use karna hamesha theek hai.
False. Agar bada ho jaaye, ek fixed ek impossibly strict relative demand ban jaata hai; mix karna budget ko solution size ke saath scale karne deta hai.
ko raw factor se grow karna hamesha safe hai.
False. error model sirf locally trusted hai; ek huge jump wahan land kar sakta hai jahan model valid hi nahi tha, isliye clamp (≈5) growth ko cap karta hai.
us 5th-order answer ke error ko estimate karta hai jiske saath hum actually advance karte hain.
False. 4th-order result ke error ko estimate karta hai; ke saath advance karte hue iska use karna (local extrapolation) deliberately conservative hai — hum worse answer ko bound karte hain.
Two RK methods of different order must share the same number of stages to be an embedded pair.
True. "Embedded" ka matlab hai ki dono identical stage vector share karte hain; different weight rows same samples par act karte hain, aur yahi cheez error estimate ko free banati hai.
Agar exactly ho, toh raw update factor ke barabar hoga aur same rahega.
True. ; safety factor ise phir thoda 1 se neeche nudge karta hai, toh safe rehne ke liye thoda sa shrink hota hai.
Constant ek fixed number hai jo tum RK45 ke liye ek baar look up kar sakte ho.
False. mein current point par solution ke apne high derivatives hote hain, isliye yeh har step par change hota hai — curvy regions mein bada, flat regions mein chota; yahi variability poora reason hai ki har step par error re-estimate karte hain.
Negative step size hamesha ek bug hai.
False. Time mein backwards integrate karna (baad ke se pehle wale tak) deliberately use karta hai; controller tab par kaam karta hai, sign/direction preserve karte hue magnitude ko clamps ke andar rakhta hai.

Error dhundho

Har line mein ek flawed statement ya reasoning step hai. Kya galat hai yeh batao.

"Step pass ho gaya kyunki ."
Inequality ulti hai: step tab hi accept hota hai jab . Yahaan tol se zyada hai, isliye ise reject karna chahiye.
"Reject karne ke baad, hum ke saath recompute karte hain."
Ratio ulta hai. Yeh hona chahiye; kyunki rejection par hai, isse ek factor milta hai aur sahi se shrink hota hai.
"Order-4 method ka local error hai."
Ek power kam hai: order- method ka local (per-step) error hai; figure kaafi steps mein accumulated global error describe karta hai.
"Hum clamp drop kar sakte hain; sirf matter karta hai."
Dono clamps matter karte hain. ek bad step ke baad ko bahut violently collapse hone se rokta hai, ek single hard point par needless stalling avoid karta hai.
"Kyunki zyada accurate hai, uske error ko measure karta hai."
Difference 4th-order error measure karta hai, 5th ka nahi; subtraction ka sign irrelevant hai kyunki hum norm lete hain, lekin interpretation (kiska error hai) hi trap hai.
"Error ko half karne ke liye, step size half karo."
Halving se local error se cut hota hai, 2 se nahi, kyunki local error hai. Step aur error ke beech relation far from linear hai.
"Ek embedded pair ko har order ke liye -evaluations ka alag set chahiye."
Nahi — dono orders mein share karna hi poora point hai; alag evaluations "free estimate" advantage ko defeat kar denge.
"Backwards integrate karte waqt hum accept test ko mein flip kar dena chahiye."
Galat — accept test hamesha magnitudes compare karta hai; backward integration ke liye sirf ka sign flip hota hai, error logic nahi.

Why questions

Har ek ka answer ek ya do reasoning sentences mein do.

Ek bahut accurate solution ki jagah har step par do solutions kyun compute karte hain?
Ek akela number apne khud ke error ka koi self-knowledge nahi deta; do orders ka difference ek cheap, on-the-fly error meter hai jo step control drive karta hai.
Constant final step-update formula mein kabhi appear kyun nahi karta?
Hum aur likhte hain phir dono equations ko divide karte hain, unknown cancel ho jaata hai aur sirf step sizes ka ratio bachta hai.
Controller local error regulate karta hai, global error kyun nahi?
Controller ek waqt mein sirf ek step observe kar sakta hai; woh har step ke local error ko budget ke andar rakhta hai, is par trust karte hue ki kaafi controlled local errors global error ko acceptable rakhenge.
Exponent ki jagah par kyun depend karta hai?
Kyunki jo quantity tol ki taraf drive ho rahi hai woh leading local error term hai; power relation ko invert karne ke liye root chahiye.
RK45 jaisa ek explicit adaptive method stiff ODEs par struggle kyun karta hai?
Wahan stability, accuracy nahi, chote steps force karti hai; controller ko stable rehne ke liye shrink karta rehta hai, chahe solution smooth ho, isliye adaptivity ek unstable explicit scheme ko rescue nahi kar sakti. Dekho Stiff ODEs and Stability.
Leading error term ki ek single power ke proportional kyun hoti hai?
Yeh true vs numerical step ke Taylor Series Expansion ke pehle uncancelled term se aata hai; saare lower-order terms design se matched hain, ek dominant term bachta hai.
Predicted error ko exactly tol par aim karne ki jagah tol se neeche aim kyun karte hain?
apni uncertainty ke saath ek estimate hai; exactly tol target karne se actual error budget se upar land kar sakta hai, ek wasteful re-rejection force karta hai.
Solver ko ek explicit abort rule ki zaroorat kyun hai, kyun nahi bas shrink karta rahe?
Agar ek genuine singularity ya stiffness rejections force karti rehti hai, zero ki taraf march karta hai aur ek aise value tak underflow ho jaayega jahan floating point mein ho — koi progress possible nahi, toh solver ko loop forever karne ki jagah failure report karni chahiye.

Edge cases

Is topic ke invite kiye hue boundary aur degenerate scenarios.

(dono orders machine precision tak agree karte hain) — formula kya karta hai?
Ratio ho jaata hai, toh raw growth factor blow up karta hai; clamp (≈5) ise pakad leta hai aur zyada se zyada 5× grow karta hai, step safe rehta hai.
ek solution zero-crossing ke paas — kaun sa tolerance term tumhe bachata hai?
Relative part wahaan zero ki taraf collapse hota hai, toh floor provide karta hai aur budget kabhi zero nahi hota (jo impossible perfection demand karta).
Solution ek straight line hai (, no curvature) — ka kya hota hai?
Higher-order terms vanish ho jaate hain, toh se har step tiny rehta hai, aur controller repeatedly clamp hit karta hai, ko jitni permission hai utna fast grow karta hai.
Ek hi par do consecutive rejections — kya algorithm broken hai?
Nahi; har rejection ko aur shrink karta hai (per attempt se bounded) jab tak predicted error finally tol ke andar na fit ho jaaye, phir step accept hota hai aur aage badhta hai.
baar baar hit karta hai aur zero ki taraf shrink hota ja raha hai — solver ko kab give up karna chahiye?
Jab ek floor se neeche gir jaaye (jaise ya floating point mein se indistinguishable ho), tab aur shrinking se progress nahi ho sakti, toh solver abort karta hai aur "step size too small" report karta hai, loop forever karne ki jagah.
se tak backwards integrate karna — controller mein kya change hota hai?
ka sign negative ho jaata hai time leftwards move karne ke liye, lekin controller regulate karta hai: accept test , clamps , aur update factor sab magnitude par act karte hain, toh direction poore waqt preserve rehti hai.
Ek otherwise flat solution mein ek single ultra-sharp spike — adaptivity kaise respond karta hai?
Local spike par jump karta hai, toh solver flat region mein tezi se race karta hai ( chota, bade steps), phir automatically spike ke across tiny steps par brake karta hai jahan huge hai, apne function evaluations wahan spend karta hai jahan curvature actually demand karti hai.
Agar exactly set ho to kya hoga?
Controller tol exactly hit karne ki koshish karta; kyunki kabhi kabhi under-predict karta hai, zyada steps budget se thoda upar land karte aur reject ho jaate, kaam waste hota — isiliye .

Connections

  • Adaptive step-size — RK45, error control — parent note jise ye traps drill karte hain.
  • Order of a Numerical Method fix karta hai jo exponent set karta hai.
  • Local vs Global Truncation Error — in half se zyada traps ke peeche local/global distinction.
  • Taylor Series Expansion — leading term aur constant ka source.
  • Stiff ODEs and Stability — kyun adaptivity akele stiffness cure nahi kar sakti.
  • Dormand–Prince (RK45 used by scipy solve_ivp) — real embedded-pair coefficients.