calculate:$\int \frac{x+1}{-x(x+1)+\sqrt{x^2+1}}dx$ calculate:$$\int \frac{x+1}{-x(x+1)+\sqrt{x^2+1}}dx$$
I tried:
$$\int \frac{x+1-\frac{\sqrt{x^2+1}}{x}+\frac{\sqrt{x^2+1}}{x}}{-x(x+1)+\sqrt{x^2+1}}dx=\int\frac{-dx}{x}+\int \frac{\frac{\sqrt{x^2+1}}{x}}{-x(x+1)+\sqrt{x^2+1}}dx$$
I can not continue from here

Let $x = \tan u $ 
$$\int \frac{(\tan u +1) \sec^2 u}{\sec u - \tan u ( \tan u +1 )} \; du  $$ multiply with $\cos ^2 u $ 
$$\int \frac{(\tan u +1 )}{\cos u - \sin u ( \sin u + \cos u ) } $$ 
$$\int \frac{\sin u + \cos u }{\cos ^2 u - \sin u \cos u(\sin u + \cos u) } $$
$$\int \frac{2 \sqrt{2} \sin (0.25 \pi + u ) }{ 2\cos^2 u - \sin 2 u ( \sin ( 0.25 \pi +u))} \; du $$
$$\int \frac{ 2 \sqrt{2} ( \sin ( 0.25 \pi + u) ) }{\cos 2u +1 - \sin 2u ( \sin ( 0.25 \pi +u ))}$$
$\cos 2u = \cos 2 (y - 0.25 \pi) = \cos (2y - 0.5 \pi) = - \sin ( 2y) , \sin 2u = \sin(2y - 0.5 \pi ) = - \cos (2y)$ hence 
$$\int \frac{2 \sqrt{2} \sin y}{- \sin 2y +1 + \cos 2y \sin y } $$ 
I hope this can help you. I will come back to check 
