I want to know what's the order of the second leading term in the expansion of $1/\log\left(\dfrac{f(a)^2 - f(x)^2}{f(a)^2 + f(x)^2}\right)$ around $a$. For now, I have: $$1/\log\left(\dfrac{f(a)^2 - f(x)^2}{f(a)^2 + f(x)^2}\right) = \dfrac{1}{\log(f(a) - f(x))+ \log(f(a) + f(x)) - \log(f(a)^2 + f(x)^2)}$$ Close to $a$, we find:
$$1/\log\left(\dfrac{f(a)^2 - f(x)^2}{f(a)^2 + f(x)^2}\right) \sim \dfrac{1}{\log(f(a) - f(x))-\log(a)}$$
We also have: $f(a) - f(x) \sim (a - x)f'(a) - \dfrac{1}{2}(a - x)^2f''(x)$. Putting this in the log gives us:
$$\log(f(a) -f(x)) \sim \log((a - x)f'(a)) - \dfrac{(a - x)f''(a)}{2f'(a)}$$
Finaly we have: $$1/\log\left(\dfrac{f(a)^2 - f(x)^2}{f(a)^2 + f(x)^2}\right) \sim \dfrac{1}{\log((a - x)f'(a)/f(a)) - \dfrac{(a - x)f''(a)}{2f'(a)}}$$
Now, if we expand that in a sum of terms, clearly, the first leading term is of order $1/\log(a - x)$ but what is the order of the second term? Something like $(a - x)$ (at least that's what mathematica is giving me...)?
It is not difficult to have any order is you use steps Expand $f(x)$ as a series around $x=a$ and use long division $$A=\dfrac{f(a)^2 - f(x)^2}{f(a)^2 + f(x)^2}=$$ $$-\frac{ f'(a)}{f(a)}(x-a)+\frac{ \left(f'(a)^2-f(a) f''(a)\right)}{2 f(a)^2}(x-a)^2+O\left((x-a)^3\right)$$
$$\log(A)=\log \left(-\frac{(x-a) f'(a)}{f(a)}\right)+\frac{(x-a) \left(f(a) f''(a)-f'(a)^2\right)}{2 f(a) f'(a)}+O\left((x-a)^2\right)$$ Long division again $$\frac 1 {\log(A)}=\frac{1}{\log \left(-\frac{(x-a) f'(a)}{f(a)}\right)} \,\left(1+\frac 12 B +O\left((x-a)^2\right) \right)$$ where $$B=\frac{ f'(a)^2-f(a) f''(a)}{ f(a) f'(a) \log \left(-\frac{(x-a) f'(a)}{f(a)}\right)}\,\,(x-a)$$