Step 1: Identify the equation type This is a first-order linear differential equation: \[ \frac{dy}{dx} + P(x)y = Q(x). \] Rewriting: \[ \frac{dy}{dx} + 2y \tan x = 5 \sin x. \] Here, \( P(x) = 2 \tan x \) and \( Q(x) = 5 \sin x \).
Step 2: Find the integrating factor (IF) \[ IF = e^{\int 2 \tan x dx} = e^{2 \ln |\sec x|} = \sec^2 x. \]
Step 3: Solve the equation Multiplying both sides by \( \sec^2 x \): \[ \frac{d}{dx} (y \sec^2 x) = 5 \sin x \sec^2 x. \] Integrating: \[ y \sec^2 x = \int 5 \sin x \sec^2 x dx. \] Using \( \int \sin x \sec^2 x dx = \cos x \sec^2 x \), \[ y \sec^2 x = 5 \cos x + C. \] \[ y = 5 \cos x + C \cos^2 x. \] Thus, the correct answer is (D) \( y = 5 \cos x + C \cos^2 x \).