How find this integral $\int\frac{\sin{x}}{\sqrt{2}+\sin{x}+\cos{x}}dx$ Find the  integral 
$$\int\dfrac{\sin x}{\sqrt{2}+\sin x+\cos x} \, dx$$
My idea: since
$$\sin x+\cos x=\sqrt{2}\sin(x+\dfrac{\pi}{4})$$
so
$$\int\dfrac{\sin x}{\sqrt{2}+\sin x +\cos x} \, dx=\int\dfrac{\sin x}{\sqrt{2}(1+\sin (x+\dfrac{\pi}{4})} \, dx$$
But then I don't know how to continue. Thank you
 A: Hint: lab bhattacharjee's Weierstrass substitution hint is very appropriate of course, but it would be nice if more of the algebra tedium could be obviated. Try,
$$\int\dfrac{\sin{x}}{\sqrt{2}+\sin{x}+\cos{x}}dx
=\frac{1}{\sqrt{2}}\int\dfrac{\sin{x}}{1+\sin{(x+\dfrac{\pi}{4})}}dx\\
=\frac{1}{\sqrt{2}}\int\dfrac{\sin{(\phi-\frac{\pi}{4})}}{1+\sin{\phi}}d\phi\\
=\frac{1}{2}\int\dfrac{\sin{\phi}-\cos{\phi}}{1+\sin{\phi}}d\phi$$
Now use the Weierstrass substitution.
A: It is a nice idea. For no essential reason, I would prefer to use $\sin x+\cos x=\sqrt{2}\cos(x-\pi/4)$. Making the substitution $t=x-\pi/4$, and using the fact that the $\sin x$ on top is equal to $\frac{\sin t+\cos t}{\sqrt{2}}$, we arrive at the integral 
$$\int\frac{1}{2}\frac{\sin t+\cos t}{1+\cos t}\,dt.$$
Now note that $1+\cos t=2\cos^2(t/2)$, and express the numerator as $2\sin(t/2)\cos(t/2)+2\cos^2(t/2)-1$. The rest is downhill.  
A: In general, Weierstrass is probably a good idea for such trigonometric integrals.  However, your progress left the denominator much more manageable.  I would start as in David H's answer up until the step
$$\frac12\int\frac{\sin\theta-\cos\theta}{1+\sin\theta}d\theta$$
Instead of Weierstrass from here, simply multiply by $\frac{1-\sin\theta}{1-\sin\theta}$
$$\frac12\int\frac{(\sin\theta-\cos\theta)(1-\sin\theta)}{1-\sin^2\theta}d\theta=\frac12\int\frac{\sin\theta-\cos\theta-\sin^2\theta+\sin\theta\cos\theta}{\cos^2\theta}d\theta=$$
$$\frac12\int\sec\theta\tan\theta d\theta-\frac12\int\sec\theta d\theta-\frac12\int(\sec^2\theta-1)d\theta+\frac12\int\tan\theta d\theta$$
You should have no trouble with these remaining integrals.
A: HINT:
Let
 $$\sin x=A(\sqrt2+\sin x+\cos x)-B d(\sqrt2+\sin x+\cos x)+C$$
$$\implies\sin x=\sqrt2A+C+\sin x(A+B)+\cos x(A-B)$$
$$\implies A-B=0\iff A=B,A+B=1\implies A=B=\frac12,C=-\sqrt2A=\cdots$$
Use Weierstrass substitution 
Can you take it home form here?
