Integration by inverse trigonometric substitution

integrationtrigonometric-integralstrigonometry

I'm trying to integrate by inverse trigonometric substitution, and I have an answer (though I'm pretty sure it is wrong), but it is not the answer that the solution provides. I need to check where I went wrong and what I should do differently.
This is the question:$$
\int\frac{1}{(a^2-x^2)^2}dx$$

And this is what I got:$$
\frac{1}{a^4}\frac{1}{2}(\sec\theta\tan\theta+\ln|\sec\theta+\tan\theta|)+C=\frac{x}{2a^4(a^2-x^2)}+\frac{\ln|\frac{a+x}{2a\sqrt{a^2-x^2}}|}{2a^3}+C$$

Whereas the solution should be:$$
\frac{x}{2a^2(a^2-x^2)}+\frac{1}{4a^3}\ln|\frac{x+a}{x-a}|+C$$

What I attempted was to do a by-parts once I got this: $$
\frac{1}{a^4}\int{\sec^3\theta d\theta} = \int\sec^2\theta\sec\theta d\theta
$$

Thank you very much for your time and help.

Best Answer

Substitution $x=a\sin\theta$ to proceed as follows \begin{align} \int\frac1{(a^2-x^2)^2}dx =&\frac1{a^3} \int \sec^3\theta d\theta = \frac1{2a^3} \int \frac{\sec\theta }{\tan\theta}d(\tan^2\theta)\\ =& \frac1{2a^3}\sec\theta\tan\theta + \frac1{2a^3} \int {\sec\theta }d\theta \\ = &\frac1{2a^3}\sec\theta\tan\theta + \frac1{2a^3} \ln|\sec\theta+\tan\theta|\\ = &\frac1{2a^3}\frac{\sin\theta }{\cos^2\theta}+ \frac1{2a^3} \ln|\frac{1+\sin\theta}{\cos\theta}|\\ =& \frac{x}{2a^2(a^2-x^2)} +\frac{1}{2a^3}\ln|\frac{x+a}{\sqrt{a^2-x^2}}|\\ =& \frac{x}{2a^2(a^2-x^2)} +\frac{1}{4a^3}\ln|\frac{(a+x)^2}{a^2-x^2}|\\ =& \frac{x}{2a^2(a^2-x^2)} +\frac{1}{4a^3}\ln|\frac{x+a}{x-a}| \end{align}

Related Question