Can someone show how to find the limits of these functions using L'Hopitals rule?

I understand how to use L'Hopitals rule for the most part but these two problems confuse me to no end. I would appreciate it if someone could show me how they are to be done.

first one...

$$\lim_{x\to\infty}xe^{-x}$$

second one...

$$\lim_{x\to\frac{\pi}{2}^-}\frac{\tan x}{\ln(\frac{x}{2} - x)}$$

-
Write the first one as ${x\over e^x}$; can you do it now? –  Gerry Myerson Nov 29 '12 at 3:22
Part of your difficulty with the second one may be that you’ve miscopied it: it must be $$\lim_{x\to\frac{\pi}2^-}\frac{\tan x}{\ln\left(\frac{\pi}2-x\right)}$$ rather than what you have. –  Brian M. Scott Nov 29 '12 at 3:25
@GerryMyerson That would bring it back to 1/e^x which is 0? –  DoesTheLimExist Nov 29 '12 at 3:32
@Brian On my homework it is written how I placed it up above. (I got it wrong -- I couldn't narrow it down to a solution) –  DoesTheLimExist Nov 29 '12 at 3:33
Then there’s an error in the homework, because when $x$ is a little less than $\pi/2$, $\frac{x}2-x$ is negative, and its natural log isn’t even defined. –  Brian M. Scott Nov 29 '12 at 3:35

Gerry Myerson’s comment should take care of the first problem. The second one has to be misstated: I’ve very little doubt that it should be

$$\lim_{x\to\left(\frac{\pi}2\right)^-}\frac{\tan x}{\ln\left(\frac{\pi}2-x\right)}\;.$$

Corrected: If so, apply l’Hospital’s rule once and do a little simplification:

\begin{align*} \lim_{x\to\left(\frac{\pi}2\right)^-}\frac{\tan x}{\ln\left(\frac{\pi}2-x\right)}&=\lim_{x\to\left(\frac{\pi}2\right)^-}\frac{\sec^2 x}{\frac{-1}{\frac{\pi}2-x}}\\\\ &=\lim_{x\to\left(\frac{\pi}2\right)^-}\sec^2 x\left(x-\frac{\pi}2\right)\\\\ &=\lim_{x\to\left(\frac{\pi}2\right)^-}\frac{x-\frac{\pi}2}{\cos^2 x}\;. \end{align*}

Now apply l’Hospital’s rule one more time.

-
The last step in derivation should be $\lim_{x\to \frac{\pi}{2}^{-}} (x-\frac{\pi}{2}){\sec(x)}^2$. –  Mhenni Benghorbal Nov 29 '12 at 3:47
@Brian That would be the numerator 1/0?? Making it undefined. How did you get rid of the -1 in the last part of that? –  DoesTheLimExist Nov 29 '12 at 3:47
@MhenniBenghorbal Wouldn't that make the limit be approaching 0? –  DoesTheLimExist Nov 29 '12 at 3:49
@DoesTheLimExist: The limit goes to $-\infty$. –  Mhenni Benghorbal Nov 29 '12 at 3:52
@Mhenni: Thanks; fixed. –  Brian M. Scott Nov 29 '12 at 3:53