Question:medium

If \[ (2+\sin x)\frac{dy}{dx}+(y+1)\cos x=0 \] and \[ y(0)=1, \] then find the value of \[ y\left(\frac{\pi}{2}\right). \]

Show Hint

Whenever the differential equation can be written in the form \[ f(y)\,dy=g(x)\,dx, \] it is a separable differential equation. Separate first, integrate later.
Updated On: May 29, 2026
  • \(-\frac23\)
  • \(-\frac13\)
  • \(\frac43\)
  • \(\frac13\)
Show Solution

The Correct Option is D

Solution and Explanation

Step 1: Understanding the Concept:
This problem presents a differential equation that requires the separation of variables method.
The equation contains terms of \( x \) and \( y \) linked through multiplication and addition.
The objective is to isolate \( y \) with its differential \( dy \) and \( x \) with its differential \( dx \).
This setup is a classic "initial value problem" (IVP).
The given point \( (0, 1) \) allows for the calculation of the constant of integration, defining a specific curve.
The final step requires evaluating the resulting function at a standard trigonometric angle.
Step 2: Key Formula or Approach:
1. Rearrange to: \( \frac{dy}{y+1} = -\frac{\cos x}{2 + \sin x} dx \).
2. Integrate: \( \int \frac{1}{y+1} dy = -\int \frac{\cos x}{2 + \sin x} dx \).
3. Use \( y(0) = 1 \) to find the constant.
Step 3: Detailed Explanation:
The equation is:
\[ (2 + \sin x) \frac{dy}{dx} = -(y + 1) \cos x \]
Dividing by \( (2 + \sin x)(y + 1) \):
\[ \frac{1}{y + 1} \frac{dy}{dx} = -\frac{\cos x}{2 + \sin x} \]
Now, multiplying by \( dx \) to separate variables:
\[ \frac{dy}{y + 1} = -\frac{\cos x dx}{2 + \sin x} \]
Integrate both sides:
\[ \int \frac{1}{y + 1} dy = -\int \frac{\cos x}{2 + \sin x} dx \]
Applying the natural logarithm integration rule:
\[ \ln|y + 1| = -\ln|2 + \sin x| + \ln C \]
Using log properties:
\[ \ln|y + 1| + \ln|2 + \sin x| = \ln C \]
\[ \ln|(y + 1)(2 + \sin x)| = \ln C \]
Eliminating the log:
\[ (y + 1)(2 + \sin x) = C \]
Apply the condition \( y(0) = 1 \):
\[ (1 + 1)(2 + \sin 0) = C \]
\[ 2 \times (2 + 0) = C \implies C = 4 \]
So the equation is:
\[ (y + 1)(2 + \sin x) = 4 \]
Substitute \( x = \frac{\pi}{2} \):
\[ (y + 1)\left(2 + \sin \frac{\pi}{2}\right) = 4 \]
\[ (y + 1)(2 + 1) = 4 \]
\[ 3(y + 1) = 4 \implies y + 1 = \frac{4}{3} \]
\[ y = \frac{4}{3} - 1 = \frac{1}{3} \]
Step 4: Final Answer:
The result \( y\left(\frac{\pi}{2}\right) = \frac{1}{3} \) is obtained.
This matches Option (D).
Was this answer helpful?
0