Is this question too easy or am I getting it wrong?

In my homework, I am asked to find the limit

$$\lim\limits_{x\to0}{\frac{x}{e^x}}$$

But obviously, you could just substitute $x = 0$:

$$\lim\limits_{x\to0}{\frac{x}{e^x}} = \lim\limits_{x\to0}{\frac{0}{e^0}}=\lim\limits_{x\to0}{\frac{0}{1}}=\lim\limits_{x\to0}{0} = 0$$

This seemed – by far – too easy. Is this really all there is to it? Is my solution valid?

Edit:

Apparently, this is valid. Still, I do wonder if these are the only conditions that allow me to actually substitute my limit variable.


The limit is correct, but you have to justify that you can do the substitution. In general $$\lim\limits_{x\rightarrow x_0} f(x)=f(x_0)$$ holds only if $f$ is continuous at $x_0$. So to answer your question: you can do the substitution only if the function $f$ is continuous and of course the function must be defined at the point $x_0$. Since $f(x) = x/e^x$ is continuous for every $x\in\mathbb{R}$ and the value $f(0)$ is defined we have that $$\lim\limits_{x\rightarrow 0}\frac{x}{e^x} = \frac{0}{e^0}=0. $$


One of your questions is “When can I substitute the limit variable”, which I take to mean

“When is $$\lim_{x\to a} f(x) = f(a)?”$$

A sufficient condition for this to work is that $f$ must be continuous at $a$. (In fact, this is the definition of what it means for a function to be continuous at $a$!) This doesn't immediately answer the question, because continuity can be very complicated. However, the following rules cover a great many situations:

  1. Constant functions $x\mapsto c$ are continuous everywhere (“$x\mapsto c$” means “the function that takes $x$ and maps it to $c$”.)
  2. The identity function $x\mapsto x$ is continuous everywhere
  3. The addition and multiplication functions $(x,y)\mapsto x+y$ and $(x,y)\mapsto xy$ are continuous everywhere
  4. The division function $(x,y)\mapsto \frac xy$ is continuous except where the denominator $y$ is $0$
  5. The exponential function $x\mapsto e^x$ is continuous everywhere
  6. Compositions of continuous functions are continuous

Here we have the function $x\mapsto \frac x{e^x}$. The function $x\mapsto x$ is continuous by (2). The function $x\mapsto e^x$ is continuous by (5). The quotient of these will be continuous by (6) and (5), except when the denominator $e^x$ is $0$—but it never is. So $x\mapsto\frac x{e^x}$ is continuous everywhere.

The upshot of all this is that $$\lim_{x\to a} \frac x{e^x} = \frac a{e^a}$$ for all $a$, and in particular for $a=0$.

To consider the simplest possible counterexample, take $x\mapsto \frac1x$. This is continuous everywhere except possibly at $x=0$, and indeed we have $\lim_{x\to a}\frac1x = \frac 1a$ for all $a\ne 0$. For $a=0$ there is no limit.

A more interesting counterexample is $x\mapsto \frac{\sin x}{x}$. Again, we have $\lim_{x\to a}\frac{\sin x}{x} = \frac{\sin a}{a}$ for all $a\ne 0$. For $a=0$ we have the interesting and nontrivial fact that $\lim_{x\to 0}\frac{\sin x}{x} = 1$.


Well, according to WolframAlpha, the solution $\lim\limits_{x\to0}\frac{x}{e^x} = 0$ is indeed correct.

Also, I think that my substitution is justifiable, as by performing the substitution, we don't have the problem of getting undefined or indeterminate values.