derivative rules

Problems with first principle

Although we already know how to find the derivative of a function, we require more powerful tools in order to derive some more complex ones.

For example, take f(x)=x25 f(x) = x^{25} . Deriving this using first principle would be incredibly time consuming and difficult. However, this lecture will teach you all the rules so that you can differentiate any function with ease!

Derivation rules

  1. Constant rule

  2. Constant multiple rule

  3. Sum rule

  4. Power rule

  5. Product rule

  6. Quotient rule

  7. Chain rule

1. Constant Rule

The constant rule is quite straight forward: Any constant's derivative is equal to 00.

ddx(c)=0 \frac {d} {dx} (c) = 0

For example, take y=5 y = 5 . It's derivative is y=ddx(5)=0 y' = \frac {d} {dx} (5) = 0 .

2. Constant multiple Rule

The constant multiple rule is another simple rule which states that the derivative of the coefficient attached to any function is that same coefficient with the derivative of the function it is attached to.

ddx[cf(x)]=cf(x) \frac {d} {dx} [cf(x)] = cf'(x)

For example, take y=5x y = 5x . Let's assume that we know that the derivative of y=x y = x is y=ddx(x)=1 y' = \frac {d} {dx} (x) = 1.

Then the derivative of y=5x y = 5x is y=ddx(5x)=5(ddx(x))=5(1)=5 y' = \frac {d} {dx} (5x) = 5(\frac {d} {dx} (x)) = 5(1) = 5 .

3. Sum Rule

Another easy rule. The sum rule states that the derivative of the sum or difference of two functions can be evaluated as two separate derivatives added together.

ddx[f(x)±g(x)]=f(x)±g(x) \frac {d} {dx} [f(x) \pm g(x)] = f'(x) \pm g'(x)

As an example, take f(x)=5x2+2x f(x) = 5x^2 + 2x . Assume that we already know that ddx[5x2]=10x \frac {d} {dx} [5x^2] = 10x and ddx[2x]=2 \frac {d} {dx} [2x] = 2 .

Then, its derivative is:

f(x)=ddx[5x2+2x] f'(x) = \frac {d} {dx} [ 5x^2 + 2x ]

  =ddx[5x2]+ddx[2x] \quad \quad \ \ = \frac {d} {dx} [5x^2] + \frac {d} {dx} [2x]

  =10x+2 \quad \quad \ \ = 10x + 2

This rule also applies to subtraction, so if f(x)=5x22x f(x) = 5x^2 - 2x , then f(x)=10x2f'(x) = 10x - 2 .

4. Power Rule

This rule may be one of the most useful rules out all of the ones you will learn! It works for any function that has a power attached to it. It applies to functions of the form xn x^n where nn is a constant.

ddx[xn]=nxn1 \frac {d} {dx} [x^n] = nx^{n - 1}

Let's go back to that horrendous function y=x25 y = x^{25} . Well, with this new rule, it's not so hard.

The derivative is simply:

y=ddx(x25) y' = \frac {d} {dx} (x^{25})

       =25x251 \; \; \; \ = 25x^{25 - 1}

       =25x24 \; \; \; \ = 25x^{24}

Not so difficult after all!

5. Product Rule

This rule is used when you want to find the derivative of a product of two functions. The derivative of a product of two functions is the first function times the second funtion's derivative added to the first function's derivative times the second function.

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x) \frac {d} {dx} [f(x)g(x)] = f(x)g'(x) + f'(x)g(x)

Let's look at the function h(x)=(5x2+x)(2x+1) h(x) = (5x^2 + x)(2x + 1) . It is made up of two "sub-functions", f(x)=5x2+x f(x) = 5x^2 + x and g(x)=2x+1 g(x) = 2x + 1 .

To find h(x) h'(x) , simply use the formula above:

h(x)=ddx[(5x2+x)(2x+1)] h'(x) = \frac {d} {dx} [ (5x^2 + x)(2x + 1) ]

  =(5x2+x)ddx[(2x+1)]+ddx[5x2+x](2x+1) \quad \quad \ \ = (5x^2 + x) \frac {d} {dx}[ (2x + 1) ] + \frac {d} {dx} [5x^2 + x] (2x + 1)

  =(5x2+x)(2)+(10x+1)(2x+1) \quad \quad \ \ = (5x^2 + x)(2) + (10x + 1)(2x + 1)

  =10x2+2x+20x2+12x+1 \quad \quad \ \ = 10x^2 + 2x + 20x^2 + 12x + 1

  =30x2+14x+1 \quad \quad \ \ = 30x^2 + 14x + 1

6. Quotient Rule

The quotient rule is the hardest one to remember out of all of the other rule.

One trick to remember it is to remember the following: low d'high minus high d'low over low-low. Low refers to the lower function, high refers to the upper function and d' refers to the derivative.

ddx[f(x)g(x)]=g(x)f(x)f(x)g(x)[g(x)]2 \frac {d} {dx} [ \frac {f(x)} {g(x)} ] = \frac {g(x)f'(x) - f(x)g'(x)} {[g(x)]^2}

Consider the function h(x)=5x22x h(x) = \frac {5x^2} {2x} .

Its derivative is:

h(x)=ddx(5x22x) h'(x) = \frac {d} {dx} (\frac {5x^2} {2x})

  =(5x2)ddx(2x)  ddx(5x2)(2x)(2x)2 \quad \quad \ \ = \frac {(5x^2) \frac {d} {dx} (2x) \ - \ \frac {d} {dx} (5x^2) (2x)} {(2x)^2}

  =(5x2)(2)  (10x)(2x)4x2 \quad \quad \ \ = \frac {(5x^2)(2) \ - \ (10x)(2x)} {4x^2}

  =10x2  20x24x2 \quad \quad \ \ = \frac {10x^2 \ - \ 20x^2} {4x^2}

  =52 \quad \quad \ \ = - \frac {5} {2}

Obviously, it would be easier to determine the derivative by first simplifying, but we did it this way to show you how the quotient rule works.

7. Chain Rule

Another one of the favourites! You use this rule when there are functions inside other functions. You find the derivative of the outer function, while keeping the function inside of it, then multiply the outer function by the derivative of the inner one.

ddxf(g(x))=f(g(x)) g(x) \frac {d} {dx} f(g(x)) = f'(g(x)) \ g'(x)

Let's find the derivative of f(x)=5x2 f(x) = \sqrt {5x^2} :

Remember, x=x12 \sqrt{x} = x^{\frac{1}{2}} .

f(x)=125x2 (10x) f'(x) = \frac{1}{2} \sqrt {5x^2} \ (10x) :

  =5x5x2 \quad \quad \ \ = 5x \sqrt {5x^2} :

Again, we could have simplified, but the aim was to demonstrate the rule for future use cases.