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. $$