4.8.29 · D3 · HinglishNumerical Methods

Worked examplesSolving nonlinear systems — Newton's method in n dimensions

3,223 words15 min read↑ Read in English

4.8.29 · D3 · Maths › Numerical Methods › Solving nonlinear systems — Newton's method in n dimensions

Parent note ne machine banai thi: scalar Newton bada hokar ban gaya Yahan hum us machine ko har tarah ke input par run karte hain — acche roots, singular Jacobians, bure start points, ek linear special case, ek real word problem, ek exam twist, aur ek aisa system jiska koi solution hi nahi. Ek bhi number chhune se pehle, chaliye naam lete hain ki "har tarah" ka matlab kya hai.


The scenario matrix

Neeche ke har worked example ko is table ke us cell se tag kiya gaya hai jo woh exercise karta hai. Saath milkar woh har cell ko touch karte hain.

Cell Scenario class Kya khaas hai Example
A Well-behaved, unique nearby root invertible, accha start Ex 1
B Multiple roots, start decide karta hai kaun sa Symmetry / basins Ex 2
C Linear (degenerate nonlinearity) constant, one-step exact Ex 3
D Singular root ke paas/par Do curves tangent — quadratic rate kho jaata hai Ex 4
E Bad start → divergence / cycle Local convergence fail hoti hai; damping fix karta hai Ex 5
F Real-world word problem ek kahani se set up karo, units Ex 6
G Exam twist — mein ek linear equation chhupa hua Eliminate karo, grind mat karo Ex 7
H / bada, solve karna hai, invert nahi LU / Gaussian elimination in action Ex 8
I Koi solution nahi — curves kabhi milti nahi Newton ke paas converge karne ki jagah nahi Ex 9

Cell A — well-behaved unique root

Figure — Solving nonlinear systems — Newton's method in n dimensions

Pehle figure padho: blue circle aur pink line do yellow dots par cross karti hain, origin ke through symmetric. Dashed chalk path dikhata hai ki hamara start (white square par) upper-right dot ki taraf slide kar raha hai. Picture ka poora message yeh hai: do roots hain, aur start unme se ek ke kaafi paas hai. Upper-right dot ko dhyan mein rakho.

Forecast: kyunki hum positive- side par start karte hain, aage padhne se pehle andaza lagao ki hum kaunse dot par land karenge.

  1. Jacobian. . Yeh step kyun? Row hai — woh direction jisme har equation sabse tezi se badhti hai. Woh gradient stack exactly Jacobian matrix hai, ka -D stand-in.
  2. Residual at . . Yeh step kyun? Yeh measure karta hai ki hum kitne galat hain; agar yeh hota toh hum done hote.
  3. Step solve karo. , . Solve : Yeh step kyun? ke liye ; hum residual ke negative se multiply karte hain. (Hand ke liye yeh theek hai — bade ke liye hum solve karte, invert nahi, dekho Ex 8.)
  4. Update. . Yeh step kyun? Tangent model ke saath slide karo jahan woh zero predict karta hai — yeh figure mein dashed jump hai.
  5. Ek baar aur iterate karo: par, … iterate karte rehne se converge hota hai par.

Verify: ✓ aur ✓. Hum positive (upper-right) intersection par land kiye — positive par start ne hamein wahan steered kiya (Cell B ki foreshadowing).


Cell B — do roots, start point choose karta hai

Same figure apply hoti hai: ab imagine karo white square par left par rakha gaya hai; picture ki mirror symmetry se path lower-left yellow dot ki taraf slide karta hai.

Forecast: symmetry se, ab kaun sa root milega?

  1. Residual. . Yeh step kyun? Pehle start plug karo — yeh bataata hai hum kitne off hain, aur yahan sirf doosra component sign flip karta hai Ex 1 ke comparison mein, jo mirror ka algebraic fingerprint hai.
  2. Jacobian. , . Yeh step kyun? Jacobian ko naye point par re-evaluate karna padega — par depend karta hai, isliye ab.
  3. Step. Solve : . Yeh step kyun? Step ke liye linear model solve karo — yeh Ex 1 ke step ka mirror nikalta hai, exactly jaisa picture ki symmetry ne promise kiya tha.
  4. Update. → converges to . Yeh step kyun? Behtar guess ki taraf move karne ke liye step add karo; yeh lower-left dot ki taraf jaata hai.

Verify: ✓, equal coords ✓. Lesson (Cell B): Newton ek koi root dhundhta hai, jo is baat se decide hota hai ki start kaunse basin of attraction mein hai. Same equations, mirrored start, mirrored root.


Cell C — linear , one-step exact

Forecast: exact answer hit karne ke liye kitne Newton steps?

  1. Jacobian. constant. Yeh step kyun? Ek linear map ka derivative woh map khud hai; koi dependence nahi, isliye hum kabhi recompute nahi karte.
  2. Residual at . . Yeh step kyun? Evaluate karo start solve karne se kitna door hai; origin par yeh sirf hai.
  3. Step. Solve . , : . Yeh step kyun? Step ke liye linear model solve karo; kyunki model yahan exactly ke barabar hai, yeh step hume ek shot mein true solution par le jaata hai.
  4. Update. . Yeh step kyun? Start mein step add karo — directly answer par pahunch jaate hain.

Verify: ✓. Residual ab exactly zero hai — koi rounding nahi, koi doosra step nahi. Lesson (Cell C): linear par tangent model hi hai, isliye ek step exact hai. Yeh aapka code ka sanity check hai (Fixed-point iteration contrast se: fixed-point crawl karta).


Cell D — singular Jacobian (curves tangent)

Figure — Solving nonlinear systems — Newton's method in n dimensions

Pehle figure padho: pink line blue circle ko cross nahi karti — woh use ek single yellow dot par kiss karti hai. Kyunki do curves wahan ek tangent direction share karti hain, row-gradients parallel ho jaate hain aur . White squares ki row dikhati hai ki -coordinate crawl kar raha hai — halving, squaring nahi. Woh crawl ek singular Jacobian ka visible symptom hai.

Forecast: sach wala root hai. Root par kya hai — aur zero determinant hamari fast convergence ko kya karta hai?

  1. Jacobian. , . Yeh step kyun? Har equation differentiate karo; root par , isliye singular. Geometrically dono curves wahan horizontal hain (tangent), figure mein "kiss" se match karta hai.
  2. Start . , , (root se door theek hai). Yeh step kyun? Start par residual aur Jacobian evaluate karo; tangent point se door abhi healthy hai, isliye pehla step well-defined hai.
  3. Step. Solve : row 2 se, ; row 1 se, . Toh . Yeh step kyun? Step ke liye solve karo; dekho -error — woh sirf halved hua, square nahi hua.
  4. Agle: , . Errors linear, ratio .

Verify: predicted linear decay : ✓. Lesson (Cell D): jab singular hota hai, Newton quadratic speed kho deta hai aur linearly creep karta hai — exactly wahi -D echo hai ek scalar double root ka jahan . Ek cure hai modified Newton ya equations ko dobara state karna.


Cell E — bad start → divergence, damping save karta hai

Forecast: near-flat gradient ka matlab hai tangent ramp almost horizontal hai — kya plain step overshoot karega?

  1. Jacobian. , . par: . Yeh step kyun? Hume har direction mein slope chahiye; chhota warn karta hai ki model mein almost flat hai, jo step ko lamba banayega.
  2. Residual. . Yeh step kyun? Step lene se pehle measure karo hum kitne off hain.
  3. Plain step. . Solve . : . Yeh step kyun? Near-flat linear model solve karne se ek bada jump milta hai () true root ke paas ke start se — ek classic overshoot warning.
  4. Damp karo. lo: . Yeh step kyun? Damped Newton step ko tab tak chota karta hai jab tak actually drop na kare, overshoot ko tame karta hai.

Verify (residual damping ke neeche sach mein shrinks karta hai): . Damped par: , , ✓. Lesson (Cell E): Newton sirf locally convergent hai; step-length jo residual decrease kare practical rescue hai. (Is system ke exact roots cleanly Ex 7 mein compute kiye gaye hain.)


Cell F — real-world word problem

Forecast: parallel mein do resistors ka equivalent resistance hamesha chhote resistor se neeche hota hai. Kyunki parallel value hai, chhota resistor se upar hona chahiye. Andaza lagao ki thoda upar se aayega ya nahi.

  1. banao (fraction saaf karo). , . Yeh step kyun? Multiply out karne se division remove hota hai taaki Jacobian entries polynomial aur well-defined rahe (units: aur ).
  2. Jacobian. . Yeh step kyun? differentiate karo toh ; row 2 linear equation ka constant gradient hai. Yahi matrix hai jiske against hum solve karte hain.
  3. par. . , . Yeh step kyun? Linear system form karne ke liye residual aur Jacobian guess par evaluate karo; already satisfied hai (), isliye guess line par baith rahi hai.
  4. Step. Solve : , . Yeh step kyun? Correction ke liye linear model solve karo; dono components saath neeche move karte hain, intact rakhte hue.
  5. Update. . Yeh step kyun? Guess mein step add karo. Iterate karte rehne se neeche exact root par converge hota hai.

Exact root. substitute karo mein: , toh

Verify: ✓ (difference construction se hai). Parallel: ✓. Units consistent (sab ). Hamara forecast sach nikla: chhota resistor sach mein parallel value se upar hai, jaisa physics demand karta hai.


Cell G — exam twist: mein ek linear equation chhupa hua

Forecast: pehle haath se do equations subtract karo — kya yeh secretly ek single quadratic hai?

  1. Reduce karo. se: . mein sub karo: . Yeh step kyun? Exam twist yeh hai ki ek equation linear hai, isliye ek variable eliminate karna ko ek hand-solvable quadratic mein collapse kar deta hai — exact answer ke liye koi Jacobian nahi chahiye.
  2. Exact roots. , toh ya , ke saath. Yeh step kyun? Quadratic formula dono roots exactly deta hai; yeh hamaara ground truth hai iteration ke against test karne ke liye.
  3. Newton check se. . , . Solve : . Yeh step kyun? Ek nearby start se ek Newton step run karo aur correction solve karo, dekho ki woh exact quadratic root ki taraf march karta hai.
  4. Update. — already true ke ke andar. Yeh step kyun? Step add karo; closeness confirm karti hai ki elimination answer aur iteration agree karte hain.

Verify: at equals ✓ quadratic formula se. Aur ✓. Lesson (Cell G): hamesha ek linear component scan karo jo aap eliminate kar sako — yeh ek Newton ko ek hand-solvable quadratic mein badal deta hai aur aapko code ka root check karne deta hai.


Cell H — : solve karo, invert nahi

Forecast: ke saath hum form nahi karte. Hum forward-elimination karte hain. Andaza lagao kitne exact operations ek step mein lagte hain, given linear hai.

  1. Jacobian. . par: . Yeh step kyun? Har row ek gradient hai; mixed signs aur terms se aate hain. Yahi matrix hai jis par hum eliminate karte hain.
  2. Residual. . Yeh step kyun? Har equation mein start plug karo right-hand side linear solve ke liye.
  3. Gaussian elimination se solve karo. Augment aur column 1 eliminate karo: : . : . Column 2 eliminate karo, : . Back-sub: . . Yeh step kyun? Ek LU-style forward sweep + back-substitution cost karta hai — banana se sasta aur steadier (parent ka "Just Solve, Don't Invert").
  4. Update. . Yeh step kyun? Solved step add karo; yahan se iterate karne par true root par converge hota hai.

Verify (do cheezein). (a) Exact root: ✓, ✓, … toh in coefficients ke saath . ko genuine root banane ke liye hum use karte hain ( drop karo); phir ✓. (b) Jo step humne solve kiya woh satisfy karta hai: row 1 ✓; row 2 ✓; row 3 ✓.


Cell I — ek system jiska koi solution nahi

Forecast: unit circle par ek point ka hai; doosre par yeh hona chahiye. Kya koi ek point dono satisfy kar sakta hai? Predict karo residual kya karta hai.

  1. Contradiction pakdo. Subtract karo: . Yeh har ke liye hai — kabhi zero nahi. Yeh step kyun? Iterate karne se pehle ek algebraic combination dhundho jo constant ho; ek nonzero constant prove karta hai ki do equations inconsistent hain, isliye ka koi solution nahi.
  2. Newton's step kya karta hai. — do rows identical hain, isliye har jagah. Yeh step kyun? Dono equations ka same gradient hai (concentric circles radial direction share karti hain), ko har point par singular banata hai — aap literally ko unique step ke liye solve nahi kar sakte.
  3. Consequence. Residual ka difference par pinned rehta hai chahe aap kahan bhi jao: ko tak drive nahi kiya ja sakta. Newton ya toh stall karta hai (singular ) ya, pseudo-inverse ke saath, bina residual vanish hue wander karta hai. Yeh step kyun? Yeh "koi root nahi" ka honest failure signature hai: residual ek positive value par floor out karta hai.

Verify: identically ✓, aur do Jacobian rows equal hain isliye ✓. Lesson (Cell I): Newton assume karta hai ki ek root exist karta hai; jab curves kabhi nahi milti, koi step residual zero nahi kar sakta. Isse non-vanishing residual floor aur/ya persistently singular se detect karo — phir ruko aur model dobara examine karo, iterations burn mat karo.


Recall Pure matrix ka ek-line summary

Har failure mode in mein se ek hai: wrong basin (B), singular (D), bad start (E), ya koi root hi nahi (I) — aur har ek ka ek response hai: start chuno, equations dobara state karo, step damp karo, ya recognize karo ki system inconsistent hai aur ruk jao.

Newton jahan update matrix har step recompute karne ki jagah approximate ki jaati hai woh Broyden's method hai — ek cost-saving cousin jo next deep dive ke kabil hai.


Flashcards

Quadratic convergence kaunsa cell tod deta hai, aur kyun?
Cell D — singular (), curves tangent; rate linear ho jaata hai.
Linear par exact answer ke liye kitne Newton steps?
Ek — constant hai isliye tangent model ke barabar hai.
Bad start se divergence ka fix?
Damped Newton: , tab tak chota karo jab tak decrease na kare.
Newton step ke liye, invert karo ya solve karo?
solve karo LU / Gaussian elimination se — sasta aur zyada stable.
Newton run karte waqt koi solution na hone wale system ko kaise detect karte hain?
Residual ek positive value par floor out karta hai aur/ya singular rehta hai — equations inconsistent hain.