Question
Question: The indefinite integral $\int \frac{dx}{(x^2+4x+5)^2}$ equals:...
The indefinite integral ∫(x2+4x+5)2dx equals:

2(x2+4x+5)x+2+21arctan(x+2)+C
Solution
To evaluate the indefinite integral ∫(x2+4x+5)2dx, we first complete the square in the denominator:
x2+4x+5=(x2+4x+4)+1=(x+2)2+1.
The integral becomes ∫((x+2)2+1)2dx.
Let u=x+2. Then du=dx. The integral transforms to ∫(u2+1)2du.
This is a standard integral. We can solve this using trigonometric substitution. Let u=tanθ. Then du=sec2θdθ. Also, u2+1=tan2θ+1=sec2θ.
The integral becomes ∫(sec2θ)2sec2θdθ=∫sec4θsec2θdθ=∫sec2θ1dθ=∫cos2θdθ.
Using the identity cos2θ=21+cos(2θ), the integral is: ∫21+cos(2θ)dθ=21∫(1+cos(2θ))dθ=21(θ+21sin(2θ))+C=21θ+41sin(2θ)+C.
Now, we express this in terms of u. Since u=tanθ, we have θ=arctan(u). For sin(2θ), we use sin(2θ)=2sinθcosθ. From u=tanθ=1u, we can form a right triangle with opposite side u and adjacent side 1. The hypotenuse is u2+1. So, sinθ=u2+1u and cosθ=u2+11. sin(2θ)=2(u2+1u)(u2+11)=u2+12u.
Substituting back: 21arctan(u)+41(u2+12u)+C=21arctan(u)+2(u2+1)u+C.
Finally, substitute back u=x+2: 21arctan(x+2)+2((x+2)2+1)x+2+C=21arctan(x+2)+2(x2+4x+5)x+2+C.
Thus, the indefinite integral is 2(x2+4x+5)x+2+21arctan(x+2)+C.