Algebraic expansion of $(1+x)^{1/x}$ is? i have to solve 
$ \lim_{x\to 0} \frac{{(1+x})^{1/x}-e+ex/2}{x^2}$ and in the hint it is advised to use the algebraic expansion of $(1+x)^{1/x}$.
Also i know that the algebraic expansion of $(1+x)^{m} = 1+mx+m(m-1){x^2}/2+...$ but this is in the case where m is an integer.
So please help me here with the limit. 

Note that you can develop
$$
\begin{gathered}
  \left( {1 + x} \right)^{\,1/x}  = \exp \left( {\frac{1}
{x}\ln \left( {1 + x} \right)} \right) = \exp \left( {1 - \frac{x}
{2} + \frac{{x^{\,2} }}
{3} + O\left( {x^{\,3} } \right)} \right) =  \hfill \\
   = \exp \left( 1 \right)\exp \left( { - \frac{x}
{2}} \right)\exp \left( {\frac{{x^{\,2} }}
{3}} \right)\exp \left( {O\left( {x^{\,3} } \right)} \right) =  \hfill \\
   = e\left( {1 - \frac{x}
{2} + \frac{{x^{\,2} }}
{8}} \right)\left( {1 + \frac{{x^{\,2} }}
{3}} \right) + O\left( {x^{\,3} } \right) = e\left( {1 - \frac{x}
{2} + \frac{{11\;x^{\,2} }}
{{24}} + O\left( {x^{\,3} } \right)} \right) \hfill \\ 
\end{gathered} 
$$
from which
$$
\begin{gathered}
  \frac{1}
{{x^{\,2} }}\left( {\left( {1 + x} \right)^{\,1/x}  - \left( {1 - x/2} \right)e} \right) =  \hfill \\
   = \frac{1}
{{x^{\,2} }}\left( {e\left( {1 - \frac{x}
{2} + \frac{{11\;x^{\,2} }}
{{24}}} \right) - \left( {1 - x/2} \right)e + O\left( {x^{\,3} } \right)} \right) =  \hfill \\
   = \frac{{11}}
{{24}}e + O\left( x \right) \hfill \\ 
\end{gathered} 
$$
