Really advanced techniques of integration (definite or indefinite) Okay, so everyone knows the usual methods of solving integrals, namely u-substitution, integration by parts, partial fractions, trig substitutions, and reduction formulas. But what else is there? Every time I search for "Advanced Techniques of Symbolic Integration" or "Super Advanced Integration Techniques", I get the same results which end up only talking about the methods mentioned above. Are there any super obscure and interesting techniques for solving integrals?

As an example of something that might be obscure, the formula for "general integration by parts " for $n$ functions $f_j, \ j = 1,\cdots,n$ is given by
$$
\int{f_1'(x)\prod_{j=2}^n{f_j(x)}dx} = \prod_{i=1}^n{f_i(x)} - \sum_{i=2}^n{\int{f_i'(x)\prod_{\substack{j=1 \\ j \neq i}}^n{f_j(x)}dx}}
$$
which is not necessarily useful nor difficult to derive, but is interesting nonetheless.

So out of curiosity, are there any crazy unknown symbolic integration techniques?
Here are a few. The first one is included because it's not very well known and is not general, though the ones that follow are very general and very useful.




A great but not very well known way to find the primitive of $f^{-1}$ in terms of  the primitive of $f$, $F$, is (very easy to prove: just differentiate both sides and use the chain rule):
$$
\int f^{-1}(x)\, dx = x \cdot f^{-1}(x)-(F \circ f^{-1})(x)+C.
$$ 


Examples: 


  $$
\begin{aligned}
\displaystyle \int \arcsin(x)\, dx
&amp;= x \cdot \arcsin(x)- (-\cos\circ \arcsin)(x)+C \\
&amp;=x \cdot \arcsin(x)+\sqrt{1-x^2}+C.
\end{aligned}
$$
  
  $$
\begin{aligned}
\int \log(x)\, dx
&amp;= x \cdot \log(x)-(\exp \circ \log)(x) + C \\
&amp;= x \cdot \left( \log(x)-1 \right) + C.
\end{aligned}
$$





This one is more well known, and extremely powerful, it's called differentiating under the integral sign. It requires ingenuity most of the time to know when to apply, and how to apply it, but that only makes it more interesting. The technique uses the simple fact that
$$
\frac{\mathrm d}{\mathrm d x} \int_a^b f \left({x, y}\right) \mathrm d y = \int_a^b \frac{\partial f}{\partial x} \left({x, y}\right) \mathrm d y.
$$


Example:


  We want to calculate the integral $\int_{0}^{\infty} \frac{\sin(x)}{x} dx$. To do that, we unintuitively consider the more complicated integral $\int_{0}^{\infty} e^{-tx} \frac{\sin(x)}{x} dx$ instead.
  
  Let $$ I(t)=\int_{0}^{\infty} e^{-tx} \frac{\sin(x)}{x} dx,$$ then $$ I'(t)=-\int_{0}^{\infty} e^{-tx} \sin(x) dx=\frac{e^{-t x} (t \sin (x)+\cos (x))}{t^2+1}\bigg|_0^{\infty}=\frac{-1}{1+t^2}.$$
  
  Since both $I(t)$ and $-\arctan(t)$ are primitives of $\frac{-1}{1+t^2}$, they must differ only by a constant, so that $I(t)+\arctan(t)=C$. Let $t\to \infty$, then $I(t) \to 0$ and $-\arctan(t) \to -\pi/2$, and hence $C=\pi/2$, and $I(t)=\frac{\pi}{2}-\arctan(t)$.
  
  Finally,
  $$
\int_{0}^{\infty} \frac{\sin(x)}{x} dx = I(0) = \frac{\pi}{2}-\arctan(0) = \boxed{\frac{\pi}{2}}.
$$





This one is probably the most commonly used "advanced integration technique", and for good reasons. It's referred to as the "residue theorem" and it states that if $\gamma$ is a counterclockwise simple closed curve, then $\displaystyle \int_\gamma f(z) dz = 2\pi i \sum_{k=1}^n \operatorname{Res} ( f, a_k )$ . It will be difficult for you to understand this one without knowledge in complex analysis, but you can get the gist of it with the wiki article.
Example:


  We want to compute $\int_{-\infty}^{\infty} \frac{x^2}{1+x^4} dx$.  The poles of our function $f(z)=\frac{x^2}{1+x^4}$ in the upper half plane are  $a_1=e^{i \frac{\pi}{4}}$ and $a_2=e^{i \frac{3\pi}{4}}$. The residues of our function at those points are
  $$\operatorname{Res}(f,a_1)=\lim_{z\to a_1} (z-a_1)f(z)=\frac{e^{i \frac{-\pi}{4}}}{4},$$
  and
  $$\operatorname{Res}(f,a_2)=\lim_{z\to a_2} (z-a_2)f(z)=\frac{e^{i \frac{-3\pi}{4}}}{4}.$$
  Let $\gamma$ be the closed path around the boundary of the semicircle of radius $R&gt;1$ on the upper half plane, traversed in the counter-clockwise direction. Then the residue theorem gives us ${1 \over 2\pi i} \int_\gamma f(z)\,dz=\operatorname{Res}(f,a_1)+\operatorname{Res}(f,a_2)={1 \over 4}\left({1-i \over \sqrt{2}}+{-1-i \over \sqrt{2}}\right)={-i \over 2 \sqrt{2}}$ and $ \int_\gamma f(z)\,dz= {\pi \over \sqrt{2}}$.
  Now, by the definition of $\gamma$, we have:
  $$\int_\gamma f(z)\,dz = \int_{-R}^R \frac{x^2}{1+x^4} dx + \int_0^\pi {i (R e^{it})^3 \over 1+(R e^{it})^4} dz = {\pi \over \sqrt{2}}.$$
  For the integral on the semicircle
  $$
\int_0^\pi {i (R e^{it})^3 \over 1+(R e^{it})^4} dz,
$$
  we have
  $$
\begin{aligned}
\left| \int_0^\pi {i (R e^{it})^3 \over 1+(R e^{it})^4} dz \right|
&amp;\leq \int_0^\pi \left| {i (R e^{it})^3 \over 1+(R e^{it})^4} \right| dz \\
&amp;\leq \int_0^\pi {R^3 \over R^4-1} dz={\pi R^3 \over R^4-1}.
\end{aligned}
$$
  Hence, as $R\to \infty$, we have ${\pi R^3 \over R^4-1} \to 0$, and hence $\int_0^\pi {i (R e^{it})^3 \over 1+(R e^{it})^4} dz \to 0$.
  Finally,
  $$
\begin{aligned}
\int_{-\infty}^\infty \frac{x^2}{1+x^4} dx
&amp;= \lim_{R\to \infty} \int_{-R}^R \frac{x^2}{1+x^4} dx  \\
&amp;= \lim_{R\to \infty} {\pi \over \sqrt{2}}-\int_0^\pi {i (R e^{it})^3 \over 1+(R e^{it})^4} dz =\boxed{{\pi \over \sqrt{2}}}.
\end{aligned}
$$






My final "technique" is the use of the mean value property for complex analytic functions, or Cauchy's integral formula in other words:
$$
\begin{aligned}
f(a)
&amp;= \frac{1}{2\pi i} \int_\gamma \frac{f(z)}{z-a}\, dz \\
&amp;= \frac{1}{2\pi} \int_{0}^{2\pi} f\left(a+e^{ix}\right) dx.
\end{aligned}
$$


Example:


  We want to compute the very messy looking integral $\int_0^{2\pi} \cos (\cos (x)+1) \cosh (\sin (x)) dx$. We first notice that
  $$
\begin{aligned}
&amp;\hphantom{=} \cos [\cos (x)+1] \cosh [\sin (x)] \\
&amp;=\Re\left\{
\cos [\cos (x)+1] \cosh [\sin (x)]
-i\sin [\cos (x)+1] \sinh [\sin (x)] 
\right\} \\
&amp;= \Re \left[ \cos \left( 1+e^{i x} \right) \right].
\end{aligned}
$$
  Then, we have
  $$
\begin{aligned}
\int_0^{2\pi} \cos [\cos (x)+1] \cosh [\sin (x)] dx
&amp;= \int_0^{2\pi} \Re \left[ \cos \left( 1+e^{i x} \right) \right] dx \\
&amp;= \Re \left[ \int_0^{2\pi} \cos \left( 1+e^{i x} \right) dx \right] \\
&amp;= \Re \left( \cos(1) \cdot 2 \pi \right)= \boxed{2 \pi \cos(1)}.
\end{aligned}
$$
If we have $$u(x)=\prod_{i=1}^nf_i(x)$$
Then, through the product rule:
$$u'(x)=\sum_{i=1}^{n}\prod_{j=1}^{n}f_j^{(\delta_{ij})}(x)$$
Where $\delta_{ij}$ is the Kronecker delta, $f^{(0)}(x)=f(x)$, and $f^{(1)}(x)=f'(x)$.

Thus,
$$\int\sum_{i=1}^{n}\prod_{j=1}^{n}f_j^{(\delta_{ij})}(x)dx=\prod_{i=1}^nf_i(x)+C$$
It's really specific, and I haven't used it yet, but it's still a pretty neat formula (especially with that product notation).

Here's another. Assume $I=\{1,2,\dots,n\}$ for any $n\in\Bbb N$, and $\forall i,j\in I, i\neq j\iff \alpha_i\neq \alpha_j$
$$G=\int\prod_{i\in I}\frac{1}{x-\alpha_i}dx$$
Using partial fraction decomposition, we get $$G=\sum_{i\in I}\beta_{ij}\int\frac{dx}{x-\alpha_i}$$
Where $$\beta_{ij}=\prod_{i\neq j\in I}\frac{1}{\alpha_i-\alpha_j}$$
Then of course, $$G=\sum_{i\in I}\beta_{ij}\ln|x-\alpha_i|$$
Which is also pretty fun to look at (but is also little more useful).