My AP Calculus BC class doesn't teach trig substitution, but the homework had a problem that required it. I experimented with trig substitution until I figured it out enough to solve the problem. Then, I tried to find the generalized solution for all values of a and got the following result:
$$\int \frac{\mathrm dx}{(x^2 + a^2)^2} = \frac{\arctan\left(\frac{x}{a}\right)}{2a^3} + \frac{x}{2a^2(x^2 + a^2)} + C$$
My attempt:
Using the substitution $ x = a\tan(\theta), \theta\in\left(-\frac\pi2,\frac\pi2\right)$ and applying the identity $ \tan^2(\theta) + 1 = \sec^2(\theta) $ gives: $$\int \frac{\mathrm{d}x}{(a^2\sec^2(\theta))^2}=\int \frac{\mathrm{d}x}{a^4\sec^4 (\theta)}$$
since $ x = a\tan(\theta)\implies\mathrm dx=a\sec^2(\theta)\mathrm d\theta $.
Substituting this into the integral above and pulling out the $a$ terms gives $$\frac{1}{a^3}\int\frac{\sec^2(\theta) \mathrm{d}\theta}{\sec^4(\theta)} = \frac{1}{a^3}\int\frac{\mathrm d\theta}{\sec^2(\theta)} = \frac{1}{a^3}\int\cos^2(\theta)\mathrm d\theta $$
Using the identity $\cos^2(\theta) = \frac{1+\cos(2\theta)}{2} $ gives
$$\begin{align}\frac{1}{a^3} \int\frac{1+\cos(2\theta)\mathrm d\theta}{2}&=\frac{1}{2a^3}\int\mathrm d\theta + \frac{1}{2a^3} + \int\cos(2\theta)\mathrm d\theta\\&= \frac{\theta}{2a^3} + \frac{\sin(2\theta)}{4a^3}+C\end{align}$$
Since $x=a\tan(\theta)\theta\in\left(-\frac\pi2,\frac\pi2\right)\implies\theta = \arctan(\frac{x}{a})$, which means that the left portion simplifies to $\frac{\arctan(\frac{x}{a})}{2a^3}$
To find simplify the right side, we can use the identity $\sin(2\theta) = 2\sin(\theta)\cos(\theta)$. If $\tan(\theta) = \frac{x}{a}$, $$\sec^2(\theta) = 1+\tan^2(\theta) = 1 + \frac{x^2}{a^2}= \frac{x^2+a^2}{a^2}$$ This means that $$\cos(\theta) = \frac{a}{\sqrt{x^2+a^2}}$$
$\sin^2(\theta) + \cos^2(\theta) = 1$, so $$\begin{align}\sin(\theta)&= \sqrt{1-\cos^2(\theta)}\\&= \sqrt{1-\frac{a^2}{a^2+x^2}}\\&= \sqrt{\frac{a^2+x^2-a^2}{a^2+x^2}}\\&= \frac{x}{\sqrt{a^2+x^2}}\end{align}$$
Plugging these values into $ 2 \sin(\theta) \cos(\theta)$ gives $$2\frac{x}{\sqrt{a^2+x^2}} \frac{a}{\sqrt{x^2+a^2}} = \frac{2xa}{x^2+a^2}$$
Substituting this into $\frac{\sin(2\theta)}{4a^3}$ gives $$\frac{2xa}{4a^3(x^2+a^2)} = \frac{x}{2a^2(x^2+a^2)}$$
This means that the final answer is $$\int \frac{\mathrm dx}{(x^2 + a^2)^2} = \frac{\arctan\left(\frac{x}{a}\right)}{2a^3} + \frac{x}{2a^2(x^2 + a^2)} + C$$ assuming I made no mistakes. I am not super familiar with trig substitution and want to make sure my logic is sound here.
$$...$$, not$...$. $2.$ Include the $=$ sign in the MathJax code. $3.$ For a series of equalities, use the environmentalign. – Integreek Nov 28 '24 at 06:44