<s>[INST] Valid proof for integral of $1/(x^2+a^2)$ I'm trying to prove some integral table formulae and had a concern over my proof of the following formula:
$$\int\frac{1}{x^2+a^2}\;dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)+C$$
Claim:
$$\frac{1}{x^2+a^2}=\frac{1}{a^2}\sum_{k=1}^\infty(-1)^{k-1}\left(\frac{x}{a}\right)^{2k}\hspace{5mm}\forall\;x\in(-a,a)$$
Proof:
$$\frac{1}{x^2+a^2}=\frac{1}{a^2}-\frac{x^2}{a^4}+\frac{x^4}{a^6}-\frac{x^6}{a^8}+\dots$$
$$\implies 1=(x^2+a^2)\left(\frac{1}{a^2}-\frac{x^2}{a^4}+\frac{x^4}{a^6}-\frac{x^6}{a^8}+\dots\right)$$
$$\implies 1=\left(\frac{x^2}{a^2}-\frac{x^4}{a^4}+\frac{x^6}{a^6}-\frac{x^8}{a^8}+\dots\right)+\left(1-\frac{x^2}{a^2}+\frac{x^4}{a^4}-\frac{x^6}{a^6}+\dots\right)$$
$$\implies 1=1\hspace{5mm}\forall\;x\in(-a,a)$$
My proof then uses the following:
$$\int\frac{1}{x^2+a^2}\;dx=\frac{1}{a^2}\int\sum_{k=1}^\infty(-1)^{k-1}\left(\frac{x}{a}\right)^{2k}\;dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)+C$$
My concern is that this isn't a valid proof since the radius of convergence of arctangent's Taylor Series is finite. I'm 7 years removed from taking calculus so I'm admittedly forgetful of the fine details on this. Could someone explain if this is a valid approach or, if not, why?
 [/INST] This is what I call an almost immediate antiderivative, based on the fact that if $\;\int f(x)\,dx = F(x)\;$ , then we can conclude that $\;\int f(g(x)) g'(x)\,dx = F(g(x))\;$, which of course it's just the basis of substitution, and thus:
$$\int\frac{dx}{a^2+x^2}=\frac1a\int\frac{\frac1adx}{1+\left(\frac xa\right)^2}=\frac1a\int\frac{d\left(\frac xa\right)}{1+\left(\frac xa\right)^2}=\frac1a\arctan\frac xa+C$$
</s>