I have the sequence $a_n=\frac{e^n}{2^n+1}$ and I'm trying to calculate its limit as $n\to\infty$.
My attempts:
In my first attempt, I used $x^y=e^{y\ln x}$ on $2^n$ in order to remove $e^n$ from play: $$\lim_{n→\infty}a_n=\lim_{n→\infty}\frac{e^n}{2^n+1}=\lim_{n→\infty}\frac{e^n}{e^{n\ln2}+1}=\lim_{n→\infty}\frac1{e^{\ln2}+e^{-n}}=\lim_{n→\infty}\frac1{2 + e^{-n}}=\frac12$$
In my second attempt, I took a different approach: $$\lim_{n→\infty}a_n=\lim_{n→\infty}\frac{e^n}{2^n+1}=\lim_{n→\infty}\frac{e^n}{2^n(1+2^{-n})}=\lim_{n→\infty}\frac{\left(\frac e2\right)^n}{1+2^{-n}}=\frac\infty1=\infty$$
Question:
Checking online to validate my solutions, I found that my second attempt is correct, while the first one isn't. Where have I erred in my first attempt that led to a different result?
The step $\lim \frac{e^n}{e^{n \ln 2} + 1} = \lim \frac{1}{e^{\ln 2} + e^{-n}}$ is incorrect.
Note that you wanted to obtain this equality by multiplying the numerator and denominator by $e^{-n}$. The numerator is therefore $1$, but the denominator is: $$ \color{red}{\text{WRONG}} : (e^{n \ln 2} + 1)e^{-n} = \color{red}{e^{\ln 2}} + e^{-n} \\\color{blue}{\text{CORRECT}} : (e^{n \ln 2} + 1)e^{-n} = \color{blue}{e^{n(\ln 2 - 1)}} + e^{-n} \\ $$
The mistake you have made is silly : $e^{-a} \times e^{b}$ equals $e^{b-a}$ and not $e^{\frac ba}$.
With this correction, it is easy to see that the answer will not be $\frac 12$. The other approach is the right one.