13. Differentiation
The process of differentiation is used to find the rate of change.
Graphically this is the equivalent of finding the gradient of a function.
For a linear graph the gradient is constant, for example, the gradient of the graph of [latex]y=3x-7[/latex] is [latex]3[/latex].
However, the graph of a function such as [latex]y=x^2[/latex], is a curve and therefore its gradient is always changing. In this case the process of differentiation will give us a formula that can be used to find the instantaneous gradient at any particular point on the curve. This is also sometimes defined as the gradient of the tangent to the curve at a particular point.
Since differentiation measures the rate of change, it has applications in numerous fields, wherever we are measuring variation, for example distance, speed and acceleration, temperature, profit and loss, growth and decay.
Do you need this chapter?
Below is a quiz on Differentiation. If you can answer all these questions, then you can skip this chapter as you already have the requisite knowledge.
Quiz: Differentiation
1. What is the derivative of [latex]y=2x^3+5x^2+6x+1[/latex] ?
2. Find [latex]\dfrac{dy}{dx}[/latex] given that [latex]y=2e^{3x}[/latex] .
3. What is the gradient of the graph of [latex]y=x^2[/latex] at the point [latex](2, 4)[/latex] ?
4. What is the derivative of [latex]y = 3x^{10}+\cos x[/latex] ?
5. Find the derivative of [latex](2x-3)^7[/latex] .
6. If [latex]y=\log_{e}3x[/latex] find [latex]y\, '[/latex] .
7. If [latex]f(x)=x\sin x[/latex] find [latex]f'(x)[/latex] .
8. Find [latex]\dfrac{d}{dx}\left(\dfrac{x^2}{\ln{3x}}\right)[/latex]
Answers
1. [latex]6x^2+10x+6[/latex]
2. [latex]6e^{3x}[/latex]
3. [latex]4[/latex]
4. [latex]30x^9-\sin x[/latex]
5. [latex]14(2x-3)^6[/latex]
6. [latex]\dfrac{1}{x}[/latex]
7. [latex]\sin x+x\cos x[/latex]
8. [latex]\dfrac{2x\ln3x-x}{(\ln 3x)^2}[/latex]
If you need to review this topic, continue reading.
Differentiation from first principles
Differentiation from first principles is the process of finding the derivative function using the definition: \begin{align*}f'(x)&=\lim_{h\rightarrow0}\frac{f(x+ h)-f(x)}{h}.\end{align*}
This formula is a version of [latex]gradient=\dfrac{rise}{run}[/latex] or [latex]\dfrac{y_{2}-y_{1}}{x_{2}-x_{1}}[/latex] as the change in [latex]x[/latex] values approaches zero (see the chapter Linear Functions: Straight Line Graphs).
Note that the derivative of a function (that is, the gradient function) can be represented as [latex]f'(x)[/latex] or as [latex]\dfrac{dy}{dx}[/latex] or as [latex]y\,'[/latex] or as [latex]\dfrac{d}{dx}(f(x))[/latex]
Examples: Differentiation by first principles
1. If [latex]{f(x)} = {x^{2}}[/latex], find the derivative of [latex]{f(x)}[/latex] from first principles.
[Note that if [latex]{f(x)} = {x^{2}}[/latex] then [latex]{f(x+h)} = {(x+h)^{2}}][/latex].
Solution:
Using the definition, \begin{align*}f'(x)&=\lim_{h\rightarrow0}\frac{f(x +h)-f(x)}{h}\\&=\lim_{h\rightarrow0}\frac{(x +h)^{2}-x^{2}}{h}\\&=\lim_{h\rightarrow0}\frac{x^{2}+ 2xh+ h^{2}-x^{2}}{h}\\&=\lim_{h\rightarrow0}\frac{2xh+ h^{2}}{h}\\&=\lim_{h\rightarrow0}\frac{h(2x+ h)}{h}\\&=\lim_{h\rightarrow0}2x +h\\&=2x.\end{align*}
We now have a formula that we can use to find the gradient at any point on the graph of [latex]{f(x)} = {x^{2}}[/latex]. The gradient will always equal two times the [latex]x[/latex] value at that point because [latex]f'(x)=2x[/latex]. For example, at the point on the curve, [latex](3, 9)[/latex] the gradient of the graph will be [latex]2x = 2×3=6[/latex].
2. Determine, from first principles, the gradient function for the curve [latex]f(x) = 2x^{2}-x[/latex] and calculate its value at [latex]x = 3[/latex]. [Note that if [latex]f(x) = 2x^{2}-x[/latex] then [latex]f(x+h) = 2(x+h)^{2}-(x+h)][/latex]
Solution:
\begin{align*}f'(x)&=\lim_{h\rightarrow0}\frac{f(x+ h)-f(x)}{h}
\\&=\lim_{h\rightarrow0}\frac{[2(x+ h)^{2}-(x+ h)]-[2x^{2}-x]}{h}
\\&=\lim_{h\rightarrow0}\frac{2x^{2} +4xh+ 2h^{2}-x-h-2x^{2}+ x}{h}
\\&=\lim_{h\rightarrow0}\frac{4xh +2h^{2}-h}{h}\\&=\lim_{h\rightarrow0}\frac{h(4x +2h-1)}{h}
\\&=\lim_{h\rightarrow0}4x +2h-1
\\&=4x-1.\end{align*}
The gradient function is [latex]f'(x)=4x-1[/latex] therefore [latex]f'(3)= 4(3)-1=11.[/latex] That is, at the point on this curve where [latex]x=3,[/latex] the gradient of the curve is [latex]11[/latex].
Differentiation by rule
For many functions, differentiation by first principles can be a long and difficult process. Fortunately, there is a set of rules that can be used to find the derivative of most functions without having to resort to differentiation by first principles.
Mathematics students should keep these rules with them at all times!
The first and most important rule of differentiation is:
if [latex]y=x^n[/latex] then [latex]\dfrac{dy}{dx}=nx^{n-1}[/latex]
or, if written in function notation, if [latex]f(x)=x^n[/latex] then [latex]f'(x)=nx^{n-1}[/latex]
Examples: Differentiation by rule
1. If [latex]y = x^2[/latex] then [latex]\dfrac{dy}{dx}=2x[/latex]
2. If [latex]y = x^3[/latex] then [latex]\dfrac{dy}{dx}=3x^2[/latex]
3. If [latex]y = x^4[/latex] then [latex]\dfrac{dy}{dx}=4x^3[/latex]
4. If [latex]y = x^5[/latex] then [latex]\dfrac{dy}{dx}=5x^4[/latex]
5. If [latex]y = x^3-x^2 +3x+ 7[/latex] then [latex]\dfrac{dy}{dx}=3x^2-2x+ 3[/latex]
6. If [latex]y = 5x^3-3x^2[/latex] then [latex]\dfrac{dy}{dx}=15x^2-6x[/latex]
Note that all of these examples follow the rule: If [latex]y=x^n[/latex] then [latex]\dfrac{dy}{dx}=nx^{n-1}[/latex]
Derivatives of polynomials
Note also that the derivative of a linear function is just a number (a constant): if [latex]y = 3x[/latex] then [latex]\dfrac{dy}{dx}=3.[/latex]
Also, the derivative of a constant is zero: if [latex]y = 7[/latex] then [latex]\dfrac{dy}{dx}=0[/latex]
And, if terms are added or subtracted, you can just differentiate each term separately. For example, if [latex]\begin{align*} y &= x^3-x^2 +3x+ 7 \end{align*}[/latex] then
\begin{align*}\dfrac{dy}{dx}&=\dfrac{d}{dx}(x^{3})-\dfrac{d}{dx}(x^{2})+ \dfrac{d}{dx}(3x)+ \dfrac{d}{dx}(7).\end{align*}
Therefore
\begin{align*}\dfrac{dy}{dx}=3x^2-2x +3.\end{align*}
Finally, note that if there is a number (coefficient) in front of the "[latex]x[/latex]" term, then this number is multiplied by the power when we differentiate. For example, if [latex]y = 5x^3-3x^2[/latex] then
\begin{align*}\dfrac{dy}{dx}&=5\left(\dfrac{d}{dx}(x^{3})\right)-3\left(\dfrac{d}{dx}(x^{2})\right)\\
&=5\left(3x^{2}\right)-3\left(2x^{1}\right)\\
&=15x^2-6x.\end{align*}
Now try the questions in the exercise below.
Exercise: Differentiation of polynomial functions
Differentiate each of the following functions.
1. [latex]y=x^7.[/latex]
2. [latex]y=3x^6.[/latex]
3. [latex]y = 2x^2 +7x+ 12.[/latex]
4. [latex]y=5x^3-9x.[/latex]
5. [latex]y = 7x^6-4x^4 +2x+1.[/latex]
6. [latex]y=4x-9x^4.[/latex]
Answers
1. [latex]7x^{6}.[/latex]
2. [latex]18x^{5}.[/latex]
3. [latex]4x +7.[/latex]
4. [latex]15x^{2}-9.[/latex]
5. [latex]42x^{5}-16x^{3}+2.[/latex]
6. [latex]4-36x^{3}.[/latex]
Differentiation of functions with negative or fractional powers
The rule, if [latex]y=x^n[/latex] then [latex]\dfrac{dy}{dx}=nx^{n-1}[/latex] also applies to powers that are not positive integers, as shown below.
Examples: Differentiation of functions with negative or fractional powers
1. If [latex]y = x^{-2}[/latex] then [latex]\dfrac{dy}{dx}=-2x^{-2-1}=-2x^{-3}[/latex].
2. If [latex]y = x^{-3}[/latex] then [latex]\dfrac{dy}{dx}=-3x^{-3-1}=-3x^{-4}[/latex].
3. To differentiate [latex]y=\dfrac{1}{x}[/latex] write [latex]y=x^{-1}[/latex] and apply the differentiation rule to get
\begin{align*}\dfrac{dy}{dx}&=-1x^{-1-1}\\&=-1x^{-2}\\&=-\dfrac{1}{x^{2}}.\end{align*}
4. To differentiate [latex]y =\sqrt{x}[/latex] write [latex]y =x^{\frac{1}{2}}[/latex] and apply the rule to get
\begin{align*}\dfrac{dy}{dx} &=\dfrac{1}{2}x^{\frac{1}{2}-1}\\
&=\dfrac{1}{2}x^{-\frac{1}{2}}\\
&=\dfrac{1}{2\sqrt{x}}. \end{align*}
5. If [latex]y = x^\frac{2}{3}[/latex] then
\begin{align*}\frac{dy}{dx}&=\frac{2}{3}x^
{\frac{2}{3}-1}\\
&=\dfrac{2}{3}x^{-\frac{1}{3}}\\
&=\dfrac{2}{3}\times \frac{1}{x^{ \frac{1}{3}} } \\
&=\dfrac{2}{3}\times \frac{1}{\sqrt[3]{x}}\\
&=\frac{2}{3\sqrt[3]{x}}.
\end{align*}.
Note that all these examples use the rule that we used for differentiating a polynomial function. That is, if [latex]y=x^n[/latex] then [latex]\dfrac{dy}{dx}=nx^{n-1}.[/latex] The number in the power comes to the front of the [latex]x[/latex] term and we subtract [latex]1[/latex] from the power.
Note also that you need to know the index laws to be competent at differentiation. Go to the chapter on Indices if you need to revise this topic.
Now try the questions in the exercise below.
Exercise: Differentiation of functions with negative or fractional powers
Differentiate each of the following functions.
1. [latex]y=x^{-4}.[/latex]
2. [latex]y = 6x^\frac{1}{2}.[/latex]
3. [latex]y=3x^2+\frac{1}{x}+4.[/latex]
4. [latex]y = \dfrac{1}{x^2} +12x+ \sqrt{x}.[/latex]
5. [latex]y=5x^3-\sqrt[3]{x}.[/latex]
Answers
1. [latex]-4x^{-5}[/latex]
2. [latex]3x^{-\frac{1}{2}}[/latex]
3. [latex]6x -\dfrac{1}{x^2}[/latex]
4. [latex]\dfrac{-2}{x^3}+12+ \dfrac{1}{2\sqrt{x}}[/latex]
5. [latex]15x^{2}-\dfrac{1}{3}x^{-\frac{2}{3}}=15x^{2}-\dfrac{1}{3\sqrt[3]{x^2}}[/latex]
Note that when the question contains negative powers or fractional powers, then the answer is usually expressed with negative or fractional powers.
If the question contains algebraic fractions and square roots, then the answer is usually expressed with algebraic fractions and square roots.
Differentiation of trigonometric, exponential and logarithmic functions
There are, of course, many other rules that can be used to differentiate other types of functions. Some of these are shown in the table below.
| Function | Derivative | Generalised Form | Derivative |
|---|---|---|---|
| [latex]y=x^n[/latex] | [latex]\dfrac{dy}{dx}=nx^{n-1}[/latex] | [latex]y=(ax+ b)^n[/latex] | [latex]\dfrac{dy}{dx}=an(ax+ b)^{n-1}[/latex] |
| [latex]y=\sin x[/latex] | [latex]\dfrac{dy}{dx}=\cos x[/latex] | [latex]y = \sin \left( f(x) \right)[/latex] | [latex]\dfrac{dy}{dx}= f'(x) \cos f(x)[/latex] |
| [latex]y=\cos x[/latex] | [latex]\dfrac{dy}{dx}=-\sin x[/latex] | [latex]y = \cos \left( f(x) \right)[/latex] | [latex]\dfrac{dy}{dx}= - f'(x) \sin f(x)[/latex] |
| [latex]y=\tan x[/latex] | [latex]\dfrac{dy}{dx}=\sec^2 x[/latex] | [latex]y = \tan \left( f(x) \right)[/latex] | [latex]\dfrac{dy}{dx}= f'(x) \sec^2 f(x)[/latex] |
| [latex]y=e^x[/latex] | [latex]\dfrac{dy}{dx}=e^x[/latex] | [latex]y=e^{f(x)}[/latex] | [latex]\dfrac{dy}{dx}=f'(x)e^{f(x)}[/latex] |
| [latex]y=\ln(x)[/latex] | [latex]\dfrac{dy}{dx}=\dfrac{1}{x}[/latex] | [latex]y=\ln \left( f(x) \right)[/latex] | [latex]\dfrac{dy}{dx}=\dfrac{f'(x)}{f(x)}[/latex] |
Examples: Differentiation of trigonometric, exponential and logarithmic functions
Use the rules in the table above to find the derivatives of the given functions.
1. [latex]y = 2\sin x[/latex]
[latex]\dfrac{dy}{dx} = 2\cos x[/latex]
2. [latex]y = \cos 2x[/latex]
[latex]\dfrac{dy}{dx} =- 2\sin 2x[/latex]
3. [latex]y = 2\sin 3x[/latex]
[latex]\dfrac{dy}{dx} = 6\cos 3x[/latex]
4. [latex]y = \sin (3x^2+1)[/latex]
[latex]\dfrac{dy}{dx} = (6x)\cos (3x^2+1)[/latex]
5. [latex]y = e^x[/latex]
[latex]\dfrac{dy}{dx} = e^x[/latex]
6. [latex]y = e^{2x}[/latex]
[latex]\dfrac{dy}{dx} = 2e^{2x}[/latex]
7. [latex]y = (2x+7)^6[/latex]
[latex]\dfrac{dy}{dx} = (2)(6)(2x+7)^5[/latex]
[latex]\dfrac{dy}{dx} = 12(2x+7)^5[/latex]
8. [latex]y=\sin5x+2\cos x+2e^{3x}+2x^{2}-\ln(x)+9[/latex]
[latex]\dfrac{dy}{dx} =5\cos5x-2\sin x+6e^{3x}+4x-\frac{1}{x}[/latex]
Differentiation has many applications, but before you can apply it to real world situations, you need to be familiar with the rules and competent with the mathematical process.
Try the following exercise.
Exercise: Differentiation of trigonometric, exponential and logarithmic functions
Use the rules in the table above to find the derivatives of the given functions.
1. [latex]y = 2\sin 6x.[/latex]
2. [latex]y = \cos {\left(2x+\dfrac{π}{4}\right)}.[/latex]
3. [latex]y = e^{7x}.[/latex]
4. [latex]y = \left(3x+1\right)^3.[/latex]
5. [latex]y = \ln\left(x+1 \right).[/latex]
6. [latex]y = 2e^{x^2}.[/latex]
7. [latex]y = \sin \left(x^2\right).[/latex]
8. [latex]y = 3\sin\left(7x-\dfrac{π}{3}\right).[/latex]
9. [latex]y = \cos 2x-x^3-\dfrac{2}{x}+1.[/latex]
10. [latex]y=2e^{x-1}+3e^{x^2}.[/latex]
Answers
1. [latex]12\cos 6x[/latex]
2. [latex]-2\sin {\left(2x+\dfrac{π}{4}\right)}[/latex]
3. [latex]7e^{7x}[/latex]
4. [latex]9(3x+1)^2[/latex]
5. [latex]\dfrac{1}{x+1}[/latex]
6. [latex]4xe^{x^2}[/latex]
7. [latex]2x\cos \left(x^2 \right)[/latex]
8. [latex]21\cos\left(7x-\dfrac{π}{3}\right)[/latex]
9. [latex]-2\sin 2x-3x^2+\dfrac{2}{x^2}[/latex]
10. [latex]2e^{x-1}+6xe^{x^2}[/latex]
Besides the rules of differentiation for basic functions, there are three more rules that you need to know to differentiate more complicated functions. These are the product rule, the quotient rule and the chain rule.
The Product rule
The product rule is used to help differentiate a function that is made up of two other functions multiplied together. For example, we would use the product rule to differentiate functions such as, [latex]y = (x^2+x)(3x-7)[/latex] or [latex]f(x)=x\sin x[/latex] or [latex]y = x^3e^x[/latex].
The product rule tells us that the derivative of the product of two functions is equal to the first function multiplied by the derivative of the second function plus the second function multiplied by the derivative of the first function.
Symbolically, if [latex]u[/latex] and [latex]v[/latex] are both functions of [latex]x[/latex], and [latex]y=uv[/latex] then
\begin{align*}
\dfrac{dy}{dx}&=u\dfrac{dv}{dx}+v\dfrac{du}{dx}\\
\end{align*}
or, using function notation, if [latex]f(x)=g(x)×h(x)[/latex] then
\begin{align*}
f\,'(x)=g(x)×h\,'(x)+h(x)×g\,'(x).
\end{align*}
Example: Differentiation using the product rule
1. Use the product rule to differentiate [latex]y = (x^2+x)(3x-7)[/latex]. Check your answer by expanding the brackets first and then differentiating.
Solution:
Given [latex]y = (x^2+x)(3x-7)[/latex] , let [latex]u = (x^2+x)[/latex] and let [latex]v = (3x-7).[/latex]
This means that [latex]\dfrac{du}{dx}=(2x+1)[/latex] and [latex]\dfrac{dv}{dx}=3.[/latex]
The product rule states that if [latex]y=uv[/latex] then [latex]\dfrac{dy}{dx}=u\dfrac{dv}{dx}+v\dfrac{du}{dx}[/latex]
Therefore, if [latex]y = (x^2+x)(3x-7),[/latex]
\begin{align*}
\frac{dy}{dx}&=(x^2+x)(3)+(3x-7)(2x+1)\\
&=3x^2+3x+6x^2-11x-7\\
&=9x^2-8x-7.
\end{align*}
Check:
Expanding,
\begin{align*}
y = (x^2+x)(3x-7)&= 3x^3-4x^2-7x.
\end{align*}
Therefore
\begin{align*}
\dfrac{dy}{dx}&=9x^2-8x-7
\end{align*}
as above.
In the example above, the derivative can be easily found without resorting to the product rule. However, this is not always the case. In fact, often the product rule is not only helpful, but necessary.
Further examples: Differentiation using the product rule
Differentiate the following functions.
1. [latex]y = x\sin x[/latex]
Solution:
\begin{align*}
y&=\left(x \right) \left( \sin x\right).
\end{align*}
Let [latex]u = (x)[/latex] and [latex]v = (\sin x)[/latex], then [latex]\dfrac{du}{dx}=1[/latex] and [latex]\dfrac{dv}{dx}=\cos x[/latex].
Given that if [latex]y=uv[/latex] then [latex]\dfrac{dy}{dx}=u\dfrac{dv}{dx}+v\dfrac{du}{dx}[/latex], we have
\begin{align*}
\frac{dy}{dx}&=x\cos x+\sin x\left(1 \right)\\
&=x\cos x+\sin x.
\end{align*}
2. [latex]y =(x^2+1) e^{2x}[/latex]
Let [latex]u = (x^2+1)[/latex] and [latex]v = (e^{2x})[/latex] then [latex]\dfrac{du}{dx}=2x[/latex] and [latex]\dfrac{dv}{dx}=2e^{2x}.[/latex]
Given that if [latex]y=uv[/latex] then [latex]\dfrac{dy}{dx}=u\dfrac{dv}{dx}+v\dfrac{du}{dx}[/latex], we have
\begin{align*}
\dfrac{dy}{dx}&=\left(x^2+1 \right) \left(2e^{2x} \right)+\left(e^{2x} \right)\left(2x \right)\\
&=2\left(x^2+1 \right) e^{2x}+2x\left(e^{2x} \right)\\
&= e^{2x}\left[2 \left(x^2+1 \right) +2x \right]\\
&= e^{2x}\left[2\left(x^2+x+1 \right) \right]\\
&= 2e^{2x}\left(x^2+x+1 \right).
\end{align*}
Now try this exercise.
Exercise: Differentiation using the product rule
Use the product rule to find the derivative of each of the following functions.
1. [latex]y=(x^2+2x)(x^3+7).[/latex]
2. [latex]y = x \cos x.[/latex]
3. [latex]y =(x^2) e^{x}.[/latex]
4. [latex]y = \sqrt{x}\ln x.[/latex]
Answers
1. [latex]5x^4+8x^3+14x+14[/latex]
2. [latex]-x\sin x+\cos x[/latex]
3. [latex]x(x+2)e^x[/latex]
4. [latex]\dfrac{\sqrt{x}}{x}+\dfrac{\ln x}{2\sqrt{x}}[/latex] or [latex]\dfrac{\sqrt{x}(2+\ln x)}{2x}[/latex]
The Quotient rule
The quotient rule is used to differentiate a function that is made up of one function divided by another function. For example, we would use the quotient rule to differentiate functions such as, [latex]y =\dfrac {x^2+x}{3x-7}[/latex] or [latex]f(x)=\dfrac{x}{\sin x}[/latex] .
If [latex]u[/latex] and [latex]v[/latex] are both functions of [latex]x[/latex] and [latex]y=\dfrac{u}{v}[/latex] then
\begin{align*}
\frac{dy}{dx}&=\dfrac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{v^2}
\end{align*}
or, using function notation, if [latex]f(x)=\dfrac{g(x)}{h(x)}[/latex] then
\begin{align*}
f'(x)=\dfrac{h(x)×g\,'(x)-g(x)×h'(x)}{[h(x)]^2}.
\end{align*}
Examples: Differentiation using the quotient rule
Use the quotient rule to find the derivatives of each of the following functions
1. [latex]y =\dfrac {x^2+x}{3x-7}[/latex]
Let [latex]u=x^2+x[/latex] and let [latex]v=3x-7[/latex]
Then [latex]\dfrac{du}{dx}=2x+1[/latex] and [latex]\dfrac{dv}{dx}=3.[/latex]
If [latex]y=\dfrac{u}{v}[/latex] then [latex]\dfrac{dy}{dx}=\dfrac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{v^2}.[/latex]
Therefore, in this case,
\begin{align*}
\frac{dy}{dx}&=\frac {\left(3x-7 \right) \left(2x+1 \right)- \left( x^2+x \right) \left( 3 \right)}{\left(3x-7 \right)^{2}}\\
&=\frac{\left(6x^2-11x-7\right)-\left(3x^2+3x\right)}{\left(3x-7\right)^{2}}\\
&=\frac{3x^2-14x-7}{\left(3x-7 \right)^2}.
\end{align*}
2. [latex]y =\dfrac {x}{\sin x}[/latex]
Let [latex]u=x[/latex] and let [latex]v=\sin x[/latex]. Then [latex]\dfrac{du}{dx}=1[/latex] and [latex]\dfrac{dv}{dx}=\cos x[/latex]
If [latex]y=\dfrac{u}{v}[/latex] then [latex]\dfrac{dy}{dx}=\dfrac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{v^2}[/latex].
Therefore, in this case,
\begin{align*}
\frac{dy}{dx}&=\frac{\left(\sin x \right) \left(1 \right)- \left(x \right) \left(\cos x \right)}{\left(\sin x \right)^2}\\
&=\frac{\sin x-x\cos x}{\sin^2x}.\\
\end{align*}
Now try the exercises below.
Exercise: Differentiation using the quotient rule
Use the quotient rule to find the derivative of each of the following functions.
1. [latex]y=\dfrac{3x^2+4x+1}{7x-3}.[/latex]
2. [latex]y=\dfrac{1+x}{x^{2}-3}.[/latex]
3. [latex]y =\dfrac{\cos x}{x^2}.[/latex]
Answers
1. [latex]\dfrac{21x^2-18x-19}{(7x-3)^2}.[/latex]
2. [latex]\dfrac{-x^{2}-2x-3}{(x^2-3)^2}.[/latex]
3. [latex]\dfrac{-x\sin x-2\cos x}{x^3}.[/latex]
The Chain rule
The chain rule, also known as the "function of a function" rule, can be used to differentiate composite functions, such as [latex]y = (x^2+5)^6 [/latex] and [latex]y=\sin^2x[/latex] and [latex]y=\sqrt{x^2+6}[/latex].
The chain rule tells us that if [latex]y[/latex] is a function of [latex]u[/latex] where [latex]u[/latex] is a function of [latex]x[/latex] then
\begin{align*}
\frac{dy}{dx}&=\frac{dy}{du}×\frac{du}{dx}.
\end{align*}
Another form of the chain rule that is sometimes useful is the "power rule" that tells us that if [latex]y = \left[f\left(x \right) \right]^n[/latex] then
\begin{align*}
\dfrac{dy}{dx}= n\left[f\left(x \right) \right]^{n-1} \times f'\left(x \right).
\end{align*}
Examples: Differentiation using the chain rule
1. If [latex]y=(x^2+5)^6[/latex] find [latex]\dfrac{dy}{dx}[/latex]
Solution
Let [latex]u=(x^2+5) ⇒ \dfrac{du}{dx}=2x[/latex]
If [latex]u=(x^2+5)[/latex], then [latex]y = u^6[/latex] and [latex]\dfrac{dy}{du}=6u^5[/latex]
The chain rule says [latex]\dfrac{dy}{dx}=\dfrac{dy}{du} \times \dfrac{du}{dx}[/latex].
Therefore [latex]\dfrac{dy}{dx}=6u^5 \times 2x.[/latex]
Substituting [latex]u=(x^2+5)[/latex] back into this equation we get
[latex]\dfrac{dy}{dx}=6(x^2+5)^5 \times 2x[/latex]
[latex]=12x(x^2+5)^{5}.[/latex]
Alternate solution:
Using the "power rule" version of the chain rule:
[latex]y = \left[f \left(x \right) \right]^n[/latex] ⇒ [latex]\dfrac{dy}{dx}= n \left[f \left(x \right) \right]^{n-1}×f' \left(x \right).[/latex]
So if [latex]y= \left(x^2+5 \right)^6[/latex] then
[latex]\dfrac{dy}{dx}=6\left(x^2+5 \right)^5 \times 2x[/latex]
[latex]=12x\left(x^2+5 \right)^5[/latex]
as above.
2. If [latex]y=\sin^2x[/latex] find [latex]\dfrac{dy}{dx}[/latex]
Solution:
We have [latex]y=\sin^2x = (\sin x)^2[/latex]. Let [latex]u=(\sin x) \text{ then } \dfrac{du}{dx}=\cos x.[/latex]
If [latex]u=(\sin x)[/latex] then [latex]y = u^2 ⇒ \dfrac{dy}{du}=2u^1=2u.[/latex]
Using
[latex]\dfrac{dy}{dx}=\dfrac{dy}{du} \times\dfrac{du}{dx}[/latex]
we have [latex]\dfrac{dy}{dx}=2u\times \cos x.[/latex]
Substituting [latex]u=(\sin x)[/latex] back into this equation we get
[latex]\dfrac{dy}{dx}=2\sin x \times \cos x[/latex]
[latex]=2\sin x\cos x.[/latex]
(Note that [latex]2\sin x\cos x[/latex] may be simplified to [latex]\sin 2x[/latex] using trigonometric identities)
Alternate solution:
Using the "power rule" version of the chain rule:
[latex]y = [f(x)]^n[/latex] ⇒ [latex]\dfrac{dy}{dx}= n[f(x)]^{n-1}×f'(x)[/latex]
So if [latex]y=(\sin x)^2[/latex] then
\begin{align*}
\dfrac{dy}{dx}&=2(\sin x)^1×\cos x \\
&=2\sin x\cos x
\end{align*}
as above.
3. If [latex]y=\sqrt{x^2+6}[/latex] find [latex]\dfrac{dy}{dx}[/latex]
Solution:
We have [latex]y=\sqrt{x^2+6}=(x^2+6)^{\frac{1}{2}}[/latex].
Let [latex]u=(x^2+6) ⇒ \dfrac{du}{dx}=2x.[/latex]
If [latex]u=(x^2+6)[/latex] then [latex]y = u^{\frac{1}{2}} \text{ and } \dfrac{dy}{du}=\dfrac{1}{2}u^{-\frac{1}{2}}=\dfrac{1}{2\sqrt{u}}.[/latex]
Using the chain rule:
\begin{align*}\dfrac{dy}{dx}&=\dfrac{dy}{du} \times \dfrac{du}{dx}\end{align*}
we have
\begin{align*}
\dfrac{dy}{dx}&=\dfrac{1}{2\sqrt{u}} \times 2x\\
&=\dfrac{x}{\sqrt{u}}.
\end{align*}
Substituting [latex]u=(x^2+6)[/latex] back into this equation we get
[latex]\dfrac{dy}{dx}=\dfrac{x}{\sqrt{x^2+6}}[/latex].
Alternate solution:
Using the "power rule" version of the chain rule:
[latex]y = [f(x)]^n[/latex] ⇒ [latex]\dfrac{dy}{dx}= n[f(x)]^{n-1}×f'(x)[/latex]
So if [latex]y=(x^2+6)^{\frac{1}{2}}[/latex] then
\begin{align*}
\dfrac{dy}{dx}&=\dfrac{1}{2}(x^2+6)^{-\frac{1}{2}} \times 2x\\
&=x(x^2+6)^{-\frac{1}{2}}\\
&=\dfrac{x}{\sqrt{x^2+6}}
\end{align*}
as above.
Now try the exercises below.
Exercise: Differentiation using the chain rule
Use the chain rule to find the derivative of each of the following functions.
1. [latex]y = (x^2+5)^6 [/latex]
2. [latex]y = (2x^3+5x+3)^4 [/latex]
3. [latex]y=\sin^2x[/latex]
4. [latex]y=\sqrt{x^2+6}[/latex]
5. [latex]y=4\cos^32x[/latex]
6. [latex]\dfrac{1}{(x^2-1)^3} = (x^2-1)^{-3}[/latex]
7. [latex]y=x\sqrt{x^2+6}[/latex]
Answers
1. [latex]12x(x^2+5)^5[/latex]
2. [latex]4(6x^2+5)(2x^3+5x+3)^3[/latex]
3. [latex]2\sin x[/latex] [latex]\cos x=\sin 2x[/latex] simplified using trigonometric identities.
4. [latex]\dfrac{x}{\sqrt{x^2+6}}[/latex]
5. [latex]-24\cos^22x[/latex] [latex]\sin 2x[/latex]
6. [latex]\dfrac{-6x}{(x^2-1)^4}[/latex]
7. [latex]\dfrac{x^2}{\sqrt{x^2+6}}+{\sqrt{x^2+6}}[/latex] or [latex]\dfrac{2x^2+6}{\sqrt{x^2+6}}[/latex] using product rule and chain rule
Miscellaneous derivatives
In the following exercise, you have to determine which rule to use. This is an essential skill.
Exercise: Miscellaneous derivatives
Differentiate each of the following functions.
1. [latex]y = 2x^3 +7x^2+12x-7[/latex]
2. [latex]y = x^{12}-4x^9[/latex]
3. [latex]y=5x^3-2x+e^{2x}+\sin x[/latex]
4. [latex]y = \dfrac{5}{x^2} +12x+ \sqrt{x}[/latex]
5. [latex]y = 7\cos 2x[/latex]
6. [latex]y=2(5x-7)^2[/latex]
7. [latex]y = \sin {(3x+\frac{π}{6})}[/latex]
8. [latex]y = (3x^2+1)^3[/latex]
9. [latex]y = 3\ln(2x+7)[/latex]
10. [latex]y = e^{3x+1}[/latex]
11. [latex]y = \sin (x^3)[/latex]
12. [latex]y = \sin^3 (x)[/latex]
13. [latex]y=2e^{4x}+3e^{x^2}[/latex]
14. [latex]y=(2x+3)(x^2+7)[/latex]
15. [latex]y = x^2 \sin x[/latex]
16. [latex]y =(x) e^{x}[/latex]
17. [latex]y=\dfrac{3x+4}{7x^2-3x+1}[/latex]
18. [latex]y =\dfrac{x^2}{\sin x}[/latex]
19. [latex]y=\sqrt{2x+3}[/latex]
20. [latex]y=x^2\sin^2(x)[/latex]
Answers
1. [latex]6x^2+14x+12[/latex]
2. [latex]12x^{11}-36x^8[/latex]
3. [latex]15x^2-2+2e^{2x}+\cos x[/latex]
4. [latex]y = -\dfrac{10}{x^3} +12+\dfrac{1}{2\sqrt{x}}[/latex]
5. [latex]y = -14\sin 2x[/latex]
6. [latex]y=20(5x-7)[/latex]
7. [latex]y = 3\cos{(3x+\frac{π}{6})}[/latex]
8. [latex]y = 18x(3x^2+1)^2[/latex]
9. [latex]y =\dfrac{6}{2x+7}[/latex]
10. [latex]y = 3e^{3x+1}[/latex]
11. [latex]y = 3x^2\cos(x^3)[/latex]
12. [latex]y = 3\sin^2(x)[/latex][latex]\cos x[/latex]
13. [latex]y=8e^{4x}+6xe^{x^2}[/latex]
14. [latex]y=6x^2+6x+14[/latex]
15. [latex]y = x^2\cos x+2x\sin x[/latex]
16. [latex]y =(x) e^{x}+e^{x}[/latex]
17. [latex]y=\dfrac{-21x^2-56x+15}{{7x^2-3x+1}^2}[/latex]
18. [latex]y =\dfrac{2x\sin x-x^2\cos x}{\sin^2x}[/latex]
19. [latex]y=\dfrac{1}{\sqrt{2x+3}}[/latex]
20. [latex]y=2x\sin(x)[x\cos(x)+\sin(x)][/latex]
Key takeaways
- The process of differentiation is used to find the rate of change of a function. Graphically, this is the equivalent of finding the gradient or slope of a function.
- The derivative of a function gives us a formula that we can use to find the gradient of a curve at any particular point on that curve.
- The derivative of a function can be found from first principles, or (more usually) by using a list of standard derivatives along with the product, quotient and chain rules.