# Evaluate $\int\frac{8x+20}{5x^2+25x+20}dx$

I tried to solve it and got $\frac{4}{5} \ln(4+5 x+x^2)+C$ as an answer, but my online homework program says it's incorrect. What did I do wrong?

I pulled out $\frac{4}{5}$ as a constant and saw that the numerator was the derivative of the denominator. So I put the denominator in a natural log.

• Show your work so we can point out the mistake Aug 21, 2014 at 0:42
• Or, differentiate your answer and see if you get the integrand given. Aug 21, 2014 at 0:44
• Your answer appears to be correct. What is the solution given by the online homework program?
Aug 21, 2014 at 0:44
• An answer written 4/5T could mean $4/(5T)$, which would be wrong. Or $(4/5)T$, which would be right. Who knows what Sally wrote to the program, or how the program interpreted it. Aug 21, 2014 at 0:46
– user105475
Aug 21, 2014 at 0:48

Substitute $u=5x^2+25x+20$, $du=10x+25$, then$$\int\frac{8x+20}{5x^2+25x+20}dx=\frac {4}{5} \int \frac {1}{u} du = \frac{4}{5} \ln|5(x^2+5x+4)|+C.$$

• Aha! $x^2+5x+4$ could be negative, so unless you are in a more advanced course (that allows complex numbers) you should take that into account. In fact, WolframAlpha is that advanced: it assumes complex numbers unless told otherwise. Aug 21, 2014 at 14:31
• In fact, I used this input on W|A to check my answer and it removed the $5$ inside the $\ln(x)$, which I never understood why. Aug 21, 2014 at 14:41
• Because $(4/5)\ln 5$ is a constant, so you may as well include it in the $C$. Aug 21, 2014 at 14:42
• How did I miss that lol. Thanks. Aug 21, 2014 at 14:45

$$\int \frac{8x+20}{5x^2+25x+20} dx=\int \frac{8x+20}{5(x+1)(x+4)} dx$$

$$\frac{8x+20}{5(x+1)(x+4)} =\frac{A}{5(x+1)}+\frac{B}{5(x+4)}=\frac{A(x+4)+B(x+1)}{5(x+1)(x+4)}$$

So:

$$A+B=8 \\ 4A+B=20$$

$$3A=12 \Rightarrow A=4$$

$$B=8-A=4$$

So:

$$\frac{8x+20}{5(x+1)(x+4)}=\frac{4}{5} \frac{1}{x+1}+\frac{4}{5} \frac{1}{x+4}$$

Therefore:

$$\int \frac{8x+20}{5(x+1)(x+4)} dx=\frac{4}{5} \ln |x+1|+\frac{4}{5} \ln |x+4|+c$$

• Wow the absolute value signs! I feel stupid! Aug 21, 2014 at 0:50

Here is a general method for integrals of this form. $$I = \int \frac{mx±n}{ax^2+bx+d}dx$$

$$I = \int \frac{\frac{m}{2a}(2ax+b) + (n - \frac{mb}{2a})}{(x+ \frac{b}{2a})^2 + (c -\frac{b^2}{4a^2})}dx = \frac{m}{2a}ln|ax^2 + bx + c| + (n- \frac{mb}{2a}) \int \frac{dx}{ax^2+bx+c}dx$$

depending on the quadratic in the bottom, the second integral will be in the form of either $\frac{1}{a}\arctan(\frac{u}{a})$ + C or $\frac{1}{2a}ln|\frac{u-a}{u+a}| + C$