How do I go about solving this?

First of all: $$ (\sqrt{n^2+1}+\sin x+n\cos x)(\sqrt{n^2+1}-\sin x-n\cos x)=$$ $$ =n^2+1-n^2\cos^2x-2n\cos x\sin x-\sin^2 x= $$ $$ =\cos^2x-2n\cos x\sin x+n^2\sin^2 x=(n\sin x-\cos x)^2 $$ So: $$ \int\frac{\mathrm{d}x}{\sqrt{n^2+1}+\sin x+n\cos x}=\int\frac{(\sqrt{n^2+1}-\sin x-n\cos x)\mathrm{d}x}{(n\sin x-\cos x)^2} $$ Now use the formula: $$ \theta=\arctan\frac{b}{a}\qquad a\cos x+b\sin x=\sqrt{a^2+b^2}{\cos(x+\theta)} $$ To finish this up.

Result: $$ \int\frac{\mathrm{d}x}{\sqrt{n^2+1}+\sin x+n\cos x}=\frac{1-\sqrt{n^2+1} \sin (x)}{n \sin (x)-\cos (x)}$$ $$\int\frac{n\mathrm{d}x}{\sqrt{n^2+1}+n\sin x+\cos x}=\frac{\sqrt{n^2+1} \sin (x)-n}{n \cos (x)-\sin (x)}$$


This seems so easy in polar form. Let $1=r\cos\phi$, $n=r\sin\phi$, then $r=\sqrt{1+n^2}$, $\phi=\tan^{-1}n$ and then let $x+\phi=y+\frac{\pi}2$ $$\begin{align}\int_0^{\pi}\frac{dx}{\sqrt{1+n^2}+\sin x+n\cos x}&=\int_0^{\pi}\frac{dx}{\sqrt{1+n^2}(1+\sin(x+\phi))}\\ &=\int_{-\frac{\pi}2+\phi}^{\frac{\pi}2+\phi}\frac{dy}{\sqrt{1+n^2}(1+\cos y)}\\ &=\left.\frac{\sin y}{\sqrt{1+n^2}(1+\cos y)}\right|_{-\frac{\pi}2+\phi}^{\frac{\pi}2+\phi}\\ &=\frac1{\sqrt{1+n^2}}\left(\frac{\cos\phi}{1-\sin\phi}+\frac{\cos\phi}{1+\sin\phi}\right)\\ &=\frac1{\sqrt{1+n^2}}\left(\frac1{\sqrt{1+n^2}-n}+\frac1{\sqrt{1+n^2}+n}\right)\\ &=2\end{align}$$ The second integral, after the substitution $y=x-\phi$ becomes $$\begin{align}\int_0^{\pi}\frac{n\,dx}{\sqrt{1+n^2}+n\sin x+\cos x}&=\int_0^{\pi}\frac{n\,dx}{\sqrt{1+n^2}(1+\cos(x-\phi))}\\ &=\int_{-\phi}^{\pi-\phi}\frac{n\,dy}{\sqrt{1+n^2}(1+\cos y)}\\ &=2\end{align}$$

Tags:

Integration