Take Derivatives

The derivative is an operator that finds the instantaneous rate of change of a quantity. Derivatives can be used to obtain useful characteristics about a function, such as its extrema and roots. Finding the derivative from its definition is almost always tedious, but there are many techniques to bypass that and find derivatives more easily.

Steps

Preliminaries

  1. Understand the definition of the derivative. While this will almost never be used to actually take derivatives, an understanding of this concept is vital nonetheless.
    • Recall that the linear function is of the form <math>y = mx + b.</math> To find the slope <math>m</math> of this function, two points on the line are taken, and their coordinates are plugged into the relation <math>m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}.</math> Of course, this can only be used with linear graphs.
    • For nonlinear functions, the line will be curved, so taking the difference of two points can only give the average rate of change between them. The line that intersects these two points is called the secant line, with a slope <math>m = \frac{f(x + \Delta x) - f(x)}{\Delta x},</math> where <math>\Delta x = x_{2} - x_{1}</math> is the change in <math>x,</math> and we have replaced <math>y</math> with <math>f(x).</math> This is the same equation as the one before.
    • The concept of the derivatives comes in when we take the limit <math>\Delta x \to 0.</math> When this happens, the distance between the two points shrinks, and the secant line better approximates the rate of change of the function. When we do send the limit to 0, we end up with the instantaneous rate of change and obtain the slope of the tangent line to the curve (see animation above). Then, we end up with the definition of the derivative, where the prime symbol denotes the derivative of the function <math>f.</math>
      • <math>f^{\prime}(x) = \lim_{\Delta x \to 0}\frac{f(x + \Delta x) - f(x)}{\Delta x}</math>
    • Finding the derivative from this definition stems from expanding the numerator, canceling, and then evaluating the limit, since immediately evaluating the limit will give a 0 in the denominator.
  2. Understand the derivative notation. There are two common notations for the derivative, though there are others.
    • Lagrange's Notation. In the previous step, we used this notation to denote the derivative of a function <math>f(x)</math> by adding a prime symbol.
      • <math>f^{\prime}(x)</math>
      • This notation is pronounced "<math>f</math> prime of <math>x.</math>" To form higher order derivatives, simply add another prime symbol. When derivatives of fourth or higher order are taken, the notation becomes <math>f^{(4)}(x),</math> where this represents the fourth derivative.
    • Leibniz's Notation. This is the other commonly used notation, and we will use it in the rest of the article.
      • <math>\frac{\mathrm{d}f}{\mathrm{d}x}</math>
      • (For shorter expressions, the function can be placed in the numerator.) This notation literally means "the derivative of <math>f</math> with respect to <math>x.</math>" It may be helpful to think of it as <math>\frac{\Delta y}{\Delta x}</math> for values of <math>x</math> and <math>y</math> that are infinitesimally different from each other. When using this notation for higher derivatives, you must write <math>\frac{\mathrm{d}^{2}f}{\mathrm{d}x^{2}},</math> where this represents the second derivative.
      • (Note that there "should" be parentheses in the denominator, but no one ever writes them, since everyone understands what we mean without them anyway.)

Basic Techniques

Using the Definition

  1. Substitute <math>(x+\Delta x)</math> into the function. For this example, we will define <math>f(x) = 2x^{2} + 6x.</math>
    • <math>\begin{align}f(x+\Delta x)

&= 2(x+\Delta x)^{2} + 6(x+\Delta x) \\ &= 2(x^{2} + 2x\Delta x + (\Delta x)^{2}) + 6x + 6\Delta x \\ &= 2x^{2} + 4x\Delta x + 2(\Delta x)^{2} + 6x + 6\Delta x.\end{align}</math>

  1. Substitute the function into the limit. Then evaluate the limit.
    • <math>\begin{align}\frac{\mathrm{d}}{\mathrm{d}x}f(x) &= \lim_{\Delta x \to 0}\frac{(2x^{2} + 4x\Delta x + 2(\Delta x)^{2} + 6x + 6\Delta x) - (2x^{2} + 6x)}{\Delta x} \\

&= \lim_{\Delta x \to 0}\frac{4x\Delta x + 2(\Delta x)^2 + 6\Delta x}{\Delta x} \\ &= \lim_{\Delta x \to 0}\frac{\Delta x(4x + 2\Delta x + 6)}{\Delta x} \\ &= \lim_{\Delta x \to 0} 4x + 2\Delta x + 6 \\ &= 4x + 6.\end{align}</math>

    • This is a lot of work for such a simple function. We will see that there are plenty of derivative rules to skirt past this type of evaluation.
    • You can find the slope anywhere on the function <math>f(x) = 2x^2 + 6x.</math> Simply plug in any x value into the derivative <math>\frac{\mathrm{d}f(x)}{\mathrm{d}x} = 4x + 6.</math>

The Power Rule

  1. Use the power rule when <math>f(x)</math> is a polynomial function of degree n. Multiply the exponent with the coefficient and bring down the power by one.
    • The formula is <math>\frac{\mathrm{d}}{\mathrm{d}x}(x^{n}) = nx^{n-1}.</math>
    • Although the intuitive method seems to only apply to natural number exponents, it can be generalized to all real numbers; that is, <math>n \in \mathbb R.</math>
  2. Use the previous example. <math>f(x) = 2x^{2} + 6x.</math> Remember that <math>x = x^{1}.</math>
    • <math>\begin{align}f(x) &= 2x^2 + 6x \\

\frac{\mathrm{d}}{\mathrm{d}x}f(x) &= (2)2x^{2-1} + (1)6x^{1-1} \\ &= 4x + 6.\end{align}</math>

    • We have used the property that the derivative of a sum is the sum of the derivatives (technically, the reason why we can do this is because the derivative is a linear operator). Obviously, the power rule makes finding derivatives of polynomials much easier.
    • Before going on, it is important to note that the derivative of a constant is 0, because the derivative measures the rate of change, and no such change exists with a constant.

Higher Order Derivatives

  1. Differentiate again. Taking a higher order derivative of a function just means you take the derivative of the derivative (for order of 2). For example, if it asks you to take the third derivative, just differentiate the function three times. For polynomial functions of degree <math>n,</math> the <math>n+1</math> order derivative will be 0.
  2. Take the third derivative of the previous example <math>f(x) = 2x^{2} + 6x</math>.
    • <math>\begin{align}\frac{\mathrm{d}}{\mathrm{d}x}f(x) &= 4x + 6 \\

\frac{\mathrm{d}^{2}}{\mathrm{d}x^{2}}f(x) &= 4 \\ \frac{\mathrm{d}^{3}}{\mathrm{d}x^{3}}f(x) &= 0\end{align}</math>

    • In most applications of derivatives, especially in physics and engineering, you will at most differentiate twice, or perhaps three times.

The Product and Quotient Rules

  1. See Use the Product Rule article for a full treatment on the product rule. In general, the derivative of a product does not equal the product of the derivatives. Rather, each function "gets its turn" to differentiate.
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}(fg) = \frac{\mathrm{d}f}{\mathrm{d}x}g + f\frac{\mathrm{d}g}{\mathrm{d}x}</math>
  2. Use the quotient rule to take derivatives of rational functions. As with products in general, the derivative of a quotient does not equal the quotient of the derivatives.
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{f}{g}\right) = \frac{g\frac{\mathrm{d}f}{\mathrm{d}x} - f\frac{\mathrm{d}g}{\mathrm{d}x}}{g^{2}}</math>
    • A useful mnemonic for the numerator of the derivative is "Down-dee-up, up-dee-down," since the minus sign means the order matters.
    • For example, consider the function <math>f(x) = \frac{x^2 + 2x - 21}{x - 3}.</math> Let <math>g(x) = x^2 + 2x - 21</math> and <math>h(x) = x - 3.</math> Then use the quotient rule.
      • <math>\begin{align}\frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{g}{h}\right) &= \frac{(x-3)(2x+2)-(x^{2}+2x-21)(1)}{(x-3)^{2}} \\

&= \frac{x^{2} - 6x + 15}{(x-3)^{2}}\end{align}</math>

    • Make sure your algebra is up to par. Derivatives involving quotients like these can quickly become cumbersome in terms of the algebra involved. This means you should be comfortable with factoring out constants and keeping track of negative signs.

The Chain Rule

  1. Use the chain rule for nested functions. For example, consider the scenario where <math>z(y)</math> is a differentiable function of <math>y</math> and <math>y(x)</math> is a differentiable function of <math>x.</math> Then there is a composite function <math>z(y(x)),</math> or <math>z</math> as a function of <math>x,</math> that we can take the derivative of.
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}z(y(x)) = \frac{\mathrm{d}z}{\mathrm{d}y}\frac{\mathrm{d}y}{\mathrm{d}x}</math>
    • As with the product rule, this works with any number of functions; hence the "chain" rule. Here, an easy way to see how this works is if one imagines a <math>\frac{\mathrm{d}y}{\mathrm{d}y}</math> inserted between <math>\frac{\mathrm{d}z}{\mathrm{d}x}.</math>
  2. Consider the function <math>f(x) = (2x^{4} - x)^3</math>. Notice that this function can be decomposed into two elementary functions, <math>g(x) = 2x^{4} - x</math> and <math>h(g) = g^{3}.</math> Then, we want to find the derivative of the composition <math>f(x) = h(g(x)).</math>
    • Use the chain rule <math>\frac{\mathrm{d}}{\mathrm{d}x}h(g(x)) = \frac{\mathrm{d}h}{\mathrm{d}g}\frac{\mathrm{d}g}{\mathrm{d}x}.</math> We have now written the derivative in terms of derivatives that are easier to take. Then,
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}h(g(x)) = 3(2x^4 - x)^2(8x^3 - 1).</math>
    • With practice, you will see that applying the chain rule is easiest if you "peel away the onion." The first layer is everything inside the parentheses, cubed. The second layer is the function inside the parentheses. When dealing with more complex functions, this way of thinking helps to keep yourself on track and not get lost in what functions are taken with respect to what variables, etc.

Other Important Derivatives

  1. See this article for a full treatment on implicit differentiation. Understanding the chain rule is a must in order to implicitly differentiate.
  2. See this article for a full treatment on differentiating exponential functions.
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}e^{x} = e^{x}</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}a^{x} = a^{x}\ln a</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\ln x = \frac{1}{x}</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\log_{a}x = \frac{1}{x\ln a}</math>
  3. Memorize basic trigonometric derivatives and how to derive them.
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\sin x = \cos x</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\cos x = -\sin x</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\tan x = \sec^{2}x</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\cot x = -\csc^{2}x</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\sec x = \sec x\tan x</math>
    • <math>\frac{\mathrm{d}}{\mathrm{d}x}\csc x = -\csc x\cot x</math>

Video

{{#ev:youtube|QFZKLkYBiy8}}

Tips

  • Every technique outlined in this article on calculating derivatives can be verified by a proper use of the definition of the derivative. If, for example, the power rule seems sketchy to you, try and recover the formula using the definition.
  • Practice the product rule, chain rule, and especially implicit differentiation, as these are more difficult to differentiate and are widely used outside mathematics.
  • Know your calculator well; try different functions on your calculator to learn their uses. It is especially useful to know how to use the derivative functions of your calculator if they exist.