TOPIC 2.7 · STUDY

Derivatives of cos x, sin x, e^x, and ln x

Four familiar functions have derivatives you should know without returning to the limit: $\frac{d}{dx}[\sin x]=\cos x$, $\frac{d}{dx}[\cos x]=-\sin x$, $\frac{d}{dx}[e^x]=e^x$, and $\frac{d}{dx}[\ln x]=\frac{1}{x}$ for $x>0$. Each formula is checked at a number. Angles are in radians.

FUN-3.A

Derivatives of sine, cosine, the exponential, and the natural log

The power rule does not apply to these four functions. Sine is not a power of $x$, and $e^x$ is not $x$ raised to a constant in the power-rule sense. Each derivative below is a standard result, used in radian measure. A calculator left in degrees will make every numerical check look wrong even when the algebra is right.

The derivative of $\sin x$ is $\cos x$. The derivative of $\cos x$ is $-\sin x$. The sign on the cosine derivative is the fact students drop. The derivative of $e^x$ is $e^x$ itself: at every input, the slope equals the height. For $x>0$, the derivative of $\ln x$ is $\frac{1}{x}$. This topic uses $\ln x$ on positive inputs. It does not ask for a derivative of $\ln|x|$.

Graph of y = sin x on a window from -2 pi to 2 pi.

The sine graph crosses the origin going up. Its slope there equals $\cos 0=1$. At the top of the first hump, $x=\frac{\pi}{2}$, the graph is flat, and $\cos\frac{\pi}{2}=0$.

Graph of y = cos x on a window from -2 pi to 2 pi.

The cosine graph has a horizontal tangent at $x=0$, where the height is $1$ and $-\sin 0=0$. At $x=\frac{\pi}{2}$ it crosses the axis going down, so the slope is $-1$, which is $-\sin\frac{\pi}{2}$.

The exponential curve y = e to the x and its tangent line y = x + 1 at x = 0.

The curve is $y=e^x$. Because the derivative equals the function, the slope at $x=0$ equals the height $e^0=1$. The line is the tangent $y=x+1$.

Natural log on x from 0.3 to 4, together with y = 1/x, and a vertical asymptote at x = 0.

The curve that crosses height $0$ at $x=1$ is $\ln x$. The other curve is $\frac{1}{x}$, its derivative for $x>0$. At $x=2$ that derivative has height $\frac{1}{2}$. The dashed line at $x=0$ is the vertical asymptote; $\ln x$ is only drawn for positive $x$.

Check sine at $0$, where a sign error would show. $\sin 0.2$ is about $0.1987$, so the quotient from $0$ to $0.2$ is $\frac{0.1987}{0.2}=0.9935$, near $\cos 0=1$. The opposite guess, $-\cos x$, would predict $-1$ at the origin. The graph is rising there, so the positive value is the one that fits.

Check cosine where the sign matters, at $x=\frac{\pi}{2}$. Use the centered quotient with step $0.2$. The identity $\cos(\frac{\pi}{2}+h)=-\sin h$ and $\cos(\frac{\pi}{2}-h)=\sin h$ turns the quotient into $\frac{-\sin 0.2-\sin 0.2}{0.4}=-\frac{\sin 0.2}{0.2}$. With $\sin 0.2 \approx 0.1987$, that is $-\frac{0.1987}{0.2}=-0.9935$, near $-\sin\frac{\pi}{2}=-1$. The unsigned guess $\sin x$ would give $+1$ at this input. The graph is falling through the axis, so the slope is negative.

Check the exponential at $0$ with a centered step of $0.2$. Use $e^{0.2}\approx 1.2214$ and $e^{-0.2}\approx 0.8187$. The difference is $1.2214-0.8187=0.4027$, and $\frac{0.4027}{0.4}=1.0068$, near $e^0=1$. The slope really does match the height. Check the logarithm near $x=2$, where the claimed slope is $\frac{1}{2}$. Use $\ln 2.2\approx 0.7885$ and $\ln 1.8\approx 0.5878$. The difference is $0.2007$, and $\frac{0.2007}{0.4}=0.5018$, near $0.5$.

Function Derivative Numeric check
$\sin x$ $\cos x$ Quotient at $0$ is about $0.9935$, and $\cos 0=1$
$\cos x$ $-\sin x$ Centered quotient at $\frac{\pi}{2}$ is about $-0.9935$, and $-\sin\frac{\pi}{2}=-1$
$e^x$ $e^x$ Centered quotient at $0$ is about $1.0068$, and $e^0=1$
$\ln x$ for $x>0$ $\frac{1}{x}$ Centered quotient at $2$ is about $0.5018$, and $\frac{1}{2}=0.5$

These four combine with the sum and constant-multiple rules. The derivative of $4\sin x-3e^x$ is $4\cos x-3e^x$. The derivative of $\ln x+x^2$ for $x>0$ is $\frac{1}{x}+2x$. Do not force the power rule onto $e^x$ by writing $x e^{x-1}$. The exponent is the variable, and the base is the constant $e$.

Key points

  • $\frac{d}{dx}[\sin x]=\cos x$ and $\frac{d}{dx}[\cos x]=-\sin x$, in radians.
  • $\frac{d}{dx}[e^x]=e^x$. The slope equals the height at every input.
  • $\frac{d}{dx}[\ln x]=\frac{1}{x}$ for $x>0$.
  • The sine check at $0$ is about $0.9935$ against $1$. The cosine check at $\frac{\pi}{2}$ is about $-0.9935$ against $-1$.
  • The exponential check at $0$ is about $1.0068$ against $1$. The log check at $2$ is about $0.5018$ against $0.5$.

A common mistake is to differentiate $\cos x$ as $\sin x$, dropping the minus, or to treat $e^x$ as a power and write $x e^{x-1}$. Another is to differentiate $\ln x$ as $\frac{1}{\ln x}$ or as $\ln x$. For $x>0$ the derivative is $\frac{1}{x}$.

Practice this topic