Derivative Notes
These Derivative Notes explain how to differentiate a function, with the working shown line by line. The method first works out which rule the function is built from, because a sum, a product, a quotient and a composition each need a different move, and only then does it apply that rule the way the dedicated rule calculators on this site do. Nested pieces are differentiated inside their own steps. Following the same pattern every time makes it clear why a rule was chosen, not just what it produced.
Step-by-step method
- Set up the problem.
- Identify the main rule that applies.
- Work through the steps of that rule.
- Simplify and write the final derivative.
Formula: Constant Rule
The derivative of a number on its own is 0, because a constant never changes.
Formula: Variable Rule
The derivative of x with respect to x is 1, because x goes up at the same rate as itself.
Formula: Power Rule
This rule differentiates x raised to a power n. Bring the power down in front, then take 1 off the power.
Formula: Constant Multiple Rule
A number multiplying a function stays in front, and only the function is differentiated.
Formula: Sum Rule
The derivative of a sum is the sum of the derivatives, so each term is differentiated on its own and the results are added.
Formula: Difference Rule
The derivative of a difference is the difference of the derivatives, so each term is differentiated on its own and the results are subtracted.
Formula: Product Rule
This rule differentiates two functions multiplied together. Take the derivative of the first times the second, then add the first times the derivative of the second.
Formula: Quotient Rule
This rule differentiates one function divided by another. Take the bottom times the derivative of the top, subtract the top times the derivative of the bottom, then divide by the bottom squared.
Formula: Chain Rule
This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.
Formula: Derivative of ln(x)
The derivative of the natural logarithm of x is 1 over x.
Formula: Derivative of e to the x
The function e to the x is its own derivative.
Formula: Derivative of a to the x
For any positive base a, the derivative of a to the x is a to the x times the natural logarithm of a.
Formula: Derivative of sin(x)
The derivative of sin(x) is cos(x).
Formula: Derivative of cos(x)
The derivative of cos(x) is minus sin(x).
Formula: Derivative of tan(x)
The derivative of tan(x) is sec squared of x.
Formula: Derivative of sec(x)
The derivative of sec(x) is tan(x) times sec(x).
Formula: Derivative of csc(x)
The derivative of csc(x) is minus cot(x) times csc(x).
Formula: Derivative of cot(x)
The derivative of cot(x) is minus csc squared of x.
Formula: Derivative of sinh(x)
The derivative of sinh(x) is cosh(x).
Formula: Derivative of cosh(x)
The derivative of cosh(x) is sinh(x), with no minus sign.
Formula: Derivative of tanh(x)
The derivative of tanh(x) is sech squared of x.
Formula: Derivative of arcsin(x)
The derivative of arcsin(x) is 1 over the square root of 1 minus x squared.
Formula: Derivative of arccos(x)
The derivative of arccos(x) is minus 1 over the square root of 1 minus x squared.
Formula: Derivative of arctan(x)
The derivative of arctan(x) is 1 over x squared plus 1.
Formula: Logarithmic Differentiation
For a power whose base and exponent both contain x, take ln of both sides, differentiate, then multiply back by the original function.
Useful Tips to Remember
Rewrite the function in a form that is easy to differentiate first, such as turning roots and fractions into powers. Choose the right rule for each part: the power rule for powers, the product or quotient rule for products and quotients, and the chain rule for a function inside a function. Simplify the final derivative. The derivative gives the gradient of the function at every point.
Required knowledge
- How to differentiate a number on its own, covered in the Constant Rule Calculator.
- How to differentiate x, covered in the Variable Rule Calculator.
- How to differentiate x raised to a power, covered in the Power Rule Calculator.
- How a number in front of a function stays in front, covered in the Constant Multiple Rule Calculator.
- How to differentiate a sum one term at a time, covered in the Sum Rule Calculator.
- How to differentiate a difference one term at a time, covered in the Difference Rule Calculator.
- How to differentiate two functions multiplied together, covered in the Product Rule Calculator.
- How to differentiate one function divided by another, covered in the Quotient Rule Calculator.
- How to differentiate a function inside another function, covered in the Chain Rule Calculator.
- How to differentiate ln(x), covered in the Logarithmic Derivative Calculator.
- How to differentiate e to the x and a to the x, covered in the Exponential Derivative Calculator.
- How to differentiate sin, cos, tan, sec, csc and cot, covered in the Trigonometric Derivative Calculator.
- How to differentiate sinh, cosh and tanh, covered in the Hyperbolic Derivative Calculator.
- How to differentiate arcsin, arccos and arctan, covered in the Inverse Trigonometric Derivative Calculator.
- How to differentiate a power whose base and exponent both contain x, covered in the Logarithmic Differentiation Calculator.
Where Are Derivatives Used?
A derivative measures how fast a quantity changes at an instant, which is the gradient of its graph at a single point. Speed is the derivative of position, acceleration is the derivative of speed, and marginal cost is the derivative of total cost. Engineers use derivatives to design safe structures, economists use them to find the output that maximises profit, and doctors use them to model how quickly a drug leaves the body. Setting a derivative equal to zero finds the highest and lowest points, which is the basis of optimisation.
- Finding speed and acceleration from position
- Maximising profit or minimising cost in business
- Optimising shapes to use the least material
- Modelling how quickly medicines or populations change
- Training machine learning models with gradient descent
Derivative Practice Problems
Example 1 differentiates the polynomial \(4x^3 - 2x + 7\), and Example 2 differentiates \(x^2\cos x\), which needs the product rule. Examples 3 and 4 give you two more of the same kind to try, \(f\left(x\right) = 2 x^{3} + 5 x^{2} - 4\) and \(f\left(x\right) = x^{3} \sin{\left(x \right)}\). Try choosing the right rule yourself before checking each step.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Identify the main rule that applies.
- Work through the steps of that rule.
- Simplify and write the final derivative.
Formula
Formula: Sum Rule
The derivative of a sum is the sum of the derivatives, so each term is differentiated on its own and the results are added.
Formula: Difference Rule
The derivative of a difference is the difference of the derivatives, so each term is differentiated on its own and the results are subtracted.
Step 1
Step 1 - Set up the terms in the sum and difference.
In this problem: We are given a sum and difference. The separated terms are \(4 x^{3}\), \(2 x\), \(7\).
Step 2
Step 2 - Write the sum rule and difference rule formulas.
In this problem: The sum rule and the difference rule say the derivative of a sum or difference is the sum or difference of the derivatives.
Step 3
Step 3 - Split the derivative across the plus and minus signs.
In this problem: Apply the derivative to each separated term, keeping each sign.
Step 4a
Step 4a - Differentiate the separated term \(4 x^{3}\).
In this problem: The separated term is \(4 x^{3}\). Use the power rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(4 x^{3}\). This is a constant multiple of a power of \(x\). The coefficient is \(4\), the power part is \(x^{3}\), and the exponent is \(n = 3\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(4\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x^{3}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(4 x^{3}\). The constant coefficient is \(4\), and the variable part is \(x^{3}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(4\) outside the derivative and leave \(x^{3}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Here, \(n = 3\). Substitute this exponent into the power rule, then keep the coefficient \(4\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x^{3}\) and multiply by the constant \(4\). This gives \(12{x}^{2}\).
Final Answer
Step 4b
Step 4b - Differentiate the separated term \(2 x\).
In this problem: The separated term is \(2 x\). Use the power rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(2\) times \(x\). Rewrite the variable part as \(x^{1}\), so the power rule can be used with exponent \(n = 1\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(2\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(2 x^{1}\). The constant coefficient is \(2\), and the variable part is \(x^{1}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(2\) outside the derivative and leave \(x^{1}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Use the rewritten power form from Step 1. Here, \(n = 1\). Substitute this exponent into the power rule, then keep the coefficient \(2\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x\) and multiply by the constant \(2\). This gives \(2\).
Final Answer
Step 4c
Step 4c - Differentiate the separated term \(7\).
In this problem: The separated term is \(7\). Use the constant rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant rule formula.
- Apply the constant rule.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(7\). This expression does not contain \(x\), so it is a constant.
Step 2
Step 2 - Write the constant rule formula.
In this problem: The constant rule says the derivative of any constant is \(0\).
Step 3
Step 3 - Apply the constant rule.
In this problem: Since \(7\) is constant, its derivative is \(0\).
Final Answer
Step 5
Step 5 - Combine and simplify.
In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Identify the main rule that applies.
- Work through the steps of that rule.
- Simplify and write the final derivative.
Formula
Formula: Product Rule
This rule differentiates two functions multiplied together. Take the derivative of the first times the second, then add the first times the derivative of the second.
Step 1
Step 1 - Set up the two factors f(x) and g(x).
In this problem: The first factor is \(x^{2}\) and the second factor is \(\cos{\left(x \right)}\).
Step 2
Step 2 - Write the product rule formula.
In this problem: The derivative of a product is the derivative of the first times the second, plus the first times the derivative of the second.
Step 3
Step 3 - Differentiate the first factor.
In this problem: Differentiate \(x^{2}\) to get \(2 x\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(x^{2}\). This is a power of \(x\), so the exponent is \(n = 2\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Substitute the given power into the formula.
In this problem: Here, \(n = 2\). Substitute this exponent into the power rule, but do not simplify yet.
Step 4
Step 4 - Solve and simplify.
In this problem: Now subtract 1 from the exponent. This gives \(2{x}^{1}\).
Final Answer
Step 4
Step 4 - Differentiate the second factor.
In this problem: Differentiate \(\cos{\left(x \right)}\) to get \(- \sin{\left(x \right)}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for that trigonometric function.
- Apply the derivative rule.
Step 1
Step 1 - Identify the trigonometric function and any constant multiple.
In this problem: The function is \(\cos{\left(x \right)}\).
Step 2
Step 2 - Write the derivative rule for that trigonometric function.
In this problem: The derivative of \(\cos{\left(x \right)}\) is \(- \sin{\left(x \right)}\).
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\cos{\left(x \right)}\) into the rule from Step 2.
Final Answer
Step 5
Step 5 - Substitute into the product rule formula.
In this problem: Substitute the factors and their derivatives into the formula.
Step 6
Step 6 - Simplify the result.
In this problem: Expand the products and combine like terms.
Final Answer
See Example 3 Hide Example 3
Problem
Approach
Step-by-step method
- Set up the problem.
- Identify the main rule that applies.
- Work through the steps of that rule.
- Simplify and write the final derivative.
Formula
Formula: Sum Rule
The derivative of a sum is the sum of the derivatives, so each term is differentiated on its own and the results are added.
Formula: Difference Rule
The derivative of a difference is the difference of the derivatives, so each term is differentiated on its own and the results are subtracted.
Step 1
Step 1 - Set up the terms in the sum and difference.
In this problem: We are given a sum and difference. The separated terms are \(2 x^{3}\), \(5 x^{2}\), \(4\).
Step 2
Step 2 - Write the sum rule and difference rule formulas.
In this problem: The sum rule and the difference rule say the derivative of a sum or difference is the sum or difference of the derivatives.
Step 3
Step 3 - Split the derivative across the plus and minus signs.
In this problem: Apply the derivative to each separated term, keeping each sign.
Step 4a
Step 4a - Differentiate the separated term \(2 x^{3}\).
In this problem: The separated term is \(2 x^{3}\). Use the power rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(2 x^{3}\). This is a constant multiple of a power of \(x\). The coefficient is \(2\), the power part is \(x^{3}\), and the exponent is \(n = 3\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(2\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x^{3}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(2 x^{3}\). The constant coefficient is \(2\), and the variable part is \(x^{3}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(2\) outside the derivative and leave \(x^{3}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Here, \(n = 3\). Substitute this exponent into the power rule, then keep the coefficient \(2\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x^{3}\) and multiply by the constant \(2\). This gives \(6{x}^{2}\).
Final Answer
Step 4b
Step 4b - Differentiate the separated term \(5 x^{2}\).
In this problem: The separated term is \(5 x^{2}\). Use the power rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(5 x^{2}\). This is a constant multiple of a power of \(x\). The coefficient is \(5\), the power part is \(x^{2}\), and the exponent is \(n = 2\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(5\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x^{2}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(5 x^{2}\). The constant coefficient is \(5\), and the variable part is \(x^{2}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(5\) outside the derivative and leave \(x^{2}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Here, \(n = 2\). Substitute this exponent into the power rule, then keep the coefficient \(5\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x^{2}\) and multiply by the constant \(5\). This gives \(10{x}^{1}\).
Final Answer
Step 4c
Step 4c - Differentiate the separated term \(4\).
In this problem: The separated term is \(4\). Use the constant rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant rule formula.
- Apply the constant rule.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(4\). This expression does not contain \(x\), so it is a constant.
Step 2
Step 2 - Write the constant rule formula.
In this problem: The constant rule says the derivative of any constant is \(0\).
Step 3
Step 3 - Apply the constant rule.
In this problem: Since \(4\) is constant, its derivative is \(0\).
Final Answer
Step 5
Step 5 - Combine and simplify.
In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.
Final Answer
See Example 4 Hide Example 4
Problem
Approach
Step-by-step method
- Set up the problem.
- Identify the main rule that applies.
- Work through the steps of that rule.
- Simplify and write the final derivative.
Formula
Formula: Product Rule
This rule differentiates two functions multiplied together. Take the derivative of the first times the second, then add the first times the derivative of the second.
Step 1
Step 1 - Set up the two factors f(x) and g(x).
In this problem: The first factor is \(x^{3}\) and the second factor is \(\sin{\left(x \right)}\).
Step 2
Step 2 - Write the product rule formula.
In this problem: The derivative of a product is the derivative of the first times the second, plus the first times the derivative of the second.
Step 3
Step 3 - Differentiate the first factor.
In this problem: Differentiate \(x^{3}\) to get \(3 x^{2}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(x^{3}\). This is a power of \(x\), so the exponent is \(n = 3\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Substitute the given power into the formula.
In this problem: Here, \(n = 3\). Substitute this exponent into the power rule, but do not simplify yet.
Step 4
Step 4 - Solve and simplify.
In this problem: Now subtract 1 from the exponent. This gives \(3{x}^{2}\).
Final Answer
Step 4
Step 4 - Differentiate the second factor.
In this problem: Differentiate \(\sin{\left(x \right)}\) to get \(\cos{\left(x \right)}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for that trigonometric function.
- Apply the derivative rule.
Step 1
Step 1 - Identify the trigonometric function and any constant multiple.
In this problem: The function is \(\sin{\left(x \right)}\).
Step 2
Step 2 - Write the derivative rule for that trigonometric function.
In this problem: The derivative of \(\sin{\left(x \right)}\) is \(\cos{\left(x \right)}\).
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\sin{\left(x \right)}\) into the rule from Step 2.
Final Answer
Step 5
Step 5 - Substitute into the product rule formula.
In this problem: Substitute the factors and their derivatives into the formula.
Step 6
Step 6 - Simplify the result.
In this problem: Expand the products and combine like terms.
Final Answer
Calculator and Practice Mode
Want to check your own working? The Derivative Calculator solves any problem you type in and shows every step, so you can compare it line by line with your answer and find exactly where a mistake crept in. When you are ready to test yourself, Derivative Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode is available on the Plus and Pro plans.