Sketching functions $f(x) = \frac{e^x}{x^2} \quad \text{ and } \quad g(x) = \frac{1}{x}$ - First Derivative test and domain restriction when working on a "Sketching a function" problem, some textbooks have a step-by-step procedure. The first one is usually stating the Domain of a function.
When working with functions like 
$$
f(x) = \frac{e^x}{x^2} \quad \text{ and } \quad g(x) = \frac{1}{x}
$$
should we include the $x = 0$ in the analysis of the signs of the first derivative because the $x = 0$ in not on the Domain of the function or the correct reason is that the same $x$ is not on the Domain of the derivative function?
Thank you.
 A: If $f$ is undefined at some point, then $f'$ must automatically also be undefined at that point.
(The definition of $f'(a)$ involves looking at $(f(a+h)-f(a))/h$, which is impossible if $f(a)$ is undefined to begin with, right?)
In other words, the domain of $f'$ is a subset of the domain of $f$.
A: Easy things first! 
$g(x)=\frac{1}{x}$ 
Now as you can see it is not defined for $x=0$. And $\lim\limits_{x\to0^{\pm}}\frac1x=\pm\infty$. So the plot should be somehow asymptotic to the y-axis according to the change in sign. Now, $g'(x)=-\frac{1}{x^2}$. 
For critical points, when we equate it to zero, $-\frac1{x^2}=0$, we cannot get any real solutions. So that means that there is no critical point. Also, $\lim\limits_{x\to\pm\infty}\frac1x=0$. So it should be asymptotic for x-axis. So we have got a fair intuition of the graph and it would be fairly simple by plotting two or three points first and then joining them in an asymptotic curve. 

Now for $f(x)$,
$f(x)=\frac{e^x}{x^2}$, see that at $x=0$, it is undefined.
 Now $\lim\limits_{x\to0}\frac{e^x}{x^2}=\infty$ because, it is equal to $(\lim\limits_{x\to0}\frac{1}{x^2})(\lim\limits_{x\to0}e^x)$ (because none of the terms approach $0$) which is definitely $\infty$. 
So it should be asymptotic towards the $y$-axis in the positive $y$ direction for both $\pm$. 
Now $\lim\limits_{x\to\infty}\frac{e^x}{x^2}=\infty$, $\lim\limits_{x\to-\infty}\frac{e^x}{x^2}=0$. 
Also equating the first derivative of it to $0$, $\frac{e^x.x-2e^x}{x^3}=0$
 $e^x.x(x-2)=0$
So $x=2$ 
By the 2nd derivative test, $f''(x)=\frac{e^x(x^2-4x+6)}{x^4}$, $f''(2)=\frac{e^2}{8}>0$. So the function hits a local minimum here. 
So I think you would have got the behavior of this plot. 



Edit: The domain of the function doesn't include $0$. So even if you do try the first derivative test, you will not get any real critical points because, the functions won't be differentiable at that point.
