find the limit: $\lim_{x\to 0} \dfrac{e^x \cos x - (x+1)}{\tan x -\sin x}$

$\newcommand{\+}{^{\dagger}}% \newcommand{\angles}[1]{\left\langle #1 \right\rangle}% \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}% \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}% \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}% \newcommand{\dd}{{\rm d}}% \newcommand{\ds}[1]{\displaystyle{#1}}% \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}% \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}% \newcommand{\fermi}{\,{\rm f}}% \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}% \newcommand{\half}{{1 \over 2}}% \newcommand{\ic}{{\rm i}}% \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow}% \newcommand{\isdiv}{\,\left.\right\vert\,}% \newcommand{\ket}[1]{\left\vert #1\right\rangle}% \newcommand{\ol}[1]{\overline{#1}}% \newcommand{\pars}[1]{\left( #1 \right)}% \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}}% \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}% \newcommand{\sech}{\,{\rm sech}}% \newcommand{\sgn}{\,{\rm sgn}}% \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}}% \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ \begin{align} &\lim_{x \to 0}{\expo{x}\cos\pars{x} - \pars{1 + x} \over \tan\pars{x} - \sin{x}} = \lim_{x \to 0}{x \over \tan\pars{x}}\,\bracks{x/2 \over \sin\pars{x/2}}^{2}{\expo{x} \cos\pars{x} - 1 - x \over x^{3}/2} \\[3mm]&= 2\lim_{x \to 0}{\expo{x}\cos\pars{x} - x - 1 \over x^{3}} = 2\lim_{x \to 0}{\expo{x}\cos\pars{x} - \expo{x}\sin\pars{x} - 1 \over 3x^{2}} \\[3mm]&= {2 \over 3} \lim_{x \to 0}{\expo{x}\cos\pars{x} - \expo{x}\sin\pars{x} - \expo{x}\sin\pars{x} - \expo{x}\cos\pars{x} \over 2x} = -\,{2 \over 3} \lim_{x \to 0}{\expo{x}\sin\pars{x} \over x} \\[3mm]&= -\,{2 \over 3} \lim_{x \to 0}{\expo{x}\sin\pars{x} + \expo{x}\cos\pars{x} \over 1} = \color{#0000ff}{\large -\,{2 \over 3}} \end{align}


Just use L'Hopital 3 times, and you'll get the answer. The expressions only look long at first glance, but a bunch of stuff cancel out:

$$\lim_{{x} \to {0}} \frac{e^x\cos x - x - 1}{tanx - sinx} L(\frac00)= \lim_{{x} \to {0}} \frac{e^x\cos x - e^x\sin x - 1}{\sec^2 x - \cos x} L(\frac00)= \lim_{{x} \to {0}} \frac{-2e^x\ sinx}{\sin x + 2\tan x\sec^2 x} L(\frac00)= \lim_{{x} \to {0}} \frac{-2e^x(\ sinx + \cos x )}{\sec^4 x(4\sin^2 x + \cos^5 x + 2)} = -\frac23$$


The denominator goes to zero, numerator goes to 2, so the limit is easy to compute.

EDIT With the changed problem, the easiest way is to use power series. The denominator is asymptotic to $x^3/2,$ the numerator to $-x^3/3,$ so the limit should be $-3/2.$ But do the computation yourself.