# Is there something wrong about my solution to $\int \frac{1}{\sin(x) + \cos(x)} dx$?

by user509051   Last Updated January 14, 2018 13:20 PM

I'm trying to find the integral $\int \frac{1}{\sin(x) + \cos(x)} dx$. This is my solution:

$\int \frac{1}{\sin(x) + \cos(x)} dx = \int \frac{1}{\sqrt{2} \sin(x + \frac{\pi}{4})} = \frac{1}{\sqrt{2}} \int \csc(x+\frac{\pi}{4}) dx = -\frac{1}{\sqrt{2}} \ln(\csc(x+\frac{\pi}{4}) + \cot(x+\frac{\pi}{4}))$.

I used WolframAlpha to differentiate this result to check if I get the integrand and I got it.

However, when I query WolframAlpha to integrate $\int \frac{1}{\sin(x) + \cos(x)} dx$ itself, the result looks (is?) very different (involves complex numbers too), which makes me doubt the correctness of my solution. Is there something wrong about my method?

Tags :