# Evaluate $\int \frac {\sin(x)}{x^2 + 4x + 5}dx$

Question:

Evaluate $$\int \frac{\sin(x)}{x^2 + 4x + 5} dx=\int \frac {\sin(x)}{(x + 2)^2 + 1}dx$$

By using the change of variable $y = x + 2$ we have that $dy = dx$ then

$$I = \int \frac{\sin(y - 2)}{y^2 + 1} dy$$

$f = \sin(y - 2)$, $f' = \cos(y - 2)$

$g' = \frac {1} {y^2 + 1}$, $g = \arctan(y)$

$I = \sin(y - 2) \cdot \arctan(y) + \int \cos(y - 2) \arctan(y) dy$

$I_1 = \int \cos(y - 2) \cdot \arctan(y) dy$

How can I solve?

• There is no closed form using elementary functions. A solution using the cosine and sine integrals can be found here goo.gl/7J5Aez – MrYouMath Jun 25 '16 at 10:12
• I can search my integral on wolpharm but i need explanation for this... – Ionut Alexandru Jun 25 '16 at 10:16
• use partial fractions+cosine and sine integrals – MrYouMath Jun 25 '16 at 10:26
• There is nothing to evaluate since the integration range is not given. The integrand function does not have an elementary antiderivative, but the integral over $\mathbb{R}$ is easy to compute through the residue theorem. If you are interested in that, please write it. – Jack D'Aurizio Jun 25 '16 at 16:32

This answer is inspired by the tag used by the OP.

You may find the value of $$\int_{-\infty}^{\infty} \frac{\sin (x)}{(x+2)^2 + 1} dx$$ by using complex integration. Consider the function $f(z) = \frac{1}{(z +2)^2 +1}$ then $f(z) e^{iz}$ is analytic everywhere on and above the real axis except at the point $z = -2 + i$.

Let $C_R$ be the upper half of the the circle $|z| = R$, with $R > 2$ from $z = -R$ to $z = R$.

Then integrating $f(z) e^{iz}$ yields

$$\int_{-R}^{R} \frac{e^{ix}}{(x+2)^2 + 1} dx = 2\pi i \,\,\mathrm{Res}_{z = -2 + i}\,\, [f(z)e^{iz}] - \int_{C_R} f(z)e^{iz} dz \tag{*}$$

where $\mathrm{Res}_{z = -2 + i}\,\, [f(z)e^{iz}] = \frac{e^{-1}(\cos 2 - i\sin 2)}{2i}$ and by showing that $\int_{C_R} f(z)e^{iz} dz \to 0$ as $R \to \infty$ (why?) thus we have that the imaginary part of $(*)$ is

$$\int_{-\infty}^{\infty} \frac{\sin (x)}{(x+2)^2 + 1} dx = \color{red}{-\frac{\pi\sin 2}{e}}$$

as $R \to \infty$.

• Hey! Why can you use $e^{iz}$ instead of Sin(x) and why do you only consider the imaginary part of (*)? Thank you – Bob Pen Apr 17 '20 at 13:57
• This kind of technique is commonly used in complex analysis. I recommend looking into Churchill and Brown's book - Complex variables and applications. – Aaron Maroja Apr 17 '20 at 22:25