I tried to integrate the following integral using Integrate[Sin[x]Csc[4x],x]
and I am getting a strange result.
$$\frac{1}{8 \sqrt{2}}\left(-2 i \text{ArcTan}\left[\frac{\text{Cos}\left[\frac{x}{2}\right]-\left(-1+\sqrt{2}\right) \text{Sin}\left[\frac{x}{2}\right]}{\left(1+\sqrt{2}\right) \text{Cos}\left[\frac{x}{2}\right]-\text{Sin}\left[\frac{x}{2}\right]}\right]-2 i \text{ArcTan}\left[\frac{\text{Cos}\left[\frac{x}{2}\right]-\left(1+\sqrt{2}\right) \text{Sin}\left[\frac{x}{2}\right]}{\left(-1+\sqrt{2}\right) \text{Cos}\left[\frac{x}{2}\right]-\text{Sin}\left[\frac{x}{2}\right]}\right]+2 \sqrt{2} \text{Log}\left[\text{Cos}\left[\frac{x}{2}\right]-\text{Sin}\left[\frac{x}{2}\right]\right]-2 \sqrt{2} \text{Log}\left[\text{Cos}\left[\frac{x}{2}\right]+\text{Sin}\left[\frac{x}{2}\right]\right]+2 \text{Log}\left[\sqrt{2}+2 \text{Sin}[x]\right]-\text{Log}\left[2-\sqrt{2} \text{Cos}[x]-\sqrt{2} \text{Sin}[x]\right]-\text{Log}\left[2+\sqrt{2} \text{Cos}[x]-\sqrt{2} \text{Sin}[x]\right]\right) $$
While the answer is
(1/8) Log[Sin[x] - 1] + (1/4) Sqrt[2] ArcTanh[Sin[x] Sqrt[2]] - (1/8) Log[1 + Sin[x]]
$$\frac{\text{ArcTanh}\left[\sqrt{2} \text{Sin}[x]\right]}{2 \sqrt{2}}+\frac{1}{8} \text{Log}[-1+\text{Sin}[x]]-\frac{1}{8} \text{Log}[1+\text{Sin}[x]] $$
Why am I getting this strange result? Are those two answers equivalent? How to avoid such strange results?
Integrate[Sin[x] Csc[4 x], {x, 0, 1/2}]
andNIntegrate[Sin[x] Csc[4 x], {x, 0, 1/2}]
they seem to agree which is a good sign. $\endgroup$atanh
. Please try to be more careful $\endgroup$