<s>[INST] Integrate $\int \frac{1}{\sqrt{\frac{ka^2}{2m}-\frac{k}{m}x^2\:+\frac{kx^4}{2ma^2}}}dx$ For a physics assignment we are analyzing an anharmonic oscillator whose force is given by: $$ F =-kx + \frac{kx^3}{a^2},$$  where $k$ and $a$ are the spring constant and an arbitrary positive constant respectively. One of the questions is to find $x(t)$ for a particular initial velocity of $${v_0}^2 = \frac{ka^2}{2m}.$$ Separating variables I find that $${v(x)} = \sqrt{\frac{ka^2}{2m}-\frac{k}{m}x^2\:+\frac{kx^4}{2ma^2}}.$$  So then $x(t)$ is given by the integral in the title which I cannot solve, $$\int \frac{1}{\sqrt{\frac{ka^2}{2m}-\frac{k}{m}x^2\:+\frac{kx^4}{2ma^2}}}dx.$$ Any help would be much appreciated. 
Edit: My professor suggested using the identity $$\frac{2a}{a^2 -b^2} = \frac{1}{a-b} + \frac{1}{a+b},$$ and that the problem then becomes 'logarithimically easy'. 
 [/INST] Just observe $$\int \frac{1}{\sqrt{\frac{ka^2}{2m}-\frac{k}{m}x^2\:+\frac{kx^4}{2ma^2}}}dx = \int \frac{1}{\sqrt{\frac{k}{2ma^2}(x^2-a^2)^2}} dx$$ 
and then using substitution like $x = a \sin \theta$ to solve the integral ?
</s>