Evalute the value of limit $$
\lim_{x\to 0}\frac{(1+\sin x)^{\operatorname{cosec}x} - e + \left(\dfrac{\sin x}{2}\right)e}{\sin^2x}
$$

I am stucked here , please tell me how to proceed further and Is there any way to solve this problem
 A: HINT:
Recall that $e^x=1+x+\frac12 x^2 +\cdots$
SPOILER ALERT:  Scroll over the highlighted area to reveal the solution

Starting with the limit $L$ as given by $$\begin{align}L&=e\lim_{x\to 0}\frac{e^{-\frac12 x+\frac13x^3-\cdots}\left(1-\frac12 x\right)}{x^2}\\\\&=e\lim_{x\to 0} \frac{1-\frac12 x+\frac13 x^2 +\frac12\left(-\frac12 x\right)^2+O\left(x^3\right)-\left(1-\frac12 x\right)}{x^2}\\\\&=\frac{11}{24}e\end{align}$$


NOTE:
Another approach is to use L'Hospital's Rule to write
$$\lim_{x\to 0}\frac{(1+x)^{1/x}-e+e x/2}{x^2}=\frac12\lim_{x\to 0}\left(\frac{d^2\,\left(1+x\right)^{1/x}}{dx^2}\right)$$
and carry out the differentiation and the limit.  However, this approach does not increase efficiency over the method in the OP.
A: Your working has a flaw which BTW does not lead to an incorrect answer and hence it is difficult to understand that it is a flaw. While going from your second step to third step you have replaced the expression $(\sin x)/x$ with $1$. This is valid (and common practice) for the replacement done in denominator, but all the replacements (there are three) in the numerator are invalid. There is no specific theorem which guarantees the validity of such replacements in general. The result is correct however as can be seen below.
We can proceed in the following manner
\begin{align}
L &= \lim_{x \to 0}\frac{(1 + \sin x)^{\operatorname{cosec}x} - e + \left(\dfrac{\sin x}{2}\right)e}{\sin^{2}x}\notag\\
&= \lim_{x \to 0}\dfrac{(1 + \sin x)^{1/\sin x} - e + (e\sin x)/2}{\sin^{2}x}\notag\\
&= \lim_{t \to 0}\dfrac{(1 + t)^{1/t} - e + te/2}{t^{2}}\text{ (putting }t = \sin x)\notag\\
\end{align}
You can then proceed easily by applying taylor series for $(1 + t)^{1/t}$ (like in the answer by Dr. MV).
