# Calculus/Integration techniques/Integration by Complexifying

 ← Integration techniques/Integration by Parts Calculus Integration techniques/Partial Fraction Decomposition → Integration techniques/Integration by Complexifying

This technique requires an understanding and recognition of complex numbers. Specifically Euler's formula:

$\cos \theta + i\cdot \sin \theta = e^{i \cdot \theta}$

Recognize, for example, that the real portion:

$\mathrm{Re}\{ e^{i \cdot \theta} \} = \cos \theta$

Given an integral of the general form:

$\int e^{x} \cos {2x} \; dx$

We can complexify it:

$\int \mathrm{Re}\{ e^{x} (\cos {2x} + i\cdot \sin {2x}) \} \; dx$

$\int \mathrm{Re}\{ e^{x} (e^{i 2x}) \} \; dx$

With basic rules of exponents:

$\int \mathrm{Re}\{ e^{x + i2x} \} \; dx$

It can be proven that the "real portion" operator can be moved outside the integral:

$\mathrm{Re}\{ \int e^{x(1 + 2i)} \; dx \}$

The integral easily evaluates:

$\mathrm{Re}\{ \frac{e^{x(1 + 2i)}}{1 + 2i} \}$

Multiplying and dividing by (1-2i):

$\mathrm{Re} \{ \frac{1 - 2i}{5} e^{x(1 + 2i)} \}$

Which can be rewritten as:

$\mathrm{Re} \{ \frac{1 - 2i}{5} e^{x} e^{i2x} \}$

Applying Euler's forumula:

$\mathrm{Re} \{ \frac{1 - 2i}{5} e^{x} (\cos 2x + i\cdot \sin 2x) \}$

Expanding:

$\mathrm{Re} \{ \frac{e^{x}}{5} (\cos 2x +2 \sin 2x) + i\cdot \frac{e^{x}}{5} (\sin 2x -2 \cos 2x) \}$

Taking the Real part of this expression:

$\frac{e^{x}}{5} (\cos 2x +2 \sin 2x)$

So:

$\int e^{x} \cos {2x} \; dx = \frac{e^{x}}{5} (\cos 2x +2 \sin 2x)+C$