About the primitives of $\frac1{a^2 + (2x)^2}$ So I was to find the integral $\int^{\frac{3}{2}}_0\frac{1}{9+4x^2}dx$
I noticed that the denominator is equal to $3^2+(2x)^2$ and thought I could use the integral $\int\frac{1}{a^2+x^2}dx = \frac{1}{a}arctan(\frac{x}{a}) + C$.
Hence, $[\frac{1}{3}arctan(\frac{2z}{3})]^{3/2}_0 = \frac{\pi}{12} - 0 =  \frac{\pi}{12}$
The textbooks answer was $\frac{\pi}{24}$. It also gives a solution by dividing the denominator and taking $\frac{1}{4}$ outside of the integral before integrating so the denominator is $\frac{9}{4} + x^2 = (\frac{3}{2})^2 + x^2$.
So my question is why does the integral for $\int\frac{1}{a^2+x^2}dx$ not work when instead of ${x^2}$ you have ${(kx)^2}$ for some constant k?

The same reason why $\sin (2x)$ is not an anti-derivative (= primitive function) of $\cos (2x)$, although $\sin (x)$ is an anti-derivative of $\cos (x)$.
To see what happens, you can use the substitution method for integrals (let $t = kx$ etc).
Or the other way around: because the chain rule for derivatives would produce an extra factor $2$ (in the case of $2x$) or generally $k$ (in the case of $kx$).
