Visual walkthrough — Integrating factors for non-exact equations
4.6.7 · D2· Maths › Ordinary Differential Equations › Integrating factors for non-exact equations
Hum bas yeh assume karte hain ki tum add, multiply, aur picture par arrow follow kar sakte ho. Baaki sab kuch yahan build kiya jaata hai.
Step 1 — "Differential form" kya hoti hai, grid par arrows ke roop mein
KYA. Hum ek equation se shuru karte hain jo is tarah likhi hoti hai:
ko "ek tiny step right" aur ko "ek tiny step up" padho. Grid par har point par, aur bas do numbers hain. Unhe ek chhote arrow mein pack karo — yahi woh field hai jisme equation rehti hai.
YEH PICTURE KYUN. Equation kehti hai . Woh combination arrow aur tumhare tiny step ka dot product hai. Dot product zero matlab perpendicular. Toh equation secretly yeh keh rahi hai: "sirf mere arrow ke perpendicular direction mein chalo." Woh allowed walking-directions solution curves trace karti hain.
PICTURE. Pale-yellow arrows dekho aur woh chalk-blue tick jo har ek ke perpendicular hai — woh tick woh direction hai jisme ek solution move karne ki permission hai.
Step 2 — "Exact" kaisa dikhta hai: field ek hill ki slope hai
KYA. Kabhi kabhi arrow field ek hill ka uphill-steepness arrow hota hai. Hill ki height ko kaho. Uska steepness arrow (gradient) hai Yahan matlab "height kitni tez chadhti hai jab tum right step lete ho", matlab "jab tum upar step lete ho". Agar , toh hum equation ko exact kehte hain.
YEH KYUN MATTER KARTA HAI. Agar arrows kisi asli hill ke uphill arrows hain, toh unke perpendicular chalna (Step 1) matlab constant height ki line par chalna — ek contour. Contour par rehna exactly hai. Woh ek sentence hi solution hai.
PICTURE. Chalkboard ek hill dikhata hai (contour rings). Pink uphill arrows seedhe slope ke upar point karte hain; blue solution curve ek contour ko hug karti hai, hamesha arrows ke sideways.
Step 3 — Woh test jo asli hill detect karta hai:
KYA. Tum kaise jaante ho ki kisi hill se aaya hai bina dhoondhe? Do twists measure karo:
N_x=\frac{\partial N}{\partial x}\quad(\text{how }N\text{ changes as you move right}).$$ **YEH DO KYUN.** Agar $(M,N)=(F_x,F_y)$, toh $M_y=F_{xy}$ aur $N_x=F_{yx}$. Ek smooth hill ke liye in do slopes ka order matter nahi karta — woh [[Mixed partial derivatives (Clairaut's theorem)|Clairaut's theorem]] hai. Toh ek genuine hill impose karta hai $$\boxed{M_y=N_x.}$$ Agar do twists agree nahi karte, **koi hill exist nahi karti** — field warped hai, woh "curl" karti hai. **PICTURE.** Do tiny loops: left par arrows loop ke around match karte hain ($M_y=N_x$, no curl — hill-like); right par woh loop ke around rotate karte hain ($M_y\neq N_x$, curl — no hill). > [!definition] Exactness test > $M\,dx+N\,dy=0$ exact hai $\iff M_y=N_x$. Unequal twists matlab field ==curls== karti hai, toh koi > potential hill use produce nahi kar sakti. --- ## Step 4 — Stubborn case, aur ek legal move **KYA.** Zyaadatar equations test fail karti hain: $M_y\neq N_x$. Koi hill nahi hai, toh hum contour read off nahi kar sakte. Ek legal repair: poori equation ko ek nonzero function $\mu(x,y)$ se multiply karo: $$\mu M\,dx+\mu N\,dy=0.$$ **YEH LEGAL KYUN HAI.** "= 0" ko kisi nonzero cheez se multiply karne se woh nahi badalta jahan expression zero hai. **Solution curves identical** rehti hain. Lekin *arrows* rescale ho gaye — alag points par alag length — aur shayad ab woh kisi hill ki slope ke saath line up HO JAATE HAIN. Same jaise special factor $e^{\int P\,dx}$ ek [[Linear first-order ODEs|linear first-order ODE]] ko rescue karta hai. **PICTURE.** Left: warped field (arrows uneven, no hill). Hum har arrow ko uske local $\mu$ se stretch karte hain (right), aur ab woh ek proper hill ke slope field mein knit ho jaate hain — contours appear ho jaate hain. > [!intuition] Magic glasses, naya map nahi > $\mu$ arrow lengths ko point-by-point rescale karta hai. Woh kabhi nahi badalta ki kaun si curves equation solve karti hain — > sirf yeh ki field *ek hill jaisi dikhti hai* ya nahi. --- ## Step 5 — Exactness demand karna $\mu$ ke liye ek PDE deta hai **KYA.** Ab hum *demand* karte hain ki rescaled field exact ho. Step 3 test apply karo $(\mu M,\ \mu N)$ par: $$\frac{\partial}{\partial y}(\mu M)=\frac{\partial}{\partial x}(\mu N).$$ Product rule use karo (ek product ki rate = har factor ki apni rate baari baari): $$\underbrace{\mu_y M}_{\substack{\mu\text{ changes}\\ \text{up-ward}}}+\underbrace{\mu M_y}_{\substack{M\text{'s}\\\text{own twist}}} =\underbrace{\mu_x N}_{\substack{\mu\text{ changes}\\\text{right-ward}}}+\underbrace{\mu N_x}_{\substack{N\text{'s}\\\text{own twist}}}.$$ $\mu$-derivative terms ek side par collect karo: $$\boxed{\,N\,\mu_x-M\,\mu_y=\mu\,(M_y-N_x)\,.}$$ **YEH PROGRESS AUR EK TRAP DONO KYUN HAI.** Right side $\mu(M_y-N_x)$ woh *original curl* hai jo hume cancel karni hai; left side yeh hai ki $\mu$ ki apni variation us cancellation ko kaise supply kar sakti hai. Lekin yeh ek **PDE** hai ($\mu$ abhi bhi do variables par depend karta hai) — original problem jitna hi mushkil. Escape: *guess* karo ki $\mu$ sirf EK variable use karta hai, ek term kill karke. **PICTURE.** Do terms ka ek flow chart: $N\mu_x$ (arrow, rightward changing) minus $M\mu_y$ (arrow, upward changing) must equal curl $\mu(M_y-N_x)$ jo hum khatam karna chahte hain. > [!formula] $\mu$ par master condition > $$N\,\mu_x-M\,\mu_y=\mu\,(M_y-N_x).$$ > Neeche har special formula is ek equation ka hi roop hai jisme ek term switch off ho jaata hai. --- ## Step 6 — Case $\mu=\mu(x)$: $y$-term switch off karo **KYA.** Suppose $\mu$ sirf $x$ par depend karta hai. Tab woh upar move karne par kabhi nahi badalta: $\mu_y=0$, aur $\mu_x=\mu'$ (ek ordinary derivative). Master equation collapse ho jaati hai: $$N\,\mu'=\mu\,(M_y-N_x)\ \Longrightarrow\ \frac{\mu'}{\mu}=\frac{M_y-N_x}{N}.$$ Left side $\mu'/\mu$ "$\mu$ ki fractional growth rate" hai — aur yeh **akele** $x$ ka function hai. **CONSISTENCY CHECK KYUN.** Ek pure-$x$ cheez kisi aisi cheez ke equal nahi ho sakti jo abhi bhi $y$ carry kar rahi ho. Toh yeh route *tab hi allowed hai* jab right side $\dfrac{M_y-N_x}{N}$ ke saare $y$'s cancel ho jaayein. Use $g(x)$ kaho; tab $\mu'/\mu=g$ undo karna (jo exponential-of-integral karta hai) deta hai $$\mu(x)=\exp\!\left(\int g(x)\,dx\right).$$ **PICTURE.** Board $\mu$ ko sirf $x$-axis par ek curve tak strip karta hai — vertical lines ke along constant — aur dikhata hai ki ratio ke $y$'s cancel hokar ek clean $x$-profile chhod dete hain. > [!formula] $x$-only integrating factor > Agar $g(x)=\dfrac{M_y-N_x}{N}$ mein koi $y$ nahi hai, toh $\mu(x)=\exp\!\left(\int g(x)\,dx\right)$. > [!example] Ise kaam karte dekho: $(3xy+y^2)\,dx+(x^2+xy)\,dy=0$ > $M_y=3x+2y,\ N_x=2x+y$ (exact nahi). Tab > $$\frac{M_y-N_x}{N}=\frac{x+y}{x(x+y)}=\frac1x\ \Rightarrow\ \mu=e^{\int dx/x}=x.$$ > Multiply karne ke baad, $F=x^3y+\tfrac12x^2y^2$, toh solution hai $x^3y+\tfrac12x^2y^2=C$. --- ## Step 7 — Case $\mu=\mu(y)$: $x$-term switch off karo (sign dhyan se) **KYA.** Ab suppose $\mu$ sirf $y$ par depend karta hai: $\mu_x=0$, $\mu_y=\mu'$. Master equation deti hai $$-M\,\mu'=\mu\,(M_y-N_x)\ \Longrightarrow\ \frac{\mu'}{\mu}=\frac{N_x-M_y}{M}.$$ Dhyan do ki numerator **sign flip** ho gaya — woh $N_x-M_y$ hai, $M_y-N_x$ nahi. Woh flip koi choice nahi hai; woh left par $-M$ se aaya. **KYUN.** Same logic mirror image mein: ek pure-$y$ growth rate sirf ek pure-$y$ ratio ke equal ho sakti hai, toh yeh tab kaam karta hai *jab* $\dfrac{N_x-M_y}{M}=h(y)$ ke saare $x$'s chale jaayein. Tab $\mu(y)=\exp\!\left(\int h(y)\,dy\right).$ **PICTURE.** Step 6 ka mirror: $\mu$ ab $y$-axis par ek curve hai, horizontal lines ke along constant, ek bada pink reminder ke saath ki numerator mein sign reversed hai. > [!mistake] Sign trap > $y$-case mein $\dfrac{N_x-M_y}{M}$ use hota hai — $\dfrac{M_y-N_x}{M}$ **nahi**. Yeh $-M$ se aata hai; minus uda aata hai. $x$-case ka sign copy karna classic galti hai. > [!example] Ise kaam karte dekho: $y\,dx+(2x-ye^y)\,dy=0$ > $M_y=1,\ N_x=2$. $x$-ratio $\frac{-1}{2x-ye^y}$ ek $x$ rakhta hai (fail), lekin > $\frac{N_x-M_y}{M}=\frac{1}{y}$ pure $y$ hai, toh $\mu=y$. Result: $xy^2-e^y(y^2-2y+2)=C.$ --- ## Step 8 — Degenerate & edge cases jinpar tum trip nahi kar sakte **KYA.** Teen boundary situations decide karti hain ki machinery chalegi bhi ya nahi: 1. **Already exact ($M_y=N_x$).** Tab $M_y-N_x=0$, toh $g=h=0$ aur $\mu=e^0=1$. Factor bas $1$ hai — koi rescaling ki zaroorat nahi. Method *exact case ko* ek no-op ki tarah *contain* karta hai. 2. **$N=0$ kahin.** $x$-formula $N$ se divide karta hai, toh line $N=0$ par woh blow up ho jaata hai. $y$-route try karo (divide by $M$), ya ek aisi region tak restrict karo jahan $N\neq0$. 3. **Koi bhi ratio simplify nahi hota.** Agar $\frac{M_y-N_x}{N}$ mein $y$ rehta hai *aur* $\frac{N_x-M_y}{M}$ mein $x$, toh koi single-variable $\mu$ exist nahi karta. Tumhe richer guesses try karni padegi ($\mu(xy)$, $\mu(x/y)$) ya ek bilkul alag method — [[Separable equations]] ya koi substitution. **TEENO KYUN DIKHAYE.** Reader ko kabhi aisi equation nahi milni chahiye jiske baare mein page ne warn nahi kiya: exact (µ=1), ek forbidden divide (µ doosre variable se), aur total failure (koi 1-variable µ nahi). **PICTURE.** Teen mini-boards: ek flat field (µ=1), ek field jahan $N=0$ par "wall" hai (µ wahan undefined), aur ek hopelessly warped field jo kisi single-axis stretch se theek nahi ho sakta. > [!recall]- Khud check karo > Agar equation already exact hai, toh $\mu$ kya hai? ::: $\mu=1$, kyunki $M_y-N_x=0$ toh $g=0$ aur $e^0=1$. > $x$-formula fail karta hai kyunki kisi curve par $N=0$ hai — tum kya karte ho? ::: $y$-formula par switch karo (divide by $M$), ya $N\neq0$ tak restrict karo. > Dono single-variable ratios doosra variable rakh lete hain. Conclusion? ::: Koi $x$-only ya $y$-only $\mu$ exist nahi karta; $\mu(xy)$, koi substitution, ya doosra method try karo. --- ## Ek-picture summary Poora safar ek board par: warped, hill-less field $(M,N)$ → twist test $M_y$ vs $N_x$ curl pakadta hai → $\mu$ se stretch → field ek asli hill ki slope ban jaati hai → contour $F=C$ read off karo. > [!recall]- Feynman retelling (ek 12-saal ke bachche ko batao) > Apne paper ke har point par ek chhota arrow banao — wahi equation hai. Tumhe sirf arrows ke sideways chalne ki permission hai; jo trails tum banate ho wahi answers hain. **Agar** woh arrows kisi invisible hill ke "seedhe-uphill" arrows nikle, toh sideways chalna matlab bas ek height par rehna — toh answer hai "height $C$ par raho." Tum bata sakte ho ki koi asli hill chhup rahi hai ya nahi ek twist test se: jo number sideways-ke-liye hai woh upar jaane par kitna badalta hai, woh us number se match karna chahiye jo upar-ke-liye hai sideways jaane par ($M_y=N_x$). Jab match nahi hota, koi hill nahi hai — arrows curl karte hain. Toh tum magic glasses ($\mu$) pahante ho jo har arrow ko ek chosen amount se stretch karte hain. Stretching tumhare trails nahi badal sakta, lekin *can* make the arrows finally line up into a genuine hill. Sahi glasses dhoondne ke liye, tum demand karte ho "ab yeh ek hill hai" aur ek equation nikaalti hai $\mu$ ke liye. Guess karo ki glasses sirf left–right ki parwaah karte hain ($\mu(x)$) ya sirf up–down ki ($\mu(y)$); woh guess tab legal hai jab ek certain ratio doosra letter bhool jaata hai. Tab $\mu$ us ratio ke integral ka exponential hai, aur tum contour $F=C$ read off kar lete ho. Agar koi bhi guess kaam nahi karta, hill simple glasses ke liye bahut zyaada twisted hai — koi fancier trick dhoondho. --- ## Connections - [[Integrating factors for non-exact equations]] — parent note jise yeh walkthrough visualise karta hai - [[Exact differential equations]] — woh target form jise hum $\mu$ se force karte hain - [[Total differentials and potential functions]] — "hill height" $F$ - [[Mixed partial derivatives (Clairaut's theorem)]] — kyun $M_y=N_x$ sahi test hai - [[Conservative vector fields]] — same "no curl ⇒ a potential exists" idea - [[Linear first-order ODEs]] — $e^{\int P\,dx}$ ek special integrating factor hai - [[Separable equations]] — jab koi single-variable $\mu$ exist nahi karta tab fallback