- #1

Rectifier

Gold Member

- 313

- 4

The problem

The problem

$$ \int \frac{x^2+8x+4}{x^2+4x+8} dx $$

Relevant equations

Relevant equations

$$ \int \frac{1}{x} dx = \ln |x| + C \\

\int \frac{1}{x^2+1} dx =arctan x + C

$$

The attempt at a solution

The attempt at a solution

I am starting with a polynomial division and rewrite the fraction as

## \int \frac{x^2+8x+4}{x^2+4x+8} dx = \int 1 + \frac{4x-4}{x^2+4x+8} dx ##

Since divisor is irreducible, I must complete the square and adapt the quotient to use the standard formula for a function that has a primitive which is ##arctan x +C## as follows.

$$ \int 1 + \frac{4x-4}{x^2+4x+8} dx = x + \int \frac{4x-4}{(x+2)^2+4} dx \\ x + \int \frac{4(x-1)}{\frac{4}{4}(x+2)^2+4} dx \\ x + \int \frac{4(x-1)}{4 \left( \frac{(x+2)^2}{4}+1 \right)} dx \\ x + \int \frac{4(x-1)}{4 \left( \left( \frac{x+2}{2} \right)^2+1 \right)} dx \\ x + \int \frac{x-1}{ \left( \frac{x+2}{2} \right)^2+1} dx $$

I split the qotent:

$$ x + \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1} dx $$

Lets focus on the part that has ##x## as divisor.

$$ \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx $$

I perform a variable substitutution ## [t= \frac{x+2}{2} \Leftrightarrow x = 2t-2, \frac{dt}{dx} = \frac{1}{2} \Leftrightarrow 2 dt = dx] ##. That results in

$$\int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx = 2 \left( \int \frac{2t-2}{ t^2+1} dt \right) = 2 \int \frac{2t}{ t^2+1} dt - 2 \cdot 2 \int \frac{1}{ t^2+1} dt$$

I split the quotient once more and focus on the part that has ##2t## as divisor where I make one more variable substitution ##[g=t^2+1, \frac{dg}{dt}=2t \Leftrightarrow 2t dt = dg]##

$$ 2 \int \frac{2t}{ t^2+1} dt = 2 \int \frac{1}{g} dg = 2 \ln|g| + C = 2 \ln|t^2+1| + C = \ln| \left(\frac{x+2}{2} \right)^2 + 1|+ C$$

I use back-substitution in the last steps.Now, let's add the rest of the integrals that we didn't focus on before:

$$ x + \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1} dx \\ x + \ \ 2 \int \frac{2t}{ t^2+1} dt - 2 \cdot 2 \int \frac{1}{ t^2+1} dt - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1}\\ x + \ \ 2\ln| \left(\frac{x+2}{2} \right)^2 + 1| - 4 \arctan t - 2 \arctan(\left(\frac{x+2}{2} \right)) + C \\ x + \ \ 2\ln| \left(\frac{x+2}{2} \right)^2 + 1| - 6 \arctan(\left(\frac{x+2}{2} \right)) + C$$

**I am not interested in alternative ways to solve the problem but to find the error in my calculations.**

Please help.

The part that differs from the answer in my book is inside ## \ln ## and not by much (see spoiler)

It differs only by a multiple of 4. In my book the contents of ln are: 2 \ln( x^2 + 4x + 8 )

.