Integrate: (2x^2+5)/((x^2+1)(x^2+4))

I came up with:

(tan^-1)(x)-(1/2)((tan^-1)(2/x)) but it keeps coming back the wrong answer even though I integrated correctly. Is there a way to simplify this answer, and if so, how?

Your answer is correct, but I think you are supposed to simpify the last term using the formula:

arctan(1/x) = pi/2 - arctan(x).

The pi/2 term can then be absorbed in the integration constant.

To integrate the given expression:

∫(2x^2+5)/((x^2+1)(x^2+4)) dx

You attempted to solve it and arrived at the correct result, which is:

∫(2x^2+5)/((x^2+1)(x^2+4)) dx = arctan(x) - (1/2)arctan(2/x) + C

Now, let's simplify this answer by using the formula you mentioned:

arctan(1/x) = π/2 - arctan(x)

Applying this formula to the second term, we get:

(1/2)arctan(2/x) = (1/2)(π/2 - arctan(x))
= π/4 - (1/2)arctan(x)

Now, we can rewrite the original solution as:

arctan(x) - (1/2)arctan(2/x) + C
= arctan(x) - (π/4 - (1/2)arctan(x)) + C
= arctan(x) + (1/2)arctan(x) - π/4 + C
= (3/2)arctan(x) - π/4 + C

Therefore, the simplified answer is:

∫(2x^2+5)/((x^2+1)(x^2+4)) dx = (3/2)arctan(x) - π/4 + C

Where C is the constant of integration.