There is a traditional method to differentiate functions, however, we will be concentrating on finding the gradient still through differentiation but from first principles. This means using standard Straight Line Graphs methods of \(\frac{\Delta y}{\Delta x}\) to find the gradient of a function.
How does differentiation from first principles work?
Differentiation from first principles involves using \(\frac{\Delta y}{\Delta x}\) to calculate the gradient of a function. We will have a closer look to the step-by-step process below:
STEP 1: Let \(y = f(x)\) be a function. Pick two points x and \(x+h\).
The coordinates of x will be \((x, f(x))\) and the coordinates of \(x+h\) will be (\(x+h, f(x + h)\)).
STEP 2: Find \(\Delta y\) and \(\Delta x\).
\(\Delta y = f(x+h) - f(x); \Delta x = x+h-x = h\)STEP 3: Complete \(\frac{\Delta y}{\Delta x}\).$$\frac{\Delta y}{\Delta x} = \frac{f(x+h) - f(x)}{h}$$STEP 4: Take a limit:
\[f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}\].
The formula for differentiation from first principles
The formula below is often found in the formula booklets that are given to students to learn differentiation from first principles:
\[f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}\]
Derivative of sin(x) using first principles
To find out the derivative of sin(x) using first principles, we need to use the formula for first principles we saw above:
\[f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}\]
Here we will substitute f(x) with our function, sin(x):
\[f'(x) = \lim_{h\to 0} \frac{\sin(x+h) - \sin (x)}{h}\]
For the next step, we need to remember the trigonometric identity: \(\sin(a + b) = \sin a \cos b + \sin b \cos a\)
Using the trigonometric identity, we can come up with the following formula, equivalent to the one above:
\[f'(x) = \lim_{h\to 0} \frac{(\sin x \cos h + \sin h \cos x) - \sin x}{h}\]
We can now factor out the \(\sin x\) term:
\[\begin{align} f'(x) &= \lim_{h\to 0} \frac{\sin x(\cos h -1) + \sin h\cos x}{h} \\ &= \lim_{h \to 0}(\frac{\sin x (\cos h -1)}{h} + \frac{\sin h \cos x}{h}) \\ &= \lim_{h \to 0} \frac{\sin x (\cos h - 1)}{h} + lim_{h \to 0} \frac{\sin h \cos x}{h} \\ &=(\sin x) \lim_{h \to 0} \frac{\cos h - 1}{h} + (\cos x) \lim_{h \to 0} \frac{\sin h}{h} \end{align} \]
here we need to use some standard limits: \(\lim_{h \to 0} \frac{\sin h}{h} = 1\), and \(\lim_{h \to 0} \frac{\cos h - 1}{h} = 0\).
Using these, we get to:
\[f'(x) = 0 + (\cos x) (1) = \cos x\]
And so:
\[\frac{d}{dx} \sin x = \cos x\]
Derivative of cos(x) using first principles
To find out the derivative of cos(x) using first principles, we need to use the formula for first principles we saw above:
\[f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}\]
Here we will substitute f(x) with our function, cos(x):
\[f'(x) = \lim_{h\to 0} \frac{\cos(x+h) - \cos (x)}{h}\]
For the next step, we need to remember the trigonometric identity: \(cos(a +b) = \cos a \cdot \cos b - \sin a \cdot \sin b\).
Using the trigonometric identity, we can come up with the following formula, equivalent to the one above:
\[f'(x) = \lim_{h\to 0} \frac{(\cos x\cdot \cos h - \sin x \cdot \sin h) - \cos x}{h}\]
We can now factor out the \(\cos x\) term:
\[f'(x) = \lim_{h\to 0} \frac{\cos x(\cos h - 1) - \sin x \cdot \sin h}{h} = \lim_{h\to 0} \frac{\cos x(\cos h - 1)}{h} - \frac{\sin x \cdot \sin h}{h}\].
Now we need to change factors in the equation above to simplify the limit later. For this, you'll need to recognise formulas that you can easily resolve.
The equations that will be useful here are: \(\lim_{x \to 0} \frac{\sin x}{x} = 1; and \lim_{x_to 0} \frac{\cos x - 1}{x} = 0\)
If we substitute the equations in the hint above, we get:
\[\lim_{h\to 0} \frac{\cos x(\cos h - 1)}{h} - \frac{\sin x \cdot \sin h}{h} \rightarrow \lim_{h \to 0} \cos x (\frac{\cos h -1 }{h}) - \sin x (\frac{\sin h}{h}) \rightarrow \lim_{h \to 0} \cos x(0) - \sin x (1)\]
Finally, we can get to:
\[\lim_{h \to 0} \cos x(0) - \sin x (1) = \lim_{h \to 0} (-\sin x)\]
Since there are no more h variables in the equation above, we can drop the \(\lim_{h \to 0}\), and with that we get the final equation of:
\[\frac{d}{dx} (\cos x) = -\sin x\]
Worked examples of differentiation from first principles
Let's look at two examples, one easy and one a little more difficult.
Differentiate from first principles \(y = f(x) = x^3\).
SOLUTION:
Steps | Worked out example |
STEP 1: Let \(y = f(x)\) be a function. Pick two points x and x + h. | Coordinates are \((x, x^3)\) and \((x+h, (x+h)^3)\). We can simplify \((x+h)^3 = x^3 + 3x^2 h+3h^2x+ h^3\) |
STEP 2: Find \(\Delta y\) and \(\Delta x\). | \(\Delta y = (x+h)^3 - x = x^3 + 3x^2h + 3h^2x+h^3 - x^3 = 3x^2h + 3h^2x + h^3; \\ \Delta x = x+ h- x = h\) |
STEP 3:Complete \(\frac{\Delta y}{\Delta x}\) | \(\frac{\Delta y}{\Delta x} = \frac{3x^2h+3h^2x+h^3}{h} = 3x^2 + 3hx+h^2\) |
STEP 4: Take a limit. | \(f'(x) = \lim_{h \to 0} 3x^2 + 3h^2x + h^2 = 3x^2\) |
ANSWER | \(3x^2\) however the entire proof is a differentiation from first principles. |
So differentiation can be seen as taking a limit of a gradient between two points of a function. You will see that these final answers are the same as taking derivatives.
Let's look at another example to try and really understand the concept. This time we are using an exponential function.
Differentiate from first principles \(f(x) = e^x\).
SOLUTION:
Steps | Worked out example |
STEP 1: Let y = f(x) be a function. Pick two points x and x + h. | Co-ordinates are \((x, e^x)\) and \((x+h, e^{x+h})\). |
STEP 2: Find \(\Delta y\) and \(\Delta x\) | \(\Delta y = e^{x+h} -e^x = e^xe^h-e^x = e^x(e^h-1)\)\(\Delta x = (x+h) - x= h\) |
STEP 3:Complete \(\frac{\Delta y}{\Delta x}\) | \(\frac{\Delta y}{\Delta x} = \frac{e^x(e^h-1)}{h}\) |
STEP 4: Take a limit. | \(f'(x) = \lim_{h \to 0} \frac{e^x(e^h-1)}{h} = e^x(1) = e^x\)Because \(\lim_{h \to 0} \frac{(e^h-1)}{h} = 1\) |
ANSWER | \(e^x\), but of course, the entire proof is an answer as this is differentiation from first principles. |
Differentiation from First Principles - Key takeaways
- Differentiation is the process of finding the gradient of a curve.
- The gradient of a curve changes at all points.
- Differentiation can be treated as a limit tending to zero.
- The formula to differentiate from first principles is found in the formula booklet and is \(f'(x) = \lim_{h \to 0}\frac{f(x+h)-f(x)}{h}\)
How we ensure our content is accurate and trustworthy?
At StudySmarter, we have created a learning platform that serves millions of students. Meet
the people who work hard to deliver fact based content as well as making sure it is verified.
Content Creation Process:
Lily Hulatt is a Digital Content Specialist with over three years of experience in content strategy and curriculum design. She gained her PhD in English Literature from Durham University in 2022, taught in Durham University’s English Studies Department, and has contributed to a number of publications. Lily specialises in English Literature, English Language, History, and Philosophy.
Get to know Lily
Content Quality Monitored by:
Gabriel Freitas is an AI Engineer with a solid experience in software development, machine learning algorithms, and generative AI, including large language models’ (LLMs) applications. Graduated in Electrical Engineering at the University of São Paulo, he is currently pursuing an MSc in Computer Engineering at the University of Campinas, specializing in machine learning topics. Gabriel has a strong background in software engineering and has worked on projects involving computer vision, embedded AI, and LLM applications.
Get to know Gabriel