Find series expansion I have problem with expanding at $x=0$ function $f(x)=\ln{\arctan(x)}$ I've seen at wolfram and it's $\displaystyle\ln{x}-\frac{x^2}{3}+O(x^4)$ but I don't know how to obtain it via Taylor series
I also have question how to obtain series exapsion at $=+ \infty$ for e.g $f(x)=\arctan(\sqrt{x+1})$ then I need to substitute $t=\frac{1}{x}$ and find expansion at $x=0 $ ?
thanks in advance
 A: At $x=0$
$$\ln(\arctan x)\stackrel{*1}=\ln\left(x-\frac{x^3}3+{\rm O}(x^5)\right)\stackrel{*2}=\ln x+\ln\left(1-\frac{x^2}3+{\rm O}(x^4)\right)\stackrel{*3}=\ln x-\frac{x^2}3+{\rm O}(x^4)$$
Since at(for *1 and *3) or not(for *2) $x=0$:
$$\arctan x=x-\frac{x^3}3+{\rm O}(x^5)\tag{*1}$$
$$\ln(ab)=\ln a+\ln b\tag{*2}$$
$$\ln(1+x)=x-x^2/2+{\rm O}(x^3)\tag{*3}$$

Let $x+1=1/t$ as $x\to\infty$, $t\to0$
$$\arctan(\sqrt{x+1})=\arctan\left(\frac{\sqrt{t+1}}{\sqrt t}\right)\stackrel{*4}=\pi/2-\arctan\left(\frac{\sqrt t}{\sqrt{t+1}}\right)\\
\stackrel{*5}=\frac{\pi}2-\arctan\left(\sqrt t\left(1-\frac t2+{\rm O}(t^2)\right)\right)\\
=\frac{\pi}2-\arctan\left(t^{1/2}-\frac12 t^{3/2}+{\rm O}(t^{5/2})\right)\\
\stackrel{*1}=\frac{\pi}2-\left(t^{1/2}-\frac12 t^{3/2}+{\rm O}(t^{5/2})\right)+\frac13\left(t^{1/2}-\frac12 t^{3/2}+{\rm O}(t^{5/2})\right)^3+{\rm O}(t^{5/2})\\
=\frac{\pi}2-\frac1{\sqrt x}+\frac5{6x^{3/2}}+{\rm O}(x^{-5/2})$$
As:
$$\arctan x+\arctan (1/x)=\frac{\pi}2\tag{*4}$$
$$(1+x)^{-n}=1-nx+\frac{n(n+1)}2x^2+{\rm O}(x^3)\tag{*5}$$
A: $$\ln(\arctan(x))-\ln(x)=\ln\left(\frac{\arctan x}{x}\right).$$
We have that $$\lim_{x\to 0}\frac{\arctan x}{x}=1.$$
Moreover,
$$\ln(x)=(x-1)-\frac{1}{2}(x-1)^2+\frac{1}{3}(x-1)^3+O((x-4)^4)$$
$$\frac{\arctan(x)}{x}=1-\frac{x^2}{3}+O(x^4)$$
and thus
$$\ln\left(\frac{\arctan x}{x}\right)=-\frac{x^2}{3}+O(x^4)$$
therefore
$$\ln\left(\frac{\arctan x}{x}\right)=\ln(\arctan x)-\ln x\iff\ln(\arctan x)=\ln x-\frac{x^2}{3}+O(x^4)$$
