If \(y = y(x)\), \(0 \le x \le \displaystyle\frac{\pi}{2}\), is the solution of the differential equation \(\displaystyle\frac{dy}{dx} = e^{y}\,x\cos x\) satisfying \(y(0) = 0\), then \(y\left(\displaystyle\frac{\pi}{2}\right)\) is equal to
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → \(\log_e \displaystyle\frac{2}{4 - \pi}\)
Separating the variables:
\( e^{-y}\,dy = x\cos x\,dx \)
The right side is integrated by parts, with x as the first function:
\( \displaystyle \int x\cos x\,dx = x\sin x - \int \sin x\,dx \)
\( \displaystyle \int x\cos x\,dx = x\sin x + \cos x \)
So
\( -e^{-y} = x\sin x + \cos x + C \)
Using \(y(0) = 0\): \(-1 = 0 + 1 + C\), so \(C = -2\). The particular solution is
\( e^{-y} = 2 - x\sin x - \cos x \)
At \(x = \frac{\pi}{2}\):
\( \displaystyle e^{-y} = 2 - \frac{\pi}{2} = \frac{4 - \pi}{2} \)
Taking logarithms:
\( \displaystyle y = -\log_e \frac{4 - \pi}{2} = \log_e \frac{2}{4 - \pi} \)