The slope of the tangent is given by d y d x = 2 tan x ( cos x − y ) \frac{dy}{dx} = 2\tan x(\cos x - y) d x d y = 2 tan x ( cos x − y ) , and the curve passes through ( π / 4 , 0 ) (\pi/4, 0) ( π /4 , 0 ) .
Write the ODE in standard linear form:
d y d x + 2 tan x ⋅ y = 2 tan x cos x = 2 sin x \frac{dy}{dx} + 2\tan x \cdot y = 2\tan x \cos x = 2\sin x d x d y + 2 tan x ⋅ y = 2 tan x cos x = 2 sin x
Find the integrating factor:
μ = e ∫ 2 tan x d x = e − 2 ln ∣ cos x ∣ = 1 cos 2 x = sec 2 x \mu = e^{\int 2\tan x\,dx} = e^{-2\ln|\cos x|} = \frac{1}{\cos^2 x} = \sec^2 x μ = e ∫ 2 t a n x d x = e − 2 l n ∣ c o s x ∣ = c o s 2 x 1 = sec 2 x
Multiply through by the integrating factor:
d d x [ y sec 2 x ] = 2 sin x sec 2 x = 2 sin x cos 2 x \frac{d}{dx}[y\sec^2 x] = 2\sin x \sec^2 x = \frac{2\sin x}{\cos^2 x} d x d [ y sec 2 x ] = 2 sin x sec 2 x = c o s 2 x 2 s i n x
Integrate:
y sec 2 x = ∫ 2 sin x cos 2 x d x = 2 cos x + C = 2 sec x + C y\sec^2 x = \int \frac{2\sin x}{\cos^2 x}\,dx = \frac{2}{\cos x} + C = 2\sec x + C y sec 2 x = ∫ c o s 2 x 2 s i n x d x = c o s x 2 + C = 2 sec x + C
y = 2 cos x + C cos 2 x y = 2\cos x + C\cos^2 x y = 2 cos x + C cos 2 x
Apply initial condition y ( π / 4 ) = 0 y(\pi/4) = 0 y ( π /4 ) = 0 :
0 = 2 cos ( π / 4 ) + C cos 2 ( π / 4 ) = 2 ⋅ 1 2 + C ⋅ 1 2 0 = 2\cos(\pi/4) + C\cos^2(\pi/4) = 2 \cdot \frac{1}{\sqrt{2}} + C \cdot \frac{1}{2} 0 = 2 cos ( π /4 ) + C cos 2 ( π /4 ) = 2 ⋅ 2 1 + C ⋅ 2 1
0 = 2 + C 2 0 = \sqrt{2} + \frac{C}{2} 0 = 2 + 2 C
C = − 2 2 C = -2\sqrt{2} C = − 2 2
So y = 2 cos x − 2 2 cos 2 x y = 2\cos x - 2\sqrt{2}\cos^2 x y = 2 cos x − 2 2 cos 2 x .
Compute ∫ 0 π / 2 y d x \int_0^{\pi/2} y\,dx ∫ 0 π /2 y d x :
∫ 0 π / 2 y d x = ∫ 0 π / 2 ( 2 cos x − 2 2 cos 2 x ) d x \int_0^{\pi/2} y\,dx = \int_0^{\pi/2} (2\cos x - 2\sqrt{2}\cos^2 x)\,dx ∫ 0 π /2 y d x = ∫ 0 π /2 ( 2 cos x − 2 2 cos 2 x ) d x
= 2 [ sin x ] 0 π / 2 − 2 2 ∫ 0 π / 2 cos 2 x d x = 2[\sin x]_0^{\pi/2} - 2\sqrt{2}\int_0^{\pi/2}\cos^2 x\,dx = 2 [ sin x ] 0 π /2 − 2 2 ∫ 0 π /2 cos 2 x d x
= 2 ( 1 − 0 ) − 2 2 ⋅ π 4 = 2(1 - 0) - 2\sqrt{2} \cdot \frac{\pi}{4} = 2 ( 1 − 0 ) − 2 2 ⋅ 4 π
= 2 − π 2 2 = 2 − π 2 = 2 - \frac{\pi\sqrt{2}}{2} = 2 - \frac{\pi}{\sqrt{2}} = 2 − 2 π 2 = 2 − 2 π
The correct answer is Option B: 2 − π 2 \boxed{2 - \dfrac{\pi}{\sqrt{2}}} 2 − 2 π .