Enter a function
Use x, powers, fractions, roots, parentheses, and supported functions such as sin, cos, ln, and e^x.
Derivative
Differentiate from first principles
- 1Write the difference quotient
- 2Substitute x + h into the function
This is the exact substitution before expansion or cancellation. Keep h nonzero while simplifying.
- 3Simplify, then take the limit
After simplifying the quotient with valid algebra, let h approach zero. The resulting limit is the derivative, provided it exists.
- ✓First-principles result
This page shows the defining limit and computes the same symbolic derivative with the site’s differentiation engine. The displayed limit steps describe the method; they are not a claim that every expression was algebraically expanded line by line.
First-Principles Derivative Guide
First-principles differentiation finds an instantaneous rate of change from the limit of average rates of change. It starts with the difference quotient [f(x+h) − f(x)]/h, where h is nonzero, and takes the limit as h approaches zero when that limit exists.
For each nonzero h, the quotient is a secant slope. If these slopes approach one finite value as h tends to zero, that value is the derivative at x.
How to use this calculator
- Enter f(x) as a supported function of x.
- Form f(x+h) by replacing each x in the original function with x+h.
- Subtract f(x) and divide the difference by h, with h nonzero during simplification.
- Simplify the quotient using valid algebraic operations.
- Evaluate the limit as h approaches zero; if it exists, the result is f′(x).
Worked example
Problem: Find the derivative of f(x) = x² + 3x + 1 from first principles.
Method: [f(x+h) − f(x)]/h = [(x+h)² + 3(x+h) + 1 − (x² + 3x + 1)]/h = 2x + h + 3.
Result: lim(h→0)(2x + h + 3) = 2x + 3.
The secant slope approaches 2x + 3, so the derivative is f′(x) = 2x + 3.
Important differentiation ideas
- Keep h nonzero while simplifying. The difference quotient divides by h, so cancellation steps are performed for h ≠ 0. Only after simplification do we take the limit h → 0.
- A limit is not substitution. Directly setting h = 0 in the original quotient creates 0/0. The quotient must first be simplified or evaluated with limit laws.
- Differentiability is a limit condition. A function is differentiable at x when the difference quotient approaches one finite two-sided limit there.
- First principles and rules agree. Power, product, quotient, and chain rules are efficient results derived from the same foundational limit definition.
Common mistakes to avoid
- Substituting h = 0 before simplifying the quotient.
- Forgetting to replace every x with x+h in f(x+h).
- Subtracting f(x) without distributing the minus sign across all terms.
- Cancelling a factor without stating the nonzero condition that permits cancellation.
- Assuming a derivative exists merely because a function is defined at the point.
Key terms
- Difference quotient
- The ratio [f(x+h) − f(x)]/h, which measures average change over an input interval of length h.
- Limit
- The value an expression approaches as its input approaches a specified value, even when the input does not equal that value.
- First principles
- A name for deriving a derivative directly from the limit definition rather than beginning with memorized differentiation rules.
- Instantaneous rate of change
- The limiting rate of change at a single input; geometrically, it is the slope of the tangent when finite.
Frequently asked questions
What is the first-principles formula for a derivative?
f′(x) = lim(h→0)[f(x+h) − f(x)]/h, provided this finite limit exists.
Why can’t I substitute h = 0 immediately?
At h = 0 the numerator and denominator are both zero, producing 0/0. Simplify the quotient or apply valid limit laws before evaluating the limit.
What is the difference between first principles and a derivative rule?
First principles starts from the defining limit. Rules such as the power rule are shortcuts proved from that definition and limit laws.
Does the derivative exist at every point?
No. A derivative can fail at discontinuities, corners, cusps, or points with an unbounded slope. The limit must be finite and agree from both sides.
How does this compare with the Difference Quotient Calculator?
The difference quotient tool forms and simplifies [f(x+h)−f(x)]/h. The first-principles calculator focuses on taking the limit of that quotient as h approaches zero.
References
- OpenStax, Rice University: Calculus Volume 1 — The Derivative as a Function — The derivative as the limit of the difference quotient and differentiability at a point.
- OpenStax, Rice University: Calculus Volume 1 — Defining the Derivative — Secant slopes, tangent slopes, and the limit definition of the derivative.