Solve the differential equation $y'=\frac{1+y}{1+x}$ 
$$\text{Solve the differential equation } y'=\frac{1+y}{1+x}$$

I'm going to write an exam soon and I'm worried about my solution for this task. So far I solved these problems by forming them into their standard form $y'+P(x)y = Q(x)$. But it seems like this won't work here. So I tried it like that:
$$\frac{dy}{dx} = \frac{1+y}{1+x}$$ 
$$\Leftrightarrow dy = \left (\frac{1+y}{1+x} \right )dx$$
$$\Leftrightarrow \left (\frac{1}{1+y}\right) dy = \left(\frac{1}{1+x}\right) dx$$
$$\Leftrightarrow (1+y)^{-1} dy = (1+x)^{-1} dx$$
$$\Leftrightarrow \int{(1+y)^{-1} dy} = \int{(1+x)^{-1} dx}$$
$$\Leftrightarrow \ln(1+y)=\ln(1+x)+c$$
$$\Leftrightarrow e^{\ln(1+y)}= e^{\ln(1+x)}+e^{c}$$
$$\Leftrightarrow 1+y = 1+x+e^{c}$$
$$\Leftrightarrow y = x+e^{c}$$
I have no idea if this is correct though? :p
And is there a better way of solving it?
 A: The step
$$\Leftrightarrow \ln(1+y)=\ln(1+x)+c$$
$$\Leftrightarrow e^{\ln(1+y)}= e^{\ln(1+x)}+e^{c}$$
is incorrect.  Instead, you should have
$$\Leftrightarrow e^{\ln(1+y)}= e^{\ln(1+x)+c}$$
or
$$\Leftrightarrow e^{\ln(1+y)}= ce^{\ln(1+x)}=c(1+x)$$
A: You want wrong in applying the exponential function to both sides.  $$\ln(1+y) = \ln(1+x)+c$$
$$ e^{\ln(1+y)} = e^{\ln(1+x)+c} = e^{\ln(1+x)} e^c$$
By the way, you could also do this as a linear differential equation
$$ y' - \frac{y}{1+x} = \frac{1}{1+x}$$
i.e. $P(x) = -1/(1+x)$, $Q(x) = 1/(1+x)$.
A: You committed this error here. $$\ln(1+y)=\ln(1+x)+c \implies 1+y = e^{\ln(1+x)+c} = e^c(1+x)$$
If you give the initial value $y(0) = y_0$ then 
$$e^c = 1+y_0$$
But the concept used to you proceed in solving is correct. This was just an error in your development. 
A: The approach you use is called "separation of variables", in which you separate x and y on different sides of the equation, and then integrate directly. But watch out! You cannot divide by zero. So $y+1=0$, i.e. $y=-1$ is also a solution.
