I need to solve
$$\int\frac{\sec^2\theta}{\tan^2\theta-4}d\theta$$
I can easily spot that I need to substitute
$$u=\tan\theta$$ $$du=\sec^2\theta d\theta$$
Which lead me to
$$\int\frac{du}{u^2-4}$$
However, if I look at the correction steps, I should be trying to solve instead
$$\int\bigg[\frac{\frac{1}{4}}{u-2}+\frac{\frac{-1}{4}}{u+2}\bigg]du$$
Now I tought maybe I've chosen a wrong substitution variable, but they actually use the same $u=\tan\theta$.
What is wrong with my substitution ?