devarshi-dt-logo

Question:

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

−3

13

43

−23

Solution:

(2+sin x)dy/dx = −(y+1)cos x
→ −dy/(y+1) = cos x/(2+sin x) dx
Integrate on both sides. In RHS, take 2+sin x = t → cos x dx = dt
→ ∫−dy/(y+1) = ∫dt/t
→ −ln(y+1) = ln(t) + c = ln(2+sin x) + c
It is given that y(0) = 1, i.e., for x=0, y=1
→ −ln(1+1) = ln(2+0) + c
→ c = −ln 4
Therefore, the solution of the differential equation is:
−ln(y+1) = ln(2+sin x) − ln 4
For x = π/2, −ln(y+1) = ln(2+1) − ln 4
→ −ln(y+1) = ln(3/4)
→ y+1 = 4/3
→ y(π/2) = 1/3