M2 Study Notes: Chapter 7 - Differentiation

Hello everyone! Welcome to your study notes for Differentiation. This is one of the most powerful and exciting topics in calculus. Think of it as getting a special lens to see how things change in an instant.

Why is this important? Differentiation helps us find the speed of a moving object at a specific moment, figure out the best price to sell a product for maximum profit, and even model the spread of diseases. It's all about understanding the rate of change.

Don't worry if it seems tricky at first. We'll break everything down into simple, manageable steps. Let's get started!

1. The Heart of the Matter: The Derivative

So, What is a Derivative?

Imagine you're driving a car. Your average speed for a 2-hour trip is the total distance divided by 2 hours. But your instantaneous speed is what you see on the speedometer at any given second.

The derivative is like the car's speedometer. It tells us the instantaneous rate of change of a function at a very specific point.

From a graphical point of view, the derivative gives us the slope of the tangent line to a curve at a point. Remember, a tangent is a straight line that just "touches" the curve at one point without crossing it.

A diagram showing a curve with a tangent line at point P. The derivative at P is the slope of this tangent line.

Finding the Derivative from First Principles

This is the fundamental method to find a derivative, based on its definition. It's the "long way" of doing it, but it's crucial for understanding what's really happening. We find the slope of a line between two very, very close points on the curve.

The formula looks a bit scary, but the idea is simple.

The derivative of a function $$f(x)$$, denoted as $$f'(x)$$, is: $$ f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} $$ Breaking it down:

  • $$h$$ is a tiny, tiny change in the x-value.
  • $$f(x+h) - f(x)$$ is the tiny change in the y-value.
  • The whole fraction is just rise/run, which is the slope of the line connecting the two points.
  • $$ \lim_{h \to 0} $$ means we are making the change in x (the value of h) incredibly small, almost zero, to find the slope at a single point.

Step-by-Step Example: Find the derivative of $$f(x) = x^2$$ from first principles.

  1. Write down the formula:
    $$ f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} $$
  2. Substitute your function into the formula:
    Since $$f(x) = x^2$$, then $$f(x+h) = (x+h)^2$$.
    $$ f'(x) = \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h} $$
  3. Expand and simplify the numerator:
    $$ (x+h)^2 = x^2 + 2xh + h^2 $$
    $$ f'(x) = \lim_{h \to 0} \frac{(x^2 + 2xh + h^2) - x^2}{h} $$
    $$ f'(x) = \lim_{h \to 0} \frac{2xh + h^2}{h} $$
  4. Factor out h from the numerator and cancel:
    $$ f'(x) = \lim_{h \to 0} \frac{h(2x + h)}{h} $$
    $$ f'(x) = \lim_{h \to 0} (2x + h) $$
  5. Now, let h go to 0:
    $$ f'(x) = 2x + 0 $$
    $$ f'(x) = 2x $$

So, the derivative of $$x^2$$ is $$2x$$. You might be asked to do this for functions like $$C$$ (a constant), $$x^n$$ (where n is a positive integer), $$\sqrt{x}$$, $$\sin x$$, $$\cos x$$, $$e^x$$, and $$\ln x$$. The process is the same!

Notation, Notation, Notation!

You'll see the derivative written in a few different ways. They all mean the same thing! If $$y = f(x)$$:

  • Lagrange's Notation: $$f'(x)$$ or $$y'$$ (Read as "f prime of x" or "y prime"). This is clean and simple.
  • Leibniz's Notation: $$\frac{dy}{dx}$$ (Read as "dee y by dee x"). This one is very descriptive. It literally looks like "change in y / change in x". The $$\frac{d}{dx}$$ part means "the derivative with respect to x of...".
Key Takeaway for Section 1

The derivative is the instantaneous rate of change of a function, or the slope of its tangent line. We can find it from the ground up using the method of first principles.


2. The Differentiation Toolbox: Essential Rules

Using first principles every time would be very slow. Luckily, we have a set of rules that work like shortcuts. Let's build our toolbox!

The Basic Rules

These are your bread and butter. You'll use them all the time.

  • The Constant Rule: The derivative of any constant is zero.
    $$ \frac{d}{dx}(C) = 0 $$ Analogy: If a car is parked (constant position), its speed (rate of change) is 0.

  • The Power Rule: This is a super important one! For any real number n:
    $$ \frac{d}{dx}(x^n) = nx^{n-1} $$ Memory Aid: "Bring the power down to the front, then reduce the power by one."
    Example: $$\frac{d}{dx}(x^5) = 5x^{5-1} = 5x^4$$
    Example: $$\frac{d}{dx}(\sqrt{x}) = \frac{d}{dx}(x^{1/2}) = \frac{1}{2}x^{1/2 - 1} = \frac{1}{2}x^{-1/2} = \frac{1}{2\sqrt{x}}$$

  • The Constant Multiple Rule: Constants in front of a function just stay there.
    $$ \frac{d}{dx}(c \cdot f(x)) = c \cdot f'(x) $$ Example: $$\frac{d}{dx}(7x^3) = 7 \cdot \frac{d}{dx}(x^3) = 7 \cdot (3x^2) = 21x^2$$

  • The Sum/Difference Rule: You can differentiate a function term by term.
    $$ \frac{d}{dx}[f(x) \pm g(x)] = f'(x) \pm g'(x) $$ Example: $$\frac{d}{dx}(x^2 + 5x - 3) = \frac{d}{dx}(x^2) + \frac{d}{dx}(5x) - \frac{d}{dx}(3) = 2x + 5 - 0 = 2x+5$$
The Product Rule

Use this rule when you are differentiating two functions that are multiplied together. Let the two functions be $$u$$ and $$v$$.
$$ \frac{d}{dx}(uv) = u \frac{dv}{dx} + v \frac{du}{dx} \quad \text{or} \quad (uv)' = u'v + uv' $$ Memory Aid: "First times derivative of the second, plus second times derivative of the first."

Common Mistake: You CANNOT just multiply the derivatives. $$(uv)' \neq u'v'$$. This is a very common error, so watch out!

Example: Find the derivative of $$y = x^2 \sin x$$
Let $$u = x^2$$ and $$v = \sin x$$.
Then $$u' = 2x$$ and $$v' = \cos x$$.
Using the rule: $$\frac{dy}{dx} = (x^2)(\cos x) + (\sin x)(2x) = x^2\cos x + 2x\sin x$$

The Quotient Rule

Use this rule when you are differentiating one function divided by another. Let the top function be $$u$$ and the bottom be $$v$$.
$$ \frac{d}{dx}\left(\frac{u}{v}\right) = \frac{v \frac{du}{dx} - u \frac{dv}{dx}}{v^2} \quad \text{or} \quad \left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2} $$ Mnemonic: This is a life-saver! Remember this rhyme:
"Low D-high, minus high D-low, square the bottom and away we go!"
(Here, "low" is $$v$$, "high" is $$u$$, and "D" means "the derivative of").

Common Mistake: The order in the numerator matters because of the minus sign! It must be $$v u'$$ first.

Example: Find the derivative of $$y = \frac{e^x}{x^3}$$
Let $$u = e^x$$ (high) and $$v = x^3$$ (low).
Then $$u' = e^x$$ and $$v' = 3x^2$$.
Using the rule: $$\frac{dy}{dx} = \frac{(x^3)(e^x) - (e^x)(3x^2)}{(x^3)^2} = \frac{x^3e^x - 3x^2e^x}{x^6} = \frac{x^2e^x(x-3)}{x^6} = \frac{e^x(x-3)}{x^4}$$

The Chain Rule (The Most Important Rule!)

Use this for a function inside another function (a composite function).
Analogy: Think of Russian nesting dolls. To get to the innermost doll, you must open the outer ones first. The Chain Rule works the same way.
The rule is:
$$ \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} $$ In simple steps:

  1. Identify the "outer" function and the "inner" function ($$u$$).
  2. Differentiate the outer function, leaving the inner function unchanged inside it.
  3. Multiply your result by the derivative of the inner function.

Example 1: Find the derivative of $$y = (x^2 + 5)^4$$
Outer function: $$u^4$$. Inner function: $$u = x^2 + 5$$.
1. Differentiate outer: $$4( \quad )^3$$ becomes $$4(x^2+5)^3$$
2. Derivative of inner ($$x^2+5$$) is $$2x$$.
3. Multiply them: $$\frac{dy}{dx} = 4(x^2+5)^3 \cdot (2x) = 8x(x^2+5)^3$$

Example 2: Find the derivative of $$y = \cos(3x+1)$$
Outer function: $$\cos(u)$$. Inner function: $$u = 3x+1$$.
1. Differentiate outer: $$-\sin(u)$$ becomes $$-\sin(3x+1)$$
2. Derivative of inner ($$3x+1$$) is $$3$$.
3. Multiply them: $$\frac{dy}{dx} = -\sin(3x+1) \cdot (3) = -3\sin(3x+1)$$

Key Takeaway for Section 2

Memorise the rules! Power Rule for $$x^n$$, Product Rule for $$u \cdot v$$, Quotient Rule for $$u/v$$, and Chain Rule for a function-inside-a-function. Practice will make these second nature.


3. Derivatives of Standard Functions

Here is a quick reference table for the derivatives of the standard functions you need to know. Combined with the rules from Section 2, you can differentiate almost anything!

Trigonometric Functions
  • $$ \frac{d}{dx}(\sin x) = \cos x $$
  • $$ \frac{d}{dx}(\cos x) = -\sin x $$ (Memory tip: the derivatives of "co-" functions often have a negative sign).
  • $$ \frac{d}{dx}(\tan x) = \sec^2 x $$
Exponential and Logarithmic Functions
  • $$ \frac{d}{dx}(e^x) = e^x $$ (Did you know? The function $$e^x$$ is its own derivative! This is what makes the number $$e \approx 2.718$$ so special in calculus.)
  • $$ \frac{d}{dx}(\ln x) = \frac{1}{x} $$
Quick Review Box

Function ($$f(x)$$)     Derivative ($$f'(x)$$)
--------------------------------------------------
$$C$$ (constant)              $$0$$
$$x^n$$                            $$nx^{n-1}$$
$$\sin x$$                       $$\cos x$$
$$\cos x$$                       $$-\sin x$$
$$\tan x$$                       $$\sec^2 x$$
$$e^x$$                           $$e^x$$
$$\ln x$$                          $$\frac{1}{x}$$


4. Advanced Techniques

Implicit Differentiation

Sometimes, an equation isn't written nicely as $$y = ...$$. For example, the equation of a circle: $$x^2 + y^2 = 25$$. It's difficult or impossible to solve for y. This is where implicit differentiation comes in.

The key idea: We differentiate both sides of the equation with respect to $$x$$. When we have to differentiate a term containing $$y$$, we use the Chain Rule and multiply by $$\frac{dy}{dx}$$.

Step-by-Step Example: Find $$\frac{dy}{dx}$$ for $$x^2 + y^2 = 25$$.

  1. Differentiate both sides with respect to x:
    $$ \frac{d}{dx}(x^2 + y^2) = \frac{d}{dx}(25) $$
  2. Differentiate term by term. Remember the Chain Rule for $$y^2$$!
    $$ \frac{d}{dx}(x^2) \rightarrow 2x $$
    $$ \frac{d}{dx}(y^2) \rightarrow 2y \cdot \frac{dy}{dx} \quad \text{(Outer: } u^2 \rightarrow 2u, \text{ Inner: } y \rightarrow \frac{dy}{dx}\text{)} $$
    $$ \frac{d}{dx}(25) \rightarrow 0 $$
    So, our equation becomes: $$ 2x + 2y\frac{dy}{dx} = 0 $$
  3. Now, just solve for $$\frac{dy}{dx}$$:
    $$ 2y\frac{dy}{dx} = -2x $$
    $$ \frac{dy}{dx} = \frac{-2x}{2y} = -\frac{x}{y} $$
Logarithmic Differentiation

This is a clever trick for differentiating very messy functions, especially those with lots of multiplication, division, and powers combined.

Step-by-Step Example: Find $$\frac{dy}{dx}$$ for $$y = \frac{(x+1)^3 \sqrt{x}}{ (2x-1)^5 }$$

  1. Take the natural logarithm (ln) of both sides:
    $$ \ln(y) = \ln\left( \frac{(x+1)^3 \sqrt{x}}{ (2x-1)^5 } \right) $$
  2. Use log rules to expand and simplify the right side.
    Remember: $$\ln(ab) = \ln a + \ln b$$, $$\ln(a/b) = \ln a - \ln b$$, and $$\ln(a^n) = n \ln a$$.
    $$ \ln(y) = \ln((x+1)^3) + \ln(\sqrt{x}) - \ln((2x-1)^5) $$
    $$ \ln(y) = 3\ln(x+1) + \frac{1}{2}\ln(x) - 5\ln(2x-1) $$ Look how much simpler that is!
  3. Now, differentiate both sides implicitly with respect to x:
    $$ \frac{d}{dx}(\ln y) = \frac{d}{dx}\left(3\ln(x+1) + \frac{1}{2}\ln(x) - 5\ln(2x-1)\right) $$
    The left side becomes $$\frac{1}{y}\frac{dy}{dx}$$. Differentiate the right side term by term.
    $$ \frac{1}{y}\frac{dy}{dx} = 3\left(\frac{1}{x+1}\right) + \frac{1}{2}\left(\frac{1}{x}\right) - 5\left(\frac{1}{2x-1} \cdot 2\right) \quad \text{(Don't forget the chain rule on the last term!)} $$
    $$ \frac{1}{y}\frac{dy}{dx} = \frac{3}{x+1} + \frac{1}{2x} - \frac{10}{2x-1} $$
  4. Solve for $$\frac{dy}{dx}$$ by multiplying both sides by $$y$$:
    $$ \frac{dy}{dx} = y \left( \frac{3}{x+1} + \frac{1}{2x} - \frac{10}{2x-1} \right) $$
    Finally, substitute the original expression for y back in.
    $$ \frac{dy}{dx} = \frac{(x+1)^3 \sqrt{x}}{ (2x-1)^5 } \left( \frac{3}{x+1} + \frac{1}{2x} - \frac{10}{2x-1} \right) $$

Yes, the final answer looks huge, but the process of getting there was much easier than using the product and quotient rules repeatedly!


5. The Second Derivative

What is it?

The second derivative is simply the derivative of the first derivative. You just differentiate twice!

Analogy: If the original function is your position, then the first derivative ($$f'(x)$$) is your velocity, and the second derivative ($$f''(x)$$) is your acceleration (the rate of change of velocity).

Notation:

  • $$f''(x)$$ (Read as "f double prime of x")
  • $$y''$$ (Read as "y double prime")
  • $$\frac{d^2y}{dx^2}$$ (Read as "d squared y by d x squared". It means $$\frac{d}{dx}\left(\frac{dy}{dx}\right)$$).
How to Find It

It's a two-step process. Find the first derivative, then differentiate your result again.

Example: Find the second derivative of $$f(x) = x^4 - 5x^2 + 8$$
Step 1: Find the first derivative.
$$ f'(x) = 4x^3 - 10x $$
Step 2: Differentiate the first derivative.
$$ f''(x) = \frac{d}{dx}(4x^3 - 10x) = 12x^2 - 10 $$ That's it!

What's it For? (A Sneak Peek at Applications)

The second derivative gives us important information about the shape of a graph.

  • Concavity: It tells us if the graph is bending upwards or downwards.
    • If $$f''(x) > 0$$, the graph is concave up (like a smiling face).
    • If $$f''(x) < 0$$, the graph is concave down (like a frowning face).
  • The Second Derivative Test: This is a method to check if a point where the slope is zero ($$f'(x)=0$$) is a local maximum or minimum.
    • If $$f'(c)=0$$ and $$f''(c) < 0$$ (concave down), then you have a local maximum at $$x=c$$.
    • If $$f'(c)=0$$ and $$f''(c) > 0$$ (concave up), then you have a local minimum at $$x=c$$.
Key Takeaway for Section 5

The second derivative is the derivative of the derivative ($$f''(x)$$). It measures the rate of change of the slope. We use it to determine a graph's concavity and to test for local maximums and minimums.

Great job getting through all that! Differentiation is a huge topic, but it's built on a few key ideas and rules. The more you practice, the easier it will become. Keep up the excellent work!