Related Formula
d(u · v) = u dv + v du$$d(u \cdot v) = u \, dv + v \, du$$
Core Logic
Given the differential equation:
x dy + 2(1 - x) x + (2x - x²) dx = 0$$\sec x \, dy + \{2(1 - x) \tan x + (2x - x^2)\} \, dx = 0$$
Divide entirely by x$\sec x$ (which is 1/ x$1/\cos x$):
dy + 2(1 - x) x + (2x - x²) x dx = 0$$dy + \{2(1 - x) \sin x + (2x - x^2) \cos x\} \, dx = 0$$
Rearranging it as an exact differential form:
(dy)/(dx) = 2(x - 1) x + (x² - 2x) x$$\frac{dy}{dx} = 2(x - 1) \sin x + (x^2 - 2x) \cos x$$
Step 1: Integration using By-Parts
Now integrate both sides:
y(x) = ∫ 2(x - 1) x dx + ∫ (x² - 2x) x dx$$y(x) = \int 2(x - 1) \sin x \, dx + \int (x^2 - 2x) \cos x \, dx$$
Apply integration by parts on the second integral, where u = x² - 2x$u = x^2 - 2x$ and dv = x dx$dv = \cos x \, dx$:
∫ (x² - 2x) x dx = (x² - 2x)( x) - ∫ (2x - 2) x dx$$\int (x^2 - 2x) \cos x \, dx = (x^2 - 2x)(\sin x) - \int (2x - 2) \sin x \, dx$$
Substituting this back into y(x)$y(x)$:
y(x) = ∫ 2(x - 1) x dx + [ (x² - 2x) x - ∫ 2(x - 1) x dx ] + λ$$y(x) = \int 2(x - 1) \sin x \, dx + \left[ (x^2 - 2x) \sin x - \int 2(x - 1) \sin x \, dx \right] + \lambda$$
The integrals cancel out perfectly:
y(x) = (x² - 2x) x + λ$$y(x) = (x^2 - 2x) \sin x + \lambda$$
Step 2: Finding Constant and Final Value
Use the initial condition y(0) = 2$y(0) = 2$:
y(0) = 0 + λ ⇒ λ = 2$$y(0) = 0 + \lambda \Rightarrow \lambda = 2$$
Thus, the solution is:
y(x) = (x² - 2x) x + 2$$y(x) = (x^2 - 2x) \sin x + 2$$
To find y(2)$y(2)$:
y(2) = (2² - 2(2)) 2 + 2 = (4 - 4) 2 + 2 = 2$$y(2) = (2^2 - 2(2)) \sin 2 + 2 = (4 - 4) \sin 2 + 2 = 2$$
Pattern Recognition
When an integrand is a mix of polynomial and trigonometric terms, grouping them to form an exact differential or observing that integration by parts on one term perfectly cancels the other term is a classic structural trick.
Chapter Mix
Class 12 Maths: Differential Equations
Class 12 Maths: Integrals