EPPS Math and Coding Camp

Differentiation

Instructor: Prajyna Barua and Azharul Islam

https://forms.gle/uLaMnx5amMzwCKav9

6.2 DERIVATIVES OF FUNCTIONS

6.2.1 Polynomials and Powers

The power rule

\[ \frac{dx^n}{dx}=nx^{n-1} \]

The constant rule

\[ y=f(x)=ax \]

\[ f'(x)=\frac{d(ax)}{dx}=a \]

recall: \(x^{-n}=\frac{1}{x^n}\) and \(x^{\frac{1}{n}}=\sqrt[n]{x}\)

The derivative of \(e^x\) is just \(e^x\):

\[ \frac{de^x}{dx}=e^x \]

6.1 RULES FOR DIFFERENTIATION

6.1.1 The Derivative Is a Linear Operator

  • A linear operator satisfies pretty much the same definition. That is, an operator like \(\frac{d}{dx}\) is linear if \(\frac{d(f+g)}{dx}=\frac{df}{dx}+\frac{dg}{dx}\) and \(\frac{d(cf)}{dx}=c\frac{df}{dx}\) for any two (differentiable!) functions \(f\) and \(g\) and any constant \(c\).

\[\frac{d(f+g)}{dx}=\frac{df}{dx}+\frac{dg}{dx}\]

\[\frac{d(cf)}{dx}=c\frac{df}{dx}\]

  • \((f+g)'=f'+g'\) and \((f-g)'=f'-g'\)
  • \((af+bg)'=af'+bg'\) for any two constants \(a\) and \(b\) and any two (differentiable) functions \(f\) and \(g\).
  • \(h'(x)=f'(x)+g'(x)\)

Example:

\[h(x)=x^3+6x^2+1\]

Let’s work out this last one to see the application of the rule a bit more carefully.

\[\frac{dh(x)}{dx}=\frac{d(x^3+6x^2+1)}{dx}\]

\[=\frac{d(x^3)}{dx}+\frac{d(6x^2)}{dx}+\frac{d(-3x)}{dx}+\frac{d(1)}{dx}\]

\[=\frac{d(x^3)}{dx}+6 \frac{d(x^2)}{dx}-3 \frac{d(x)}{dx}+\frac{d(1)}{dx}\]

\[=3x^2+6(2x)-3(1)+0\]

\[=3x^2+12x-3\]

6.1.2 Chain Rule

For composite functions looks like \(g(f(x)\), we let \(f\) and \(g\) be differentiable.

\[ g'(u)=g'(f(x)) \]

\[ \frac{dg(f(x))}{dx}=\frac{dg(u)}{du} \frac{du}{dx}, \text{ where } u=f(x) \]

In words, take the derivative of the outer function (\(g\) of \(x\)) evaluated at the inner function (\(f\) of \(x\)), then take the derivative of the inner function (\(f\) of \(x\)), and multiply the two terms.

We can also write it as\((g(f(x)))'=g'(f(x))f'(x)\)

Example: \(h(x)=e^{2x^2}\)

We let \(f(x)=2x^2\) and \(g(x)=e^x\), so \(h(x)=g(f(x))\)

We show below that \(\frac{de^x}{dx}=e^x\) and we can use the fact that the derivative is a linear operator to find that the derivative of \(2x^2\) is \(2\frac{dx^2}{dx}=2(2x)=4x\)

Given this, we can apply the chain rule to get \(h'(x)=g'(u)f'(x)=e^u(4x)=4xe^{2x^2}\)

Example 2:

Let \(h(x)=(2x-a)^2\)

We’ll set \(g(x)=x^2\) and \(f(x)=(2x-a)\), so that \(h(x)=g(f(x))\)

Then \(h'(x)=(g(f(x)))'=g'(f(x))f'(x)=2(2x-a)(2)=8x-4a\)

  • To get the more general case of \(a^x\), we can use the properties of the exponential and logarithm to write it as \(a^x=e^{x \ln (a)}\)
  • Next we use the chain rule: \(g=e^x\) and \(f=x \ln (a)\), so \(\frac{da^x}{dx}=(e^{x \ln (a)})(\ln (a))\)

This is the exponential rule.

6.2.3 Logarithms

\[ \frac{d \ln (x)}{dx}=\frac{1}{x} \]

  • What about the more general logarithm \(\log_a x\)?

This is the inverse function of \(a^x\), so \(a^{\log_a x}=x\)

\[ \frac{d \log_a (x)}{dx}=\frac{1}{x \ln (a)} \]

6.1.3 Products Rule

  • one cannot always multiply out before differentiating. In such cases, the product rule is needed. If we have two functions, f(x) and g(x), then the derivative of their product is:

\[\frac{d(f(x)g(x))}{dx}=\frac{df(x)}{dx}g(x)+f(x) \frac{dg(x)}{dx}\]

  • The product rule states that the derivative of the product is a sum of product terms. In each such term, one and only one of the constituent functions is differentiated.

Let \(f\) and \(g\) be differentiable functions, \((fg)'=f'g+fg'\)

Example:

\(y=f(x)g(x)=(2x+3)(x^2-15)\)

\[ \frac{dy}{dx}=\frac{d(2x+3)}{dx}(x^2-15)+(2x+3) \frac{d(x^2-15)}{dx} \]

\[ =(2)(x^2-15)+(2x+3)(2x) \]

\[ =(2x-30)+(4x^2+6x) \]

\[ 6x^2+6x-30 \]

Quotient rule for \(y=\frac{f(x)}{g(x)}\):

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

Example:

Let \(f(x)=(3x-7) \text{ and } g(x)=(x^3+6)\). We need to find \(\frac{d}{dx}(\frac{3x-7}{x^3+6})\).

\[ \frac{dy}{dx}=\frac{\frac{d(3x-7)}{dx}(x^3+6)-(3x-7) \frac{d(x^3+6)}{dx}}{(x^3+6)^2} \]

\[ =\frac{(x^3+6)(3)-(3x-7)(3x^2)}{36+12x^3+x^6} \]

\[ =\frac{(3x^3+18)-(9x^3-21x^2)}{36+12x^3+x^6} \]

\[ =\frac{-6x^3+21x^2+18}{36+12x^3+x^6} \]

6.2.4 Other Functions

  • The derivatives of trigonometric functions turn them into each other, so \((\sin (x))'=\cos(x), (\cos(x))'=- \sin(x)\)

Example:

\[ f(x)= \begin{cases} -(x-2)^2 : x\leq2 \\ \ln (x-2) : x > 2 \end{cases} \]

\[ f'(x)= \begin{cases} -2(x-2) : x < 2 \\ \frac{1}{x-2} : x > 2 \end{cases} \] The point \(x=2\) has no derivative, though it is defined for \(f(x)\).

6.3 WHAT THE RULES ARE, AND WHEN TO USE THEM

rules for differentiation

In all these cases, \(f\) and \(g\) are assumed to be differentiable functions, and a is a constant.

Sum rule \((f(x)+g(x))'=f'(x)+g'(x)\)
Difference rule (\(f(x)-g(x))'=f'(x)-g'(x)\)
Multiply by constant rule \(f'(ax)=af'(x)\)
Product rule \((f(x)g(x))'=f'(x)g(x)+f(x)g'(x)\)
Quotient rule \((\frac{f(x)}{g(x)})'=\frac{f'(x)g(x)-f(x)g'(x)}{(g(x))^2}\)
Chain rule \((g(f(x))'=g'(f(x))f'(x)\)
Inverse function rule \((f^{-1}(x))'=\frac{1}{f'(f^{-1}x)}\)
Constant rule \((a)'=0\)
Power rule \((x^n)'=nx^{n-1}\)
Exponential rule 1 \((e^x)'=e^x\)
Exponential rule 2 \((a^x)'=a^x(\ln(a))\)
Logarithm rule 1 \((\ln(x))'=\frac{1}{x}\)
Logarithm rule 2 \((\log_a(x))'=\frac{1}{x(\ln(a))}\)
Trigonometric rules \((\sin(x))'=\cos(x)\)
\((\cos(x))'=-\sin(x)\)
\((\tan(x))'=1+\tan^2(x)\)
Piecewise rules Treat each piece separately

6.4 EXERCISES

\[ y=\frac{(5 \ln(x+3))e^{3x^3-10x}}{5x^2+2} \]

\[ y'=\frac{f'g-fg'}{g^2}=\frac{(uv)'g-fg'}{g^2}=\frac{(u'v+uv')g-fg'}{g^2} \]

\[ y'=(5x^2+2)^{-2} \left[ \left( \frac{5e^{3x^3-10x}}{x+3}+5\ln(x+3)(9x^2-10)e^{3x^3-10x} \right) \\ \times (5x^2+2)-(5 \ln(x+3))e^{3x^3-10x}(10x) \right] \]

Problems

Problem 1

Find the derivative of \(y=f(x) \cdot g(x) = (13x+2x^3) \cdot (x^5-4x+r)\) with respect to \(x\), using the rules in this chapter.

Problem 2

Differentiate the following: \[y=(x^3+x+2)^2\]

Problem 3

Differentiate the following: \[ \left(\frac{x^2+1}{x+1}\right)^2 \]

Problem 4

Differentiate the following and try also expressing the derivative as a series: \[ f(x)=a_n x+ a_{n-1}x^{n-1}+ \ldots +a_0 \]

Problem 5

Differentiate the following: \[ f(x)=(x^3+2) \ln(x^4-5x+3) \]

Problem 6

Differentiate the following:

\[ f(x)=\frac{x^2-4}{x^5-x^3+x} \]

Problem 7

Differentiate the following: \[ f(x)=e^x-\ln(x)+5 \]

Problem 8

Differentiate the following: \[ f(x)=xg(x)-7x^2 \text{ where } g(x)=e^x\ln(x) \]

https://forms.gle/Uf3aQsEQPCiNX1EDA

Any Questions?

Home