Integrating using partial fractions on $\frac{x^3-2x^2+x+1}{x^4+5x^2+4}$

calculusintegrationpartial fractions

I was given the following function and asked to integrate with respect to $x$: $$\frac{x^3-2x^2+x+1}{x^4+5x^2+4}$$ I did so, but got a different answer than the answer key. This is my work: $$(1)\ \text{First factoring the denominator gives: }(x^2+4)(x^2+1)\\(2) \text{We can now set up a partial fraction: } \frac{Ax+B}{x^2+4}+\frac{Cx+D}{x^2+1}\\(3)\text{After putting the two fractions together, our numerator is: } \\Ax^3+Ax+Bx^2+B+Cx^3+4Cx+Dx^2+4D\\(4) \text{Setting this equal to the numerator of the original function and solving gets:}\\A=1; B=-3; C=0; D=1\\(5)\text{Our integral is now: }\int\frac{x-3}{x^2+4}+\frac{1}{x^2+1}\ dx\\(6)\text{The second part is easily integrated, and the first is split into two parts: }\\\arctan(x)+\int\frac{x}{x^2+4}+\frac{-3}{x^2+4}\ dx\\(7)\text{Using the substitution }u=x^2\text{ we can solve the first part of the integral, giving: }\\\arctan(x)+\frac{\ln|x^2+4|}{2}-3\int\frac{1}{x^2+4}\ dx\\(8)\text{We can now finish up: }\arctan(x)+\frac{\ln|x^2+4|}{2}-\frac32\arctan(\frac{x}2)+C$$

The answer given was $$\arctan\,x+\frac{1}{2}(x^2+4)-\frac{3}{2}\arctan\bigg(\frac{x}{2}\bigg)+C$$ Did they simply leave out the ln in the second term by accident?

Best Answer

$$\int \frac{x^3-2x^2+x+1}{x^4+5x^2+4} dx={\displaystyle\int}\dfrac{x^3-2x^2+x+1}{\left(x^2+1\right)\left(x^2+4\right)}\,\mathrm{d}x$$ $$={\displaystyle\int}\left(\dfrac{x-3}{x^2+4}+\dfrac{1}{x^2+1}\right)\mathrm{d}x$$ $$={\displaystyle\int}\dfrac{x-3}{x^2+4}\,\mathrm{d}x+{\displaystyle\int}\dfrac{1}{x^2+1}\,\mathrm{d}x$$ $$={\displaystyle\int}\dfrac{1}{x^2+1}\,\mathrm{d}x+{\displaystyle\int}\dfrac{x}{x^2+4}\,\mathrm{d}x-3{\displaystyle\int}\dfrac{1}{x^2+4}\,\mathrm{d}x$$ $$=\arctan(x)+\frac{\ln|x^2+4|}{2}-\frac32\arctan\left(\frac{x}2\right)+C$$where $~C~$ is an integrating constant.

Question: Did they simply leave out the ln in the second term by accident?

Answer: @Burt, your process is absolutely alright. There is nothing wrong in your answer.

I think there is a typo in the answer provided to you.

Related Question