First, let me specify that $\cal O (X)$ denotes an (infinitesimal) amount that is of the same order with $\cal X$, i.e., $\lim \frac{\cal O(X)}{\cal X}=\text{constant}\ne0$ as $\cal X\to 0$. For example, when $x$ tends to $0$, it is well known that $\sin(x)=x+\cal O(x^3)$.
Now my two questions are what should be put under these two $\cal O$s:
(1). $$(1+\frac1n)^n=e+\cal O(?)$$
(2). $$(1+\frac{1}{an^2+bn+c})^n=1+\cal O(?)$$
Of course, $n\in\mathbb N$ and $n\to\infty$.
My attempt
For the first, I have tested out that it is $\cal O(\frac1n)$, when I let Maple calculate $\lim \frac{(1+\frac1n)^n-e}{\frac1n}$ it came out with the result $-\frac12e$. But for a rigorous proof I don't really know where to start.
For the second, I have rewritten the LHS like this $$LHS=\Bigl(1+\frac{1}{an^2+bn+c}\Bigr)^{(an^2+bn+c)\cdot\frac an}\Bigl(1+\frac{1}{an^2+bn+c}\Bigr)^{-\frac ba}\Bigl(1+\frac{1}{an^2+bn+c}\Bigr)^{\frac cn}$$ But it seems to get me nowhere.
Also, I have googled it but still don't get any desired result.
Any help or hint will be appreciated. Best regards.
One way is to consider logging the function:$(1+\frac{1}{n})^n = e^{n \log (1 +\frac{1}{n})}$. You can now expand the log function in Maclaurin series to the desired order since $\frac{1}{n} \to_n 0$ and $e= \text{exp}(1)$.