The given differential equation is,
( x+1 ) dy dx =2 e −y −1
The above equation can be written as,
dy 2 e −y −1 = dx x+1
Integrate both sides of equation.
∫ dy 2 e −y −1 = ∫ dx x+1 ∫ dy 2 e y −1 =log| x+1 |+c ∫ e y dy 2− e y =log| x+1 |+c
Consider,
t=2− e y −dt= e y dy
Now, integral becomes,
∫ −dt t =log| x+1 |+c −logt=log| x+1 |+c −log( 2− e y )=log| x+1 |+c (1)
Given that y=0 when x=0.
Substitute the values in the equation (1),
−log( 2− e 0 )=log( 0+1 )+c −log1=log1+c c=0
Substitute the value of c in the equation (1). So, the solution of the differential equation is,
−log( 2− e y )=log( x+1 )+0 log( 2− e y )=log( 1 x+1 ) 2− e y = 1 x+1 e y = 2x+1 x+1
Taking log both sides,
y=log| 2x+1 x+1 | [ x≠−1 ]
Thus, the solution of the differential equation is y=log| 2x+1 x+1 |.