Chapter 3 & 4: Differentiation of a Function

Welcome to the World of Differentiation!

Hello! Ready to dive into one of the most powerful ideas in mathematics? This chapter is all about differentiation. Don't let the big name scare you! At its heart, differentiation is simply the process of finding a rate of change.

Ever wondered...
- How to find the exact speed of a car at a single instant, not just its average speed?
- How a company can find the point where its profit is at a maximum?
- What the steepest point on a rollercoaster track is?

Differentiation helps us answer all these questions and more! It's the tool that lets us analyse how things change from one moment to the next. Let's start with the building block of differentiation: the concept of a limit.


Part 1: The Idea of a Limit - Getting Infinitely Close

What is a Limit?

Imagine you are walking towards a wall. You take steps that cover half the remaining distance each time. You get closer and closer, infinitely closer, but you never technically touch it. The position of the wall is your limit.

In maths, a limit is the value that a function "approaches" as the input (usually x) gets closer and closer to some number.

We write it like this: $$ \lim_{x \to c} f(x) = L $$ This is read as: "The limit of the function f(x) as x approaches c is L."

Finding Limits (The Easy Way)

For most functions you'll see in M1, finding the limit is super easy: just substitute the value that x is approaching into the function.

Example 1: Find $$ \lim_{x \to 3} (2x^2 - 5) $$
Just plug in x = 3: $$ 2(3)^2 - 5 = 2(9) - 5 = 18 - 5 = 13 $$ So, the limit is 13. Simple!

Example 2: What about fractions? Find $$ \lim_{x \to 1} \frac{x+1}{x+3} $$
Again, just plug in x = 1: $$ \frac{1+1}{1+3} = \frac{2}{4} = \frac{1}{2} $$

Watch out! Sometimes, plugging in gives you $$ \frac{0}{0} $$, which is undefined. This is a sign that you might need to simplify first!

Example 3: Find $$ \lim_{x \to 2} \frac{x^2 - 4}{x - 2} $$
If we plug in x = 2, we get $$ \frac{2^2 - 4}{2 - 2} = \frac{0}{0} $$. No good!
Let's try to factorise the numerator: $$ x^2 - 4 = (x-2)(x+2) $$
So, our limit becomes: $$ \lim_{x \to 2} \frac{(x-2)(x+2)}{x - 2} $$
We can cancel the $$ (x-2) $$ terms: $$ \lim_{x \to 2} (x+2) $$
Now, we can plug in x = 2: $$ 2 + 2 = 4 $$. The limit is 4!

Key Takeaway for Limits

A limit is the value a function gets closer to. To find it, first try to substitute the value of x. If you get $$ \frac{0}{0} $$, try to simplify the expression (e.g., by factorising) and then substitute again.


Part 2: The Derivative - Unveiling the Slope

What is a Derivative? (The Big Idea)

The derivative of a function at a certain point gives us the slope of the tangent line at that exact point. A tangent is a straight line that just "touches" a curve at one point.

Think of it like this:
- Average speed is the slope of a line connecting two points in time on your journey.
- Instantaneous speed (your speed at one exact moment) is the slope of the tangent line at that single point in time.

The derivative gives us this instantaneous rate of change.

Derivative Notation - The Different Names

Finding a derivative is called "differentiating". There are a few ways to write "the derivative of a function y = f(x)":

  • $$ f'(x) $$ (read as "f prime of x")
  • $$ \frac{dy}{dx} $$ (read as "dee y by dee x")
  • $$ y' $$ (read as "y prime")

They all mean the exact same thing!

The Derivative as the Slope of a Tangent

This is the most important concept. If you have a curve $$ y = f(x) $$, its derivative $$ f'(x) $$ is a new function that tells you the slope at any value of x.

To find the slope at a specific point, say $$ x = x_0 $$, we calculate the derivative and then substitute $$ x_0 $$ into it. We write this as: $$ f'(x_0) \quad \text{or} \quad \frac{dy}{dx} \bigg|_{x=x_0} $$

For example, if we find that the derivative of $$ f(x) = x^2 $$ is $$ f'(x) = 2x $$, then the slope of the tangent to the curve at x=3 is $$ f'(3) = 2(3) = 6 $$.

Important HKDSE Note: The formal definition of a derivative uses limits, called the 'first principles' definition. You might see this formula: $$ f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} $$. You need to recognise that this formula represents the derivative. However, you will NOT be asked to use it to calculate derivatives in the exam. We have much easier rules for that, which are coming up next!

Key Takeaway for The Derivative Concept

The derivative is a function that gives you the slope of the tangent line to a curve at any point. It represents the instantaneous rate of change.


Part 3: The Rules of Differentiation - Your Calculus Toolkit

Don't worry, you don't need to use that scary limit formula! We have a set of simple rules to find derivatives. Let's build our toolkit.

Rule 1: The Constant Rule

The derivative of any constant number is zero.

$$ \frac{d}{dx}(C) = 0 \quad (\text{where C is any constant}) $$

Analogy: The graph of y = 5 is a flat, horizontal line. What's its slope? Zero! Always.
Examples: $$ \frac{d}{dx}(7) = 0 $$, $$ \frac{d}{dx}(-100) = 0 $$

Rule 2: The Power Rule (Your Best Friend!)

This is the most common rule you'll use. To differentiate $$ x^n $$:

$$ \frac{d}{dx}(x^n) = nx^{n-1} $$

Memory Aid: "Bring the power down to the front, then subtract one from the power."

Example 1: $$ f(x) = x^4 $$
$$ f'(x) = 4x^{4-1} = 4x^3 $$

Example 2 (with roots and fractions): Differentiate $$ y = \sqrt{x} $$
First, rewrite the root as a power: $$ y = x^{1/2} $$
Now use the power rule: $$ \frac{dy}{dx} = \frac{1}{2}x^{\frac{1}{2}-1} = \frac{1}{2}x^{-1/2} = \frac{1}{2\sqrt{x}} $$

Rule 3: The Sum/Difference Rule

To differentiate functions added or subtracted together, just differentiate each part separately.

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

Example: Find the derivative of $$ y = x^3 + 5x^2 - 7x + 2 $$
Differentiate term by term:
$$ \frac{dy}{dx} = \frac{d}{dx}(x^3) + \frac{d}{dx}(5x^2) - \frac{d}{dx}(7x) + \frac{d}{dx}(2) $$ $$ \frac{dy}{dx} = 3x^2 + 5(2x) - 7(1) + 0 $$ $$ \frac{dy}{dx} = 3x^2 + 10x - 7 $$

Rule 4: The Product Rule (Be Careful!)

Used when you have two functions multiplied together, like $$ f(x) \cdot g(x) $$. Let's call them 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: "The first times the derivative of the second, plus the second times the derivative of the first."

Common Mistake Alert! The derivative of a product is NOT the product of the derivatives! $$ (uv)' \neq u'v' $$.

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

Rule 5: The Quotient Rule (The Tricky One)

Used when you have one function divided by another. Let's call them u (top) and v (bottom).

$$ \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} $$

Memory Aid: A popular one is "Lo-D-Hi minus Hi-D-Lo, over Lo-Lo". (Lo = bottom function, Hi = top function, D = derivative).

Common Mistake Alert! The order in the numerator matters because of the minus sign! Make sure it's $$ v u' $$ first.

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

Rule 6: The Chain Rule (Functions Inside Functions)

Used for composite functions, like a function nested inside another. Think of a Russian nesting doll.

If $$ y = f(g(x)) $$, its derivative is: $$ \frac{dy}{dx} = f'(g(x)) \cdot g'(x) $$

Step-by-step method:

  1. Differentiate the outer function, leaving the inner function untouched.
  2. Multiply your result by the derivative of the inner function.

Example: Find the derivative of $$ y = (x^2+5)^3 $$
The outer function is something cubed: $$ (\text{...})^3 $$.
The inner function is $$ x^2+5 $$.
1. Differentiate the outer part (using Power Rule): $$ 3(\text{...})^2 $$ becomes $$ 3(x^2+5)^2 $$.
2. The derivative of the inner part ($$ x^2+5 $$) is $$ 2x $$.
3. Multiply them together: $$ \frac{dy}{dx} = 3(x^2+5)^2 \cdot (2x) = 6x(x^2+5)^2 $$

Key Takeaway for Differentiation Rules

This toolkit is your key to success.
- Power Rule: $$ (x^n)' = nx^{n-1} $$
- Product Rule: $$ (uv)' = u'v + uv' $$
- Quotient Rule: $$ (u/v)' = (u'v - uv')/v^2 $$
- Chain Rule: Differentiate the outside, then multiply by the derivative of the inside.


Part 4: Differentiating Exponential & Logarithmic Functions

Some special functions have very neat derivatives. You need to memorise these!

The Easiest Derivative: $$ e^x $$

The function $$ e^x $$ is its own derivative. That's it!

$$ \frac{d}{dx}(e^x) = e^x $$

Did you know? The number e (approx 2.718) is special because the function $$ y = e^x $$ has a slope that is equal to its y-value at every single point! This is why it's fundamental in modelling growth and decay.

The Natural Logarithm: $$ \ln x $$

The derivative of the natural logarithm is $$ 1/x $$.

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

Other Bases: $$ a^x $$ and $$ \log_a x $$

What if the base isn't e? These are just slight variations.

$$ \frac{d}{dx}(a^x) = a^x \ln a $$ (Notice if a=e, ln(e)=1, so you just get $$ e^x $$ back)

$$ \frac{d}{dx}(\log_a x) = \frac{1}{x \ln a} $$ (Notice if a=e, ln(e)=1, so you just get $$ 1/x $$ back)

Combining with the Chain Rule

Very often, you'll need to use the chain rule with these functions.

Example 1: Differentiate $$ y = e^{5x} $$
Outer function: $$ e^{(\text{...})} $$. Inner function: $$ 5x $$.
Derivative of outer: $$ e^{5x} $$.
Derivative of inner: 5.
Result: $$ \frac{dy}{dx} = e^{5x} \cdot 5 = 5e^{5x} $$

Example 2: Differentiate $$ y = \ln(x^2+1) $$
Outer function: $$ \ln(\text{...}) $$. Inner function: $$ x^2+1 $$.
Derivative of outer: $$ \frac{1}{\text{...}} $$ which is $$ \frac{1}{x^2+1} $$.
Derivative of inner: $$ 2x $$.
Result: $$ \frac{dy}{dx} = \frac{1}{x^2+1} \cdot 2x = \frac{2x}{x^2+1} $$

Key Takeaway for Special Functions

Memorise these four essential formulas:

1. $$ \frac{d}{dx}(e^x) = e^x $$
2. $$ \frac{d}{dx}(\ln x) = \frac{1}{x} $$
3. $$ \frac{d}{dx}(a^x) = a^x \ln a $$
4. $$ \frac{d}{dx}(\log_a x) = \frac{1}{x \ln a} $$


Part 5: Differentiating Again - The Second Derivative

What is the Second Derivative?

The second derivative is exactly what it sounds like: it's the derivative of the first derivative. You just differentiate twice!

Analogy:
- If $$ f(x) $$ is your position...
- Then $$ f'(x) $$ is your velocity (rate of change of position).
- And $$ f''(x) $$ is your acceleration (rate of change of velocity).

In M1, we use the second derivative to learn more about the shape of a graph (like concavity), which you'll see in later applications.

Notations for the Second Derivative

Just like the first derivative, there are a few ways to write the second derivative:

  • $$ f''(x) $$ (read as "f double-prime of x")
  • $$ y'' $$ (read as "y double-prime")
  • $$ \frac{d^2y}{dx^2} $$ (read as "dee two y by dee x squared")

How to Find It

This is a simple two-step process:

  1. Find the first derivative, $$ f'(x) $$.
  2. Now, differentiate your result, $$ f'(x) $$, to get the second derivative, $$ f''(x) $$.

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

HKDSE Focus: You only need to know how to find the first and second derivatives. Third and higher-order derivatives are not in the syllabus. So you can stop at two!

Key Takeaway for the Second Derivative

The second derivative is the "derivative of the derivative". To find it, just apply your differentiation rules twice. It gives us deeper information about a function, like its acceleration or curvature.