# Jamie's question at Yahoo! Answers regarding an indefinite integral

#### MarkFL

Staff member
Here is the question:

Integrate (3x + 2)/(x^2+3x+1) dx?

Please tell me the name of the way you did it, for ex. Start with integration by parts, or substitution.

I got to the Integral of 1-(3u+2)/(u^2+3u+1)du where u = tanx
I have posted a link there to this thread so the OP can view my work.

#### MarkFL

Staff member
Hello Jamie,

We are given to evaluate:

$$\displaystyle I=\int\frac{3x+2}{x^2+3x+1}\,dx$$

I would look at the partial fraction decomposition of the integrand. Application of the quadratic formula gives us the roots of the denominator as:

$$\displaystyle x=\frac{-3\pm\sqrt{5}}{2}$$

Hence, we may state:

$$\displaystyle x^2+3x+1=\frac{1}{4}\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)$$

And so the integrand may be expressed as:

$$\displaystyle \frac{4(3x+2)}{\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)}$$

Thus, we may assume the partial fraction of this integrand will take the form:

$$\displaystyle \frac{4(3x+2)}{\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)}=\frac{A}{2x+3-\sqrt{5}}+\frac{B}{2x+3+\sqrt{5}}$$

Using the Heaviside cover-up method, we find:

$$\displaystyle A=\frac{4\left(3\left(\dfrac{-3+\sqrt{5}}{2} \right)+2 \right)}{2\left(\dfrac{-3+\sqrt{5}}{2} \right)+3+\sqrt{5}}=3-\sqrt{5}$$

$$\displaystyle B=\frac{4\left(3\left(\dfrac{-3-\sqrt{5}}{2} \right)+2 \right)}{2\left(\dfrac{-3-\sqrt{5}}{2} \right)+3-\sqrt{5}}=3+\sqrt{5}$$

And so we find:

$$\displaystyle \frac{4(3x+2)}{\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)}=\frac{3-\sqrt{5}}{2x+3-\sqrt{5}}+\frac{3+\sqrt{5}}{2x+3+\sqrt{5}}$$

And we may now state:

$$\displaystyle I=\frac{3-\sqrt{5}}{2}\int\frac{2}{2x+3-\sqrt{5}}\,dx+\frac{3+\sqrt{5}}{2}\int\frac{2}{2x+3+\sqrt{5}}\,dx$$

Using the integration rule:

$$\displaystyle \int\frac{du}{u+a}\,du=\ln|u+a|+C$$

we find:

$$\displaystyle I=\frac{3-\sqrt{5}}{2}\ln|2x+3-\sqrt{5}|+\frac{3+\sqrt{5}}{2}\ln|2x+3+\sqrt{5}|+C$$

$$\displaystyle I=\frac{1}{2}\left((3-\sqrt{5})\ln|2x+3-\sqrt{5}|+(3+\sqrt{5})\ln|2x+3+\sqrt{5}| \right)+C$$

And in conclusion, we may now state:

$$\displaystyle \int\frac{3x+2}{x^2+3x+1}\,dx=\frac{1}{2}\left((3-\sqrt{5})\ln|2x+3-\sqrt{5}|+(3+\sqrt{5})\ln|2x+3+\sqrt{5}| \right)+C$$

#### Prove It

##### Well-known member
MHB Math Helper
Here is the question:

I have posted a link there to this thread so the OP can view my work.
When I look at integration problems, the first thing I always look for are simple substitutions...

\displaystyle \begin{align*} \int{\frac{3x + 2}{x^2 + 3x + 1}\,dx} &= 3\int{\frac{x + \frac{2}{3}}{x^2 + 3x + 1} \, dx} \\ &= \frac{3}{2} \int{ \frac{2x + \frac{4}{3}}{x^2 + 3x + 1} \, dx } \\ &= \frac{3}{2} \int{\frac{2x + 3 - \frac{5}{3}}{x^2 + 3x + 1}\,dx} \\ &= \frac{3}{2} \int{ \frac{2x + 3}{x^2 + 3x + 1}\,dx } - \frac{3}{2}\int{\frac{\frac{5}{3}}{x^2 + 3x + 1} \, dx} \\ &= \frac{3}{2} \int{ \frac{2x + 3}{x^2 + 3x + 1}\, dx} - \frac{5}{2} \int{ \frac{1}{x^2 + 3x + \left( \frac{3}{2} \right) ^2 - \left( \frac{3}{2} \right) ^2 + 1 } \, dx} \\ &= \frac{3}{2} \int{ \frac{2x + 3}{x^2 + 3x + 1} \, dx} - \frac{5}{2} \int{ \frac{1}{ \left( x + \frac{3}{2} \right) ^2 - \frac{5}{4} } \, dx} \end{align*}

Now making the substitutions \displaystyle \begin{align*} u = x^2 + 3x + 1 \implies du = \left( 2x + 3 \right) \, dx \end{align*} and \displaystyle \begin{align*} x + \frac{3}{2} = \frac{\sqrt{5}}{2}\cosh{(t)} \implies dx = \frac{\sqrt{5}}{2}\sinh{(t)}\,dt \end{align*} and we get

\displaystyle \begin{align*} \frac{3}{2} \int{ \frac{2x + 3}{x^2 + 3x + 1} \, dx} - \frac{5}{2} \int{ \frac{1}{ \left( x + \frac{3}{2} \right) ^2 - \frac{5}{4} } \, dx} &= \frac{3}{2} \int{ \frac{1}{u}\,du } - \frac{5}{4} \int{ \frac{1}{\left[ \frac{\sqrt{5}}{2} \cosh{(t)} \right] ^2 - \frac{5}{4}} \, \frac{\sqrt{5}}{2}\sinh{(t)}\,dt } \\ &= \frac{3}{2} \ln{|u|} - \frac{5\sqrt{5}}{8} \int{ \frac{\sinh{(t)}}{\frac{5}{4} \left[ \cosh^2{(t)} - 1 \right]}\,dt } \\ &= \frac{3}{2} \ln{ \left| x^2 + 3x + 1 \right| } - \frac{\sqrt{5}}{2}\int{ \frac{\sinh{(t)}}{\sinh{(t)}}\,dt } \\ &= \frac{3}{2}\ln{ \left| x^2 + 3x + 1 \right| } - \frac{\sqrt{5}}{2} \int{ 1 \, dt} \\ &= \frac{3}{2} \ln{ \left| x^2 + 3x + 1 \right| } - \frac{\sqrt{5}}{2} t + C \\ &= \frac{3}{2} \ln{ \left| x^2 + 3x + 1 \right| } - \frac{\sqrt{5}}{2} \,\textrm{arcosh}\, { \left[ \frac{\sqrt{5} \, \left( 2x + 3 \right) }{5} \right] } + C \end{align*}