My title is pretty vague, so let me elaborate on what exactly it is that I am looking for.
I came across this integral
$$ \int \frac{x \sin x }{1 + \cos^{2}x } dx $$
Now, I know that this indefinite integral is a monstrosity, and its answer alone is more than half a page long. I checked it on Wolfram Alpha, but what I couldn’t find anywhere was how does one evaluate such an integral in the first place.
In calculus classes we are taught basic techniques like integration by parts and u-substitution, and in the case of definite integrals maybe things like Feynman’s technique. But none of these techniques seem like they would be able to handle this monster. I thought of integrating by parts but then you end up with the indefinite integral of $ \tan^{-1}({- \cos x) }$ How would one handle this type of an integral ?
So basically what I am looking for is a step by step solution to the integral above, and also for techniques/theorems which are not generally taught in introductory calculus classes, but which serve as an indispensable tool for calculating these tough integrals. If you can provide any resources for further information on these topics then that would be great. I would also appreciate resources in genaral which serve as a great source to take a deep dive in the world of integrals.
I also have a follow up question to this - how do WolframAlpha or mathematica figure out these integrals ?
Thank you in advance.