4.8.28 · HinglishNumerical Methods

Boundary value problems — shooting method, finite difference

1,955 words9 min readRead in English

4.8.28 · Maths › Numerical Methods


BVP KYA hai?

YEH KYUN aate hain? Steady-state physics: ek rod ke saath temperature jab dono ends fixed hon, beam ka deflection jab dono ends clamped hon, do plates ke beech electrostatic potential. Kuch bhi time mein evolve nahi hota — answer ko har jagah ek saath constraints satisfy karne padte hain.


METHOD 1 — Shooting Method

KAISE (algorithm):

  1. Slope ke liye guess karo. IVP solve karo milega.
  2. guess karo. Phir solve karo .
  3. Secant method use karo (hum ko cheaply differentiate nahi kar sakte):
  4. Tab tak repeat karo jab tak .

METHOD 2 — Finite Difference Method (FDM)

KAISE — difference formulas Taylor series se derive karo (first principles):

Grid: , , . Maano .

Expand:

Subtract karo → odd terms bachte hain, cancel hota hai:

Add karo → odd terms cancel hote hain, isolate karo:

Ek linear BVP pe apply karo . Har interior pe stencils substitute karo: se multiply karo aur group karo:

Yeh ek tridiagonal linear system hai jisme ko right side mein move kiya gaya hai. Thomas algorithm (tridiagonal Gaussian elimination) se mein solve karo.

Figure — Boundary value problems — shooting method, finite difference

Shooting vs Finite Difference

Shooting Finite Difference
Idea Slope guess karo, root-find karo Saare nodes ek saath solve karo
Reuses IVP solver (RK4) Linear algebra (Thomas)
Nonlinear BVP Easy (secant bahar) System pe Newton chahiye
Stiff/long domain Blow up ho sakta hai Stable
Accuracy RK4 order (central)

Recall Feynman: ek 12-saal ke bachche ko explain karo

Socho tum ek ball ek door bucket mein exactly land karwani hai. Tumhe sahi throwing angle pata nahi. Shooting: ek baar throw karo (bahut chota), ek baar phir (bahut door), phir beech mein split karo — angle adjust karte raho jab tak bucket mein land na ho jaaye. Finite difference: throw karne ke bajaye, ball ka path bahut saare chhote connected dots se draw karo aur dots ko yeh rule follow karne pe force karo ki "har dot apne neighbours ka roughly average hai," phir dot-puzzle solve karo taaki pehla aur aakhri dot wahan hon jahan hona chahiye. Dono same curve dhundhhte hain — ek aiming se, ek puzzle-solving se.


Flashcards

BVP ko IVP se kya alag karta hai?
BVP har endpoint pe ek condition deta hai (); IVP saari conditions () ek single point pe deta hai, toh IVP march kar sakta hai lekin BVP nahi.
Shooting method ka core idea?
Missing slope guess karo, resulting IVP solve karo, landing error treat karo, aur root-find karo (usually secant se).
Linear shooting shortcut exactly 2 shots mein answer kyun deta hai?
Linear ODE ke liye, mein linear hai, toh ek straight line hai jo exactly do points se determine hoti hai — linear interpolation bina iteration ke root hit karta hai.
Shooting ke liye secant update formula?
.
ke liye central difference aur uska order?
, accurate to .
ke liye central difference aur uska order?
, accurate to (the stencil).
stencil kaise derive karte hain?
aur ki Taylor expansions add karo; odd-power terms cancel ho jaate hain, leaving , phir ke liye solve karo.
ke liye tridiagonal FDM coefficients?
Lower , diagonal , upper , RHS .
FDM system ko efficiently solve karne wala algorithm aur uski cost?
Thomas algorithm (tridiagonal Gaussian elimination), .
Shooting ke upar FDM kab prefer karein?
Stiff problems ya long domains jahan shooting mein chote slope errors blow up ho jaate hain; FDM errors ko local rakhta hai aur zyada stable hai.
Central-difference FDM mein ke liye forward difference use karna buri idea kyun hai?
Yeh sirf hai, poore scheme ko second order se first order tak degrade kar deta hai.
FDM matrix assemble karte waqt aur ke saath kya karna padta hai?
Unka (known) contribution pehle aur aakhri interior equations ke right-hand side vector mein move karo.

Connections

  • Initial Value Problems — shooting ek BVP ko repeated IVPs mein reduce karta hai.
  • Runge-Kutta methods — shooting ke liye inner IVP solver.
  • Root finding — Secant and Newton — shooting ka outer loop.
  • Taylor series — har finite-difference stencil aur uske error order ka source.
  • Tridiagonal systems — Thomas algorithm — FDM linear system solve karta hai.
  • Truncation error and order of accuracy — kyun matter karta hai.
  • Partial Differential Equations — finite differences — same stencils 2D mein (Laplace/Poisson).

Concept Map

contrast with

arise from

solved by

solved by

guess slope s

turns BVP into

root-find on

solved via

if ODE linear

replace derivatives by

solve all points

IVP one point conditions

BVP conditions at both ends

Steady-state physics

Shooting method

Finite difference

Missing slope y prime a

Solve IVP with RK4 or Euler

phi s equals y b minus beta

Secant method

Exact in 2 shots

Algebra on grid

Simultaneous linear system