Integral of $$$\frac{x}{x^{2} + 6 x + 25}$$$

The calculator will find the integral/antiderivative of $$$\frac{x}{x^{2} + 6 x + 25}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \frac{x}{x^{2} + 6 x + 25}\, dx$$$.

Solution

Rewrite the linear term as $$$x=x\color{red}{+3-3}$$$ and split the expression:

$${\color{red}{\int{\frac{x}{x^{2} + 6 x + 25} d x}}} = {\color{red}{\int{\left(\frac{x + 3}{x^{2} + 6 x + 25} - \frac{3}{x^{2} + 6 x + 25}\right)d x}}}$$

Integrate term by term:

$${\color{red}{\int{\left(\frac{x + 3}{x^{2} + 6 x + 25} - \frac{3}{x^{2} + 6 x + 25}\right)d x}}} = {\color{red}{\left(\int{\frac{x + 3}{x^{2} + 6 x + 25} d x} + \int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x}\right)}}$$

Let $$$u=x^{2} + 6 x + 25$$$.

Then $$$du=\left(x^{2} + 6 x + 25\right)^{\prime }dx = \left(2 x + 6\right) dx$$$ (steps can be seen »), and we have that $$$\left(2 x + 6\right) dx = du$$$.

Thus,

$$\int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} + {\color{red}{\int{\frac{x + 3}{x^{2} + 6 x + 25} d x}}} = \int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} + {\color{red}{\int{\frac{1}{2 u} d u}}}$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(u \right)} = \frac{1}{u}$$$:

$$\int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} + {\color{red}{\int{\frac{1}{2 u} d u}}} = \int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} + {\color{red}{\left(\frac{\int{\frac{1}{u} d u}}{2}\right)}}$$

The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:

$$\int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} + \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{2} = \int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} + \frac{{\color{red}{\ln{\left(\left|{u}\right| \right)}}}}{2}$$

Recall that $$$u=x^{2} + 6 x + 25$$$:

$$\frac{\ln{\left(\left|{{\color{red}{u}}}\right| \right)}}{2} + \int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x} = \frac{\ln{\left(\left|{{\color{red}{\left(x^{2} + 6 x + 25\right)}}}\right| \right)}}{2} + \int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x}$$

Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=-3$$$ and $$$f{\left(x \right)} = \frac{1}{x^{2} + 6 x + 25}$$$:

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} + {\color{red}{\int{\left(- \frac{3}{x^{2} + 6 x + 25}\right)d x}}} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} + {\color{red}{\left(- 3 \int{\frac{1}{x^{2} + 6 x + 25} d x}\right)}}$$

Complete the square (steps can be seen »): $$$x^{2} + 6 x + 25 = \left(x + 3\right)^{2} + 16$$$:

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{x^{2} + 6 x + 25} d x}}} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{\left(x + 3\right)^{2} + 16} d x}}}$$

Let $$$u=x + 3$$$.

Then $$$du=\left(x + 3\right)^{\prime }dx = 1 dx$$$ (steps can be seen »), and we have that $$$dx = du$$$.

Therefore,

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{\left(x + 3\right)^{2} + 16} d x}}} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{u^{2} + 16} d u}}}$$

Let $$$v=\frac{u}{4}$$$.

Then $$$dv=\left(\frac{u}{4}\right)^{\prime }du = \frac{du}{4}$$$ (steps can be seen »), and we have that $$$du = 4 dv$$$.

So,

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{u^{2} + 16} d u}}} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{4 \left(v^{2} + 1\right)} d v}}}$$

Apply the constant multiple rule $$$\int c f{\left(v \right)}\, dv = c \int f{\left(v \right)}\, dv$$$ with $$$c=\frac{1}{4}$$$ and $$$f{\left(v \right)} = \frac{1}{v^{2} + 1}$$$:

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\int{\frac{1}{4 \left(v^{2} + 1\right)} d v}}} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - 3 {\color{red}{\left(\frac{\int{\frac{1}{v^{2} + 1} d v}}{4}\right)}}$$

The integral of $$$\frac{1}{v^{2} + 1}$$$ is $$$\int{\frac{1}{v^{2} + 1} d v} = \operatorname{atan}{\left(v \right)}$$$:

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 {\color{red}{\int{\frac{1}{v^{2} + 1} d v}}}}{4} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 {\color{red}{\operatorname{atan}{\left(v \right)}}}}{4}$$

Recall that $$$v=\frac{u}{4}$$$:

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left({\color{red}{v}} \right)}}{4} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left({\color{red}{\left(\frac{u}{4}\right)}} \right)}}{4}$$

Recall that $$$u=x + 3$$$:

$$\frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left(\frac{{\color{red}{u}}}{4} \right)}}{4} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left(\frac{{\color{red}{\left(x + 3\right)}}}{4} \right)}}{4}$$

Therefore,

$$\int{\frac{x}{x^{2} + 6 x + 25} d x} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left(\frac{x}{4} + \frac{3}{4} \right)}}{4}$$

Simplify:

$$\int{\frac{x}{x^{2} + 6 x + 25} d x} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left(\frac{x + 3}{4} \right)}}{4}$$

Add the constant of integration:

$$\int{\frac{x}{x^{2} + 6 x + 25} d x} = \frac{\ln{\left(\left|{x^{2} + 6 x + 25}\right| \right)}}{2} - \frac{3 \operatorname{atan}{\left(\frac{x + 3}{4} \right)}}{4}+C$$

Answer

$$$\int \frac{x}{x^{2} + 6 x + 25}\, dx = \left(\frac{\ln\left(\left|{x^{2} + 6 x + 25}\right|\right)}{2} - \frac{3 \operatorname{atan}{\left(\frac{x + 3}{4} \right)}}{4}\right) + C$$$A