about truncated taylor expansions I have a question about expanding $e^u$into a truncated taylor series where $u$ is itself a truncated Taylor series (in my example $u$ is expansion of $-\frac{\log(1+t)}{t}$, up to term $O(t^3)$), it comes from evaluating, 
$$\lim_{x\to \infty} x\left[\frac{1}{e}-\left(\frac{x}{x+1}\right)^x\right]$$
So here is my work up to where I have trouble and then I write my thoughts, 
Claim: $\lim_{x\to \infty} x\left[\frac{1}{e}-\left(\frac{x}{x+1}\right)^x\right]=-\frac{1}{2e}$.
Proof:
Note first that the given function is in $\infty \cdot 0$. This is so, since $x\to \infty$ we can take $x>0$ hence, 
$$\lim_{x\to \infty} e^{-1}-\left(\frac{x}{x+1}\right)^x=\lim_{x\to \infty} e^{-1}-\left(1+1/x\right)^{-x}=e^{-1}-e^{-1}=0.$$
Now letting $t=1/x$, we have, $t\to 0$ as $x\to \infty$, so that
$$\lim_{x\to \infty} x\left[\frac{1}{e}-\left(\frac{x}{x+1}\right)^x\right]=\lim_{t\to 0} \frac{e^{-1}-(1+t)^{-1/t}}{t}$$
$$=-\lim_{t\to 0} \frac{(1+t)^{-1/t}-e^{-1}}{t}=-\lim_{t\to 0} \frac{e^{-\frac{\log(1+t)}{t}}-e^{-1}}{t}$$
$$=-\lim_{t\to 0} \frac{e^{-\frac{(t-t^2/2+O(t^3))}{t}}-e^{-1}}{t}=-\lim_{t\to 0} \frac{e^{-1+t/2+O(t^2)}-e^{-1}}{t}$$
$$=-\lim_{t\to 0} \frac{e^{-1}[e^{t/2+O(t^2)}-1]}{t}.$$
Now I don't know how to properly expand $e^{t/2+O(t^2)}$. I am admittedly new to asymptotic analysis it wasn't taught at my undergrad, but I understand that $O(f)+O(f)=O(f)$, $o(f)=O(f)$, $O(f/g)=O(f)/g$ over a given base (like $x\to a$ or $x\to \infty$) and if $x\to 0$ then $O(x^{m+1})=x^{m+1}O(1)=x^mxO(1)=x^mo(1)=o(x)$. In my book's example where they were dealing with $\log \cos x$ they expanded $\cos x$ up to $O(x^8)$ and then wrote $\log \cos x=\log (1+u)$ via substitution and then expanded $\log(1+u)$ up to $O(u^4)$ and do the algebra. But i don't follow it by just the rules above. So my two questions: 1) How do you decide which orders to take in your expansions?  2) so like if I expand $e^u$  in my example say if I just go up to $O(u^2)$,
are the following calculations correct or meaningless:
$$e^{t/2+O(t^2)}=e^u=1+u+O(u^2)=1+(t/2+O(t^2))+O((t/2+O(t^2))^2)$$
$$=1+t/2+O(t^2)+O(t^2/4+tO(t^2)+O(t^4))$$
$$=1+t/2+O(t^2)+O(t^2/4+O(t^3)+O(t^4))$$
How do you deal with the last term?
 A: Asymptotic expansions of an expression in $x$ always come with a condition of the form "as $x \to \cdots$". For example:

$e^x \in 1 + x + \frac{1}{2} x^2 + O(x^3)$ as $x \in \mathbb{C} \to 0$.

This applies for any complex variable $x$, including arbitrary expressions. In your case:
As $t \to 0$:
$\def\wi{\subseteq}$
  $\exp(\frac{1}{2}t+O(t^2)) \wi 1 + (\frac{1}{2}t+O(t^2)) + O\left((\frac{1}{2}t+O(t^2))^2\right)$
  $\wi 1 + \frac{1}{2}t + O(t^2) + O\left( \frac{1}{4}t^2 + t O(t^2) + O(t^2)^2 \right)$
  $\wi 1 + \frac{1}{2}t + O(t^2) + O(\frac{1}{4}t^2) + O(t O(t^2)) + O(O(t^2)^2)$
  $\wi 1 + \frac{1}{2}t + O(t^2) + O(t^2) + O(O(t^3)) + O(O(t^4))$
  $\wi 1 + \frac{1}{2}t + O(t^2) + O(t^2) + O(t^3) + O(t^4)$
  $\wi 1 + \frac{1}{2}t + O(t^2)$.
Are the steps clear? In general you need the following theorems (as $x \to a$):

$f \in O(g)$ for any complex variables $f,g$ such that $|f| \le |g|$.
$O(f+g) \wi O(f) + O(g) \wi O(|f|+|g|)$ for any complex variables $f,g$.
$O(f \cdot g) = O(f) O(g)$ for any complex variables $f,g$.
$O(c \cdot f) = O(f)$ for any complex variable $f$ and constant $c \ne 0$.
$O(O(f)) = O(f)$ for any complex variable $f$.

Same with little-o-notation.
It may be possible to make do with the above theorems for almost all problems, but if you find that you need some other general theorem often, it is of course good to prove it first. For example:

$O(x^m) \wi O(x^n)$ as $x \to 0$ for any $m,n \in \mathbb{N}$ such that $m \ge n$.
$O(f) + O(f) \wi O(|f|+|f|) = O(|f|) \wi O(O(f)) = O(f)$ for any complex variable $f$.
$O(f) \wi O(O(g)) = O(g)$ for any complex variables $f,g$ such that $|f| \le |g|$.

