How to find the indefinite integral of $\sqrt{x^2}$ with respect to $x$ without simplifying it to $|x|$ (which would be wrong in a complex setting)?
What I wanted to know generally how to integrate symbolically a power of a power without simplifying it with the power-rule. Mathematica is giving:
$\int{(x^n)^a}{dx} = \frac{x(x^n)^a}{1+an}$
How does Mathematica find this formula? With substitution, table lookup or another technique?