Differential equation $ y' = \frac {1 +py}{1 + p^2} $ I have a problem with the equation which is a part of the solution: 
$$ y' = \frac {1 +py}{1 + p^2} $$ 
I tried to use $y=uv, y'=u'v + uv'$ substitutions (Bernouilli's method):
$$ u'v + uv' - \frac {p}{1 + p^2} uv = \frac {1} {1+p^2}$$
By solving $v' - \frac {p}{1 +p^2}v = 0 $ I have found $v = \sqrt {1 + p^2}$. Than I have:
$$u'\sqrt{1 +p^2} = \frac {1}{1+p^2} \implies  u = \int \frac{dp}{\sqrt{(1+p^2)^3}} $$
Here I'm stuck but I know the solution should be: $$y = \sqrt{1+p^2}\left(\frac {p}{\sqrt{1+p^2}} + C \right) $$

This is a linear differential equation, so you can use integrating factors (should be essentially equivalent to what you've done): you have
$$ y' - \frac{p}{1+p^2}y = \frac{1}{1+p^2}. $$
The integrating factor is
$$ \exp{\left( \int \frac{-p}{1+p^2} \, dp \right)} = \exp{\left( -\frac{1}{2}\log{(1+p^2)} \right)} = \frac{1}{\sqrt{1+p^2}}. $$
Therefore
$$ \left( \frac{y}{\sqrt{1+p^2}} \right)' = \frac{1}{(1+p^2)^{3/2}}. $$
We need to integrate the right-hand side: we use the substitution $p=\tan{x}$, so $dp = \sec^2{x} \, dx $
$$ \int \frac{dp}{(1+p^2)^{3/2}} = \int \frac{\sec^2{x} dx}{\sec^3{x}} = \int \cos{x} \, dx = \sin{x}+C = \frac{p}{\sqrt{1+p^2}}+C, $$
where in the last bit I have used
$$ \sin{x} = \frac{\tan{x}}{\sec{x}} = \frac{\tan{x}}{\sqrt{1+\tan^2{x}}} $$
Hence it comes out as
$$ \frac{y}{\sqrt{1+p^2}} = \frac{p}{\sqrt{1+p^2}}+C, $$
which is the form you want.
So really the answer was that you had to push on and try to do the integral, even if it didn't seem doable to begin with.
