# How do you use the first and second derivatives to sketch y=e^x/x?

Oct 13, 2016

graph{(e^x)/x [-22, 18, -9.88, 10.12]}

#### Explanation:

$y = {e}^{x} / x$

to sketch the graph, we need to examine various behaviour of the function

roots:
$y = 0 \implies {e}^{x} / x = 0$
$\therefore {e}^{x} = 0$
But as ${e}^{x} > 0 \forall x \in \mathbb{R} \implies$ no roots

behaviour as $x \to \pm \infty$
As $x \to - \infty \implies y \to {e}^{-} \frac{\infty}{-} \infty \to {0}^{-}$
As $x \to \infty \implies y \to {e}^{\infty} / \infty \to \infty$

asymptotes

denominator$= 0 \implies x = 0$
so a vertical asymptote when $x = 0$

turning (or critical points)
$y = {e}^{x} / x$, so differentiating wrt $x$ using the quotient rule
$\frac{d}{\mathrm{dx}} \left(\frac{u}{v}\right) = \frac{v \frac{\mathrm{du}}{\mathrm{dx}} - u \frac{\mathrm{dv}}{\mathrm{dx}}}{v} ^ 2$
gives:
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{x \frac{d}{\mathrm{dx}} \left({e}^{x}\right) - {e}^{x} \frac{d}{\mathrm{dx}} \left(x\right)}{x} ^ 2$
$= \frac{x {e}^{x} - {e}^{x}}{x} ^ 2$
$= \frac{\left(x - 1\right) {e}^{x}}{x} ^ 2$

At a critical point $\frac{\mathrm{dy}}{\mathrm{dx}} = 0 \implies \frac{\left(x - 1\right) {e}^{x}}{x} ^ 2 = 0$
$\therefore \left(x - 1\right) {e}^{x} = 0$

$\therefore {e}^{x} = 0$ (no solutions); or $x - 1 = 0 \implies x = 1$

When $x = 1 \implies y = {e}^{1} / 1 = e$ (or $\approx 2.7$ )
so there is a critical point at $\left(1 , e\right)$

Nature of the critical points:
We need to look at the second derivative;
we can rearrange
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\left(x - 1\right) {e}^{x}}{x} ^ 2$ as
$\frac{\mathrm{dy}}{\mathrm{dx}} = {e}^{x} / x - {e}^{e} / {x}^{2}$
we already know the derivative of ${e}^{x} / x$ (it is the above); so we must use the quotient rule again to find the derivative of ${e}^{x} / {x}^{2}$

so we get
$\frac{{d}^{2} y}{\mathrm{dx}} ^ 2 = \frac{\left(x - 1\right) {e}^{x}}{x} ^ 2 - \frac{d}{\mathrm{dx}} \left({e}^{x} / {x}^{2}\right)$
$\therefore \frac{{d}^{2} y}{\mathrm{dx}} ^ 2 = \frac{\left(x - 1\right) {e}^{x}}{x} ^ 2 - \left\{\frac{{x}^{2} \frac{d}{\mathrm{dx}} \left({e}^{x}\right) - {e}^{x} \frac{d}{\mathrm{dx}} \left({x}^{2}\right)}{{x}^{2}} ^ 2\right\}$
$\therefore \frac{{d}^{2} y}{\mathrm{dx}} ^ 2 = \frac{\left(x - 1\right) {e}^{x}}{x} ^ 2 - \left\{\frac{{x}^{2} {e}^{x} - 2 x {e}^{x}}{{x}^{4}}\right\}$

That's quite a complex expression, so lets not even bother trying to simplify any more as we increase the chance of making a mistake; just substitute $x = 1$ to determine the nature of the turning point;

$x = 1 \implies \frac{{d}^{2} y}{\mathrm{dx}} ^ 2 = 0 - \left\{\frac{{e}^{1} - 2 {e}^{1}}{1}\right\} = e > 0 \implies$ minimum

Sketching the graph:
We now have enough to sketch the graph which actually looks like this;
graph{(e^x)/x [-22, 18, -9.88, 10.12]}