$\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.
 A: 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}}$
A: Almost without any substitution.
Let $x=\frac{\sqrt{a} }{\sqrt{b}}y$
$$I=\int \frac{x^2}{(a-b\,x^2)^2}\,dx=\frac{1}{\sqrt{a}\,\, b^{3/2}}\int \frac{y^2}{\left(1-y^2\right)^2}\,dy$$ Now, using partial fraction decomposition
$$\frac{y^2}{\left(1-y^2\right)^2}=\frac{1}{4 (y-1)}-\frac{1}{4 (y+1)}+\frac{1}{4 (y+1)^2}+\frac{1}{4 (y-1)^2}$$ does not seem to make any problem
A: You haven't placed any restrictions on ${a,b}$, and so the answer depends. We will assume ${a,b >0}$.
In this case we can actually use the hyperbolic trig substitution ${x=\sqrt{\frac{a}{b}}\tanh(t)}$, leading to
$${\left(\frac{a}{b}\right)^{\frac{3}{2}}\int\frac{\tanh^2(t)\text{sech}^2(t)}{(a-a\tanh^2(t))^2}}dt=\frac{1}{a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\int\frac{\tanh^2(t)\text{sech}^2(t)}{(1-\tanh^2(t))^2}dt$$
We know that ${\sinh^2(t)-\cosh^2(t)=1}$, and this implies ${\tanh^2(t)-1=\text{sech}^2(t)}$. And so we have
$${\Rightarrow\frac{1}{a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\int\frac{\tanh^2(t)\text{sech}^2(t)}{(-\text{sech}^2(t))^2}dt=\frac{1}{a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\int\frac{\tanh^2(t)}{\text{sech}^2(t)}dt=\frac{1}{a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\int\sinh^2(t)dt}$$
And this can be solved with another identity, ${\sinh^2(t)=\frac{\cosh(2t)-1}{2}}$:
$${\frac{1}{a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\left(\int\frac{\cosh(2t)-1}{2}dt\right)=\frac{1}{a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\left(\frac{\sinh(2t)}{4}-\frac{t}{2}\right)+c=\frac{1}{4a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\left(\sinh(2t)-2t\right)+c}$$
This gives the final answer
$${\frac{1}{4a^2}\left(\frac{a}{b}\right)^{\frac{3}{2}}\left(\sinh\left(2\text{arctanh}\left(\sqrt{\frac{b}{a}}x\right)\right)-2\text{arctanh}\left(\sqrt{\frac{b}{a}}x\right)\right)+C}$$
You can further use the natural log definition for the inverse hyperbolic tangent, and the exponential definition for the hyperbolic sine to simplify the answer.
A: $$\int \frac{x^2\,dx}{(a-bx^2)^2}=\int \frac{x^2\,dx}{(bx^2-a)^2}$$
Let $x=\sqrt{\frac{a}{b}}\sec u\implies dx=\sqrt{\frac{a}{b}}\sec u\tan u\ du$
$$=\int \frac{\frac{a}{b}\sec^2u}{(a\sec^2u-a)^2}\sqrt{\frac{a}{b}}\sec u\tan u\ du$$
$$=\frac{a}{b}\sqrt{\frac{a}{b}}\int \frac{\sec^2u}{a^2\tan^4u}\sec u\tan u\ du$$
$$=\frac{1}{b\sqrt{ab}}\int \csc^3u\ du$$
$$=\frac{1}{b\sqrt{ab}}\int \csc u\cdot \csc^2u\ du$$
Using integration by parts,
$$=\frac{1}{2b\sqrt{ab}}\left(-\csc u\cot u+\ln\left|\tan\frac{u}{2}\right|\right)+C$$ 
