<s>[INST] $\int \frac{x^2\,dx}{(a-bx^2)^2}$ How do I integrate $\int \frac{x^2\,dx}{(a-bx^2)^2}$
I've tried substitution and partial fraction decomposition, but I'm not getting anywhere.
 [/INST] This is almost similar to the other integral you posted. The trig substitution $x=\frac{\sqrt a}{\sqrt b} \sin t\implies dx = \frac{\sqrt a}{\sqrt b} \cos t dt $ works here too, after which you get $$ \frac{1}{b\sqrt{ab}}\int\frac{\sin^2t}{\cos^3 t} dt =\frac{}1{b\sqrt{ab}}\int\tan^2t\ \sec t \ dt $$
Now substitute $u=\sec t\implies du = \sec t\tan tdt$ $$\frac{1}{b\sqrt{ab}}\int\sqrt{u^2-1}\ du \\ =\frac{1}{b\sqrt{ab}} \left[ \frac u2\sqrt{u^2-1} -\frac 12\log(u+\sqrt{u^2-1})\right]+C \\ =\frac{1}{b\sqrt{ab}} \left[ \frac{\sec t}{2}\tan t-\frac 12\log (\sec t +\tan t) \right]+C $$
Now, $\sin ^2t =\frac ba x^2 =1-\frac{1}{\sec^2t} \implies \sec t=\sqrt{\frac{a}{a-bx^2}}  $ 
and $\tan t =\sqrt{\frac{a}{a-bx^2}-1} =\sqrt{\frac{bx^2}{a-bx^2}}$
</s>