Question:

If $y = f(x)$ is the solution of the differential equation $(1 + \sin x) \frac{dy}{dx} + \cos x = 0$, such that $f(0) = 0$, then $f\left(\frac{\pi}{2}\right)$ is:

Updated On: Apr 3, 2026
  • $\ln 2$
  • $-\ln 2$
  • $\ln 3$
  • $\ln 4$
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Rewrite the differential equation in variable separable form.
The given equation is:
$(1 + \sin x) \frac{dy}{dx} + \cos x = 0$
Rearranging terms, we get:
$(1 + \sin x) dy = -\cos x dx$
$\frac{dy}{dx} = -\frac{\cos x}{1 + \sin x}$


Step 2: Integrate both sides.
$\int dy = -\int \frac{\cos x}{1 + \sin x} dx$
Let $u = 1 + \sin x$, then $du = \cos x dx$.
The integral becomes:
$y = -\int \frac{1}{u} du$
$y = -\ln|u| + C$
Substituting back $u = 1 + \sin x$:
$y = -\ln(1 + \sin x) + C$


Step 3: Use the initial condition to find the constant $C$.
It is given that $f(0) = 0$, which means $y = 0$ when $x = 0$.
$0 = -\ln(1 + \sin 0) + C$
$0 = -\ln(1) + C$
Since $\ln(1) = 0$, we have $C = 0$.
Thus, the function is:
$f(x) = -\ln(1 + \sin x)$


Step 4: Calculate $f\left(\frac{\pi}{2}\right)$.
$f\left(\frac{\pi}{2}\right) = -\ln\left(1 + \sin \frac{\pi}{2}\right)$
Since $\sin \frac{\pi}{2} = 1$:
$f\left(\frac{\pi}{2}\right) = -\ln(1 + 1) = -\ln 2$
Therefore, the answer is option (2).
Was this answer helpful?
0
0