Mark M. answered 07/24/21
Retired math prof. Calc 1, 2 and AP Calculus tutoring experience.
Let x = atanθ. Then dx = asec2θdθ
So the integral becomes ∫ [asec2θ] / [a2tan2θ + a2]2 = ∫ [asec2θ] / [a4(tan2θ+1)2]dθ = (1/a3)∫cos2θdθ =
(1/a3)∫ [(1+cos(2θ))/2]dθ = (1/(2a3)) [θ+ (1/2)sin2θ] + C = (1/(2a3))[θ+ sinθcosθ]
Since tanθ = x/2, θ = Tan-1(x/2), sinθ = x / √(x2+4) and cosθ = 2/√(x2+4)
So, we have (1/(2a3)) [Tan-1(x/2) + 2x / (x2+4)] + C