Differential Equation

If (2 + sin x) dy/dx + (y + 1)cos x = 0 and y(0) = 1, then y(π/2) is equal to

  1. 1/3
  2. -2/3
  3. -1/3
  4. 4/3

Solution

(2 + sin x)dy + cos x(y + 1)dx = 0

(y + 1)(2 + sin x) = C

(1 + 1)(2 + 0) = C = 4

(y + 1)(2 + sin x) = 4

Put x = π/2

y = 1/3

The correct option is A.