Why is it true that $\frac{1}{t}\ln\left\{ 1+ t\sum_{k=1}^n p_k\ln x_k + O(t^2) \right\} = \sum_{k=1}^n p_k\ln x_k + O(t)$ as $t\to 0$? (The Cauchy-Schwarz Master class by Michael Steele, page 121) It is given that $\ln(1+x) = x+O(x^2)$ as $x\to 0$. Then, as $t\to 0$ one has
$$\frac{1}{t}\ln\left\{ 1+ t\sum_{k=1}^n p_k\ln x_k + O(t^2) \right\} = \sum_{k=1}^n p_k\ln x_k + O(t)$$
This is a step in a book that I'm reading. $O(t^2)$ and $O(t)$ use the big $O$ notation. Why does the equality hold?
 A: When  considering the condition $t\to 0$ we can write the series expansion of $\ln t$ as
\begin{align*}
\ln(1+t)&=t-\frac{t^2}{2}+\frac{t^3}{3}-\cdots\\
&=t-\frac{t^2}{2}+O(t^3)\\
&=t+O(t^2)\tag{1}\\
&=O(t)
\end{align*}
We use the Big-O notation corresponding to the accuracy we need for our calculation. In the current situation when setting $a=\sum_{k=1}^n p_k\ln x_k$ we see the right-hand side of
\begin{align*}
\frac{1}{t}\ln\left( 1+ at + O(t^2) \right) =a + O(t)
\end{align*}
represents the constant term exactly while the linear part  and all higher powers of $t$ are swallowed by $O(t)$.

We obtain according to (1)
  \begin{align*}
\color{blue}{\frac{1}{t}}&\color{blue}{\ln(1+at+O(t^2))}\\
&=\frac{1}{t}\left[(at+O(t^2))+O((at+O(t^2))^2)\right]\\
&=\frac{1}{t}\left[(at+O(t^2))+O(a^2t^2+2atO(t^2)+O(t^2)O(t^2))\right]\\
&=\frac{1}{t}\left[at+O(t^2)+O(a^2t^2+O(t^3)+O(t^4))\right]\tag{2}\\
&=\frac{1}{t}\left[at+O(t^2)+O(t^2)+O(t^3)+O(t^4)\right]\tag{3}\\
&=\frac{1}{t}\left[at+O(t^2))\right]\tag{4}\\
&\,\,\color{blue}{=a+O(t)}\tag{5}\\
\end{align*}
  and the claim follows. 

Depending  on  the level of experience some of the intermediate steps will usually be skipped.
Comment:


*

*In (2) we use for constant $a$ the rule $aO(t)=O(t)$ as well as the rules $t=O(t)$, $O(t)O(t)=O(t^2)$ and $O(t^2)O(t^2)=O(t^4)$.

*In (3) we use the rule $O(O(t^k))=O(t^k)$.

*In (4) we use $O(t^4)=O(t^3)$ and  $O(t^3)=O(t^2)$ as well as $O(t^2)+O(t^2)=O(t^2)$.

*In  (5) we  use $\frac{1}{t}O(t^2)=O(t)$.
Note: The rules stated in the comment section can be derived for instance from formulas (9.21) - (9.27) in Concrete Mathematics
by R.L. Graham, D.E. Knuth and O. Patashnik.
