<s>[INST] Evaluating limits using taylor expansion $$\lim_{x\to 0^{+}} (\ln x)^3\left(\arctan\left(\ln\left(x+x^2\right)\right) + \frac{\pi}{2}\right) + (\ln x)^2$$ 
I have this limit in my sheet and the answer is $\frac 13$.
But I don't know how to approach any step using taylor expansion near zero (this is our lesson by the way). Please help me with the simplest way.
 [/INST] When $x\to 0^+$, 
$$
\ln(x+x^2) = \ln x + \ln(1+x^2) = \ln x + o(x) \tag{1}
$$
and this goes to $-\infty$ as $x\to 0^+$. To continue, we would like to have $\arctan u$ with $u\to 0$, though. When $x<0$, we can use the fact that 
$$
\arctan x + \arctan \frac{1}{x} = -\frac{\pi}{2} \tag{2}
$$
to rewrite (for $x$ small enough)
$$
\arctan \ln(x+x^2) = \arctan(\ln x + o(x))
= -\frac{\pi}{2} - \arctan\frac{1}{\ln x + o(x)}
$$
which also us to write, as $\frac{1}{\ln x + o(x)}\xrightarrow[x\to 0^+]{} 0^-$,
$$\begin{align}
\arctan \ln(x+x^2) + \frac{\pi}{2}
&= - \arctan\frac{1}{\ln x + o(x)}\\
&= - \arctan\frac{1}{\ln x}\left(\frac{1}{1 + o\left(\frac{x}{\ln x}\right)}\right)\\
&= - \arctan\left( \frac{1}{\ln x}+o\left(\frac{x}{\ln^2 x}\right)\right)\\
&= -\frac{1}{\ln x}+\frac{1}{3\ln^3 x}+o\left(\frac{1}{\ln^3 x}\right) .\tag{3}
\end{align}$$
From there, we get
$$\ln^3 x\left(\arctan \ln(x+x^2) + \frac{\pi}{2}\right) = 
-\ln^2 x+\frac{1}{3}+o\left(1\right) 
$$
and, finally,
$$\ln^3 x\left(\arctan \ln(x+x^2) + \frac{\pi}{2}\right) + \ln^2 x= 
\frac{1}{3}+o\left(1\right)  \xrightarrow[x\to 0^+]{} \boxed{\frac{1}{3}}.
$$
</s>