Solve this integral $\int \frac{dx} {\sin^5{x}}$ Let us denote
$$I_{m,n} = \int \sin^m{x} \cos^n{x}\ dx$$
where $m,n$ are integers (possibly negative or zeros).
There are some well-known recurrent formulas for $I_{m,n}$
So... as an example I was trying to solve this particular integral
$$\int \frac{dx} {\sin^5{x}}$$
using these recurrent formulas and I finally got this answer
(the computations were not very long, just 1 or 2 A4 sheets):
$$F(x) = \frac{5}{8} \ln {|\tan \frac{x}{2}|} - \frac{5}{24} \cdot \frac{\cos{x}}{\sin^2{x}} - \frac{1}{6} \cdot \frac{\cos{x}}{\sin^4{x}}$$
But WA is not giving me a simple expression when I differentiate $F(x)$
Is my answer incorrect? How do I check it with some tool other than WA?
Any ideas how to verify?
EDIT: Now I fixed the issues in my calculations and I am getting this answer.
$$\frac{3}{8}\ln|\tan(\frac{x}{2})|-\frac{3}{8}\frac{\cos(x)}{\sin^{2}(x)}-\frac{1}{4}\frac{\cos(x)}{\sin^{4}(x)}$$
But it still does not match with the WA answer...
WA answer
Which one is correct here?

You made a mistake somewhere. From WA and after simplifications you should have (what I get):
$$\frac{3}{8}\ln|\tan(\frac{x}{2})|-\frac{3}{8}\frac{\cos(x)}{\sin^{2}(x)}-\frac{1}{4}\frac{\cos(x)}{\sin^{4}(x)}$$
Let me know!

I think the $24\ln|\tan(\frac{x}{2})|$ is clear and we multiplied it by $\frac{1}{64}$ to give the correct term.
Then re-write the remaining terms (from WA) as:
$$\frac{1}{64}\big[-\frac{1}{\sin^{4}(\frac{x}{2})}-\frac{6}{\sin^{2}({\frac{x}{2})}}+\frac{1}{\cos^{4}(\frac{x}{2})}+\frac{6}{\cos^{2}({\frac{x}{2})}}\big]$$
$$=\frac{6}{64}\big[\frac{\sin^{2}(\frac{x}{2})-\cos^{2}(\frac{x}{2})}{\sin^2({\frac{x}{2})\cos^{2}(\frac{x}{2})}}\big]+\frac{1}{64}\big[\frac{\sin^{4}(\frac{x}{2})-\cos^{4}(\frac{x}{2})}{\sin^4({\frac{x}{2})\cos^{4}(\frac{x}{2})}}\big].$$
Then using $\cos^2(x)-\sin^2(x)=\cos(2x)$ and $\sin(2x)=2\sin(x)\cos(x)$ the first term becomes:
$$\frac{6}{64}\big[\frac{\sin^{2}(\frac{x}{2})-\cos^{2}(\frac{x}{2})}{\sin^2({\frac{x}{2})\cos^{2}(\frac{x}{2})}}\big]=-\frac{3}{32}\big[\frac{\cos(x)}{\frac{\sin^{2}(x)}{4}}\big]=-\frac{3}{8}\frac{\cos(x)}{\sin^{2}(x)}.$$
For the other term we have (numerator is of the form $(A^2-B^2)=(A-B)(A+B)$):
$$-\frac{1}{64}\big[\frac{\cos^{2}(\frac{x}{2})-\sin^2({\frac{x}{2})}}{\frac{\sin^{4}(x)}{2^4}}\big]=-\frac{1}{4}\frac{\cos(x)}{\sin^{4}(x)}.$$
