User manual · Calculations

Calculus formulas: derivatives, integrals and limits

Calculus formulas for derivatives, integrals, limits and series, each with a worked example and the calculator syntax to check it in one step.

By Hira Noor, mathematicianUpdated
Short answerThe core calculus formulas are the power rule ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1}, the product, quotient and chain rules, the standard integrals such as ∫xndx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C, and the Fundamental Theorem of Calculus, ∫abf(x)dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a). The tables below list each formula with an example you can check. The live derivative calculator just before the worked examples opens on the product rule for x2sin⁡xx^2 \sin x at x=1x = 1; in the scientific calculator, diff, integral, limit and sum give the same answers as numbers.

Jump to: derivative formulas, integral formulas, limits, series, worked examples or calculator syntax. To keep the tables as a formula sheet, print this page: the calculator, site menus and page navigation are left out of the printout.

Check a formula in one click: power rule, chain rule, integration by parts, Fundamental Theorem and sin x / x. Each tool shows the rule it used at every step.

Derivative formulas

A derivative is the slope of a function at a point. Every rule below is the derivative with respect to x; c and n are constants, and u and v are functions of x. The last column is what to type in the scientific calculator to check the rule at one point.

Derivative rules with an example and a calculator check
RuleFormulaExampleCheck
Constantddxc=0\frac{d}{dx}c = 0ddx7=0\frac{d}{dx}7 = 0diff(7, x, 1) = 0
Power ruleddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1}ddxx3=3x2\frac{d}{dx}x^3 = 3x^2diff(x^3, x, 2) = 12
Constant multipleddx[cu]=cu′\frac{d}{dx}[c\,u] = c\,u'ddx5x2=10x\frac{d}{dx}5x^2 = 10xdiff(5x^2, x, 1) = 10
Sum and difference(u±v)′=u′±v′(u \pm v)' = u' \pm v'ddx(x2+x)=2x+1\frac{d}{dx}(x^2 + x) = 2x + 1diff(x^2 + x, x, 1) = 3
Product rule(uv)′=u′v+uv′(uv)' = u'v + uv'ddxx2sin⁡x=2xsin⁡x+x2cos⁡x\frac{d}{dx}x^2 \sin x = 2x \sin x + x^2 \cos xdiff(x^2 sin(x), x, 1) = 2.223244275
Quotient rule(uv)′=u′v−uv′v2\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}ddxsin⁡xx=xcos⁡x−sin⁡xx2\frac{d}{dx}\frac{\sin x}{x} = \frac{x \cos x - \sin x}{x^2}diff(sin(x)/x, x, π) = −0.3183098862
Chain ruleddxf(g(x))=f′(g(x))g′(x)\frac{d}{dx}f(g(x)) = f'(g(x))\,g'(x)ddxsin⁡3x=3cos⁡3x\frac{d}{dx}\sin 3x = 3\cos 3xdiff(sin(3x), x, 0) = 3
Exponentialddxex=ex\frac{d}{dx}e^x = e^x, ddxax=axln⁡a\frac{d}{dx}a^x = a^x \ln addx2x=2xln⁡2\frac{d}{dx}2^x = 2^x \ln 2diff(2^x, x, 3) = 5.545177444
Logarithmddxln⁡x=1x\frac{d}{dx}\ln x = \frac{1}{x}, ddxloga⁡x=1xln⁡a\frac{d}{dx}\log_a x = \frac{1}{x \ln a}ddxln⁡x\frac{d}{dx}\ln x at 2 is 12\frac{1}{2}diff(ln(x), x, 2) = 0.5
Square rootddxx=12x\frac{d}{dx}\sqrt{x} = \frac{1}{2\sqrt{x}}At x=4x = 4: 14\frac{1}{4}diff(sqrt(x), x, 4) = 0.25
Sine and cosineddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin xAt x=π3x = \frac{\pi}{3}: cos⁡π3=0.5\cos\frac{\pi}{3} = 0.5diff(sin(x), x, π/3) = 0.5
Tangentddxtan⁡x=sec2⁡x\frac{d}{dx}\tan x = \sec^2 xAt 0: sec2⁡0=1\sec^2 0 = 1diff(tan(x), x, 0) = 1
Secant and cosecantddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x \tan x, ddxcsc⁡x=−csc⁡xcot⁡x\frac{d}{dx}\csc x = -\csc x \cot xAt 0: sec⁡0tan⁡0=0\sec 0 \tan 0 = 0diff(sec(x), x, 0) = 0
Cotangentddxcot⁡x=−csc2⁡x\frac{d}{dx}\cot x = -\csc^2 xAt π2\frac{\pi}{2}: −1-1diff(cot(x), x, π/2) = −1
Inverse sineddxarcsin⁡x=11−x2\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{1 - x^2}}At 0.5: 23\frac{2}{\sqrt{3}}diff(asin(x), x, 0.5) = 1.154700538
Inverse tangentddxarctan⁡x=11+x2\frac{d}{dx}\arctan x = \frac{1}{1 + x^2}At 1: 12\frac{1}{2}diff(atan(x), x, 1) = 0.5

The inverse cosine is the negative of the inverse sine rule: ddxarccos⁡x=−11−x2\frac{d}{dx}\arccos x = -\frac{1}{\sqrt{1 - x^2}}. For the derivative as a formula, with each rule named, use the derivative calculator; it also gives second to fifth derivatives.

Integral formulas

An indefinite integral, or antiderivative, reverses differentiation, so every formula here can be checked by differentiating the right-hand side. Add the constant C to every indefinite integral. The check column evaluates a definite integral, which by the Fundamental Theorem equals F(b) − F(a).

Standard integrals with a definite-integral check
IntegralFormulaCheckExact value
Power rule (n≠−1n \ne -1)∫xndx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + Cintegral(x^2, x, 0, 3) = 9273=9\frac{27}{3} = 9
Reciprocal∫1xdx=ln|x|+C\int \frac{1}{x}\,dx = \ln|x| + Cintegral(1/x, x, 1, e) = 1ln⁡e=1\ln e = 1
Exponential∫exdx=ex+C\int e^x\,dx = e^x + Cintegral(e^x, x, 0, 1) = 1.718281828e−1e - 1
Exponential, base a∫axdx=axln⁡a+C\int a^x\,dx = \frac{a^x}{\ln a} + Cintegral(2^x, x, 0, 1) = 1.4426950411ln⁡2\frac{1}{\ln 2}
Natural log∫ln⁡xdx=xln⁡x−x+C\int \ln x\,dx = x \ln x - x + Cintegral(ln(x), x, 1, e) = 111
Sine∫sin⁡xdx=−cos⁡x+C\int \sin x\,dx = -\cos x + Cintegral(sin(x), x, 0, π) = 222
Cosine∫cos⁡xdx=sin⁡x+C\int \cos x\,dx = \sin x + Cintegral(cos(x), x, 0, π/2) = 111
Secant squared∫sec2⁡xdx=tan⁡x+C\int \sec^2 x\,dx = \tan x + Cintegral(sec(x)^2, x, 0, π/4) = 1tan⁡π4=1\tan\frac{\pi}{4} = 1
Arctangent form∫11+x2dx=arctan⁡x+C\int \frac{1}{1 + x^2}\,dx = \arctan x + Cintegral(1/(1+x^2), x, 0, 1) = 0.7853981634π4\frac{\pi}{4}
Arcsine form∫11−x2dx=arcsin⁡x+C\int \frac{1}{\sqrt{1 - x^2}}\,dx = \arcsin x + Cintegral(1/sqrt(1-x^2), x, 0, 0.5) = 0.5235987756π6\frac{\pi}{6}
Integration rules and theorems
RuleFormulaExample
Fundamental Theorem of Calculus∫abf(x)dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a), where F′=fF' = f∫0πsin⁡xdx=[−cos⁡x]0π=2\int_0^\pi \sin x\,dx = [-\cos x]_0^\pi = 2
Substitution∫f(g(x))g′(x)dx=∫f(u)du\int f(g(x))\,g'(x)\,dx = \int f(u)\,du, with u=g(x)u = g(x)∫2xcos⁡x2dx=sin⁡x2+C\int 2x \cos x^2\,dx = \sin x^2 + C
Integration by parts∫udv=uv−∫vdu\int u\,dv = uv - \int v\,du∫xexdx=(x−1)ex+C\int x e^x\,dx = (x - 1)e^x + C
Reversing the bounds∫abfdx=−∫bafdx\int_a^b f\,dx = -\int_b^a f\,dxintegral(x^2, x, 3, 0) = −9
Improper integral∫1∞1xpdx=1p−1\int_1^\infty \frac{1}{x^p}\,dx = \frac{1}{p - 1} for p>1p > 1integral(1/x^2, x, 1, inf) = 1

Limit laws and special limits

When the limits of f and g at a both exist, the limit of a sum, difference, constant multiple or product is the sum, difference, multiple or product of the limits, and the limit of f/g is the quotient of the limits as long as the limit of g is not 0. A 0/0 or ∞/∞ form needs one of the results below.

Standard limits with a calculator check
LimitValueCheck
limx→0sin⁡xx\lim_{x \to 0} \frac{\sin x}{x}11limit(sin(x)/x, x, 0) = 1
limx→01−cos⁡xx\lim_{x \to 0} \frac{1 - \cos x}{x}00limit((1 - cos(x))/x, x, 0) = 0
limx→0ex−1x\lim_{x \to 0} \frac{e^x - 1}{x}11limit((e^x - 1)/x, x, 0) = 1
limn→∞(1+1n)n\lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^neelimit((1 + 1/n)^n, n, inf) = 2.718281828
limx→∞ln⁡xx\lim_{x \to \infty} \frac{\ln x}{x}00limit(ln(x)/x, x, inf) = 0
L’Hôpital’s rule (0/0 or ∞/∞)limfg=limf′g′\lim \frac{f}{g} = \lim \frac{f'}{g'}limit((x^2 - 4)/(x - 2), x, 2) = 4

Series and sum formulas

Sums and series with a calculator check
SeriesFormulaCheck
Sum of the first n integers∑k=1nk=n(n+1)2\sum_{k=1}^{n} k = \frac{n(n+1)}{2}sum(k, k, 1, 100) = 5050
Sum of squares∑k=1nk2=n(n+1)(2n+1)6\sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}sum(k^2, k, 1, 10) = 385
Sum of cubes∑k=1nk3=(n(n+1)2)2\sum_{k=1}^{n} k^3 = \left(\frac{n(n+1)}{2}\right)^2sum(k^3, k, 1, 10) = 3025
Geometric series (|r|<1|r| < 1)∑k=0∞rk=11−r\sum_{k=0}^{\infty} r^k = \frac{1}{1 - r}sum(0.5^k, k, 0, 50) = 2
Basel problem∑k=1∞1k2=π26\sum_{k=1}^{\infty} \frac{1}{k^2} = \frac{\pi^2}{6}sum(1/k^2, k, 1, 1000) = 1.643934567
Taylor series of exe^xex=∑k=0∞xkk!e^x = \sum_{k=0}^{\infty} \frac{x^k}{k!}sum(1/k!, k, 0, 20) = 2.718281828

The calculator adds a finite number of terms, so an infinite series is checked with a large upper bound. The Basel sum to 1,000 terms is 1.643934567, still 0.001 short of π26\frac{\pi^2}{6} = 1.644934067, because that series converges slowly. The summation calculator shows partial sums term by term.

Try

Use x as the variable, for example x^3 - 2x, e^(-x^2) or ln(x^2 + 1). Trigonometric functions use radians.

Derivative order

A number, fraction or expression such as -1/3 or pi/4. Leave blank for the formula only.

Result

f′(x), the first derivative: 2x·sin(x) + x²·cos(x)

f′(x), the first derivative

f′(x)=2xsin(x)+x2cos(x)f^{\prime}(x) = 2x\sin\left(x\right) + x^{2}\cos\left(x\right)

2x·sin(x) + x²·cos(x)

f′(1)Slope of the graph at this point
2.2232442752.223244275
f(1)
0.84147098480.8414709848
Tangent line at x = 1
y=2.223244275x−1.381773291y = 2.223244275x - 1.381773291
Normal line (perpendicular)
y=−0.4497931294x+1.291264114y = -0.4497931294x + 1.291264114
Numerical check (central differences)Agrees with the exact formula
2.22324428
Rules used
Product rule, power rule, standard derivatives

The first derivative of f(x) = x²·sin(x) is f′(x) = 2x·sin(x) + x²·cos(x). At x = 1 the slope of the graph is 2.223244275, so the tangent line there is y = 2.223244275x − 1.381773291.

Trigonometric functions use radians. For an angle in degrees, write sin(pi x/180) instead of sin(x).

f(x) and f′(x) near x = 1
−15−10−505−2−101234xyf(x)f′(x)Tangent at x = 1
Step-by-step working (7 steps)
  1. Start with the function

    f(x)=x2sin(x)f(x) = x^{2}\sin\left(x\right)
  2. Product rule: (uv)′ = u′v + uv′

    ddx[x2sin(x)]=2xsin(x)+x2cos(x)\frac{d}{dx}\left[x^{2}\sin\left(x\right)\right] = 2x\sin\left(x\right) + x^{2}\cos\left(x\right)
  3. Power rule: d/dx uⁿ = n·uⁿ⁻¹·u′

    ddx[x2]=2x\frac{d}{dx}\left[x^{2}\right] = 2x
  4. d/dx sin x = cos x

    ddx[sin(x)]=cos(x)\frac{d}{dx}\left[\sin\left(x\right)\right] = \cos\left(x\right)
  5. Simplify

    f′(x)=2xsin(x)+x2cos(x)f^{\prime}(x) = 2x\sin\left(x\right) + x^{2}\cos\left(x\right)
  6. Evaluate at x = 1

    Substitute the point into the derivative.

    f′(1)=2.223244275f^{\prime}\left(1\right) = 2.223244275
  7. Write the tangent line

    Use the point-slope form with the point (a, f(a)) and slope f′(a).

    y=f(a)+f′(a)(x−a)⇒y=2.223244275x−1.381773291y = f(a) + f^{\prime}(a)(x - a) \;\Rightarrow\; y = 2.223244275x - 1.381773291

This is the derivative calculator, started with this page’s next example. Its own page adds more presets, the formulas and worked examples.

Worked examples

Product rule: the slope of x² sin x at x = 1

Let u=x2u = x^2 and v=sin⁡xv = \sin x, so u′=2xu' = 2x and v′=cos⁡xv' = \cos x. Then (uv)′=2xsin⁡x+x2cos⁡x(uv)' = 2x \sin x + x^2 \cos x, and at x=1x = 1 that is 2sin⁡1+cos⁡1=1.682941970+0.540302306=2.2232442762 \sin 1 + \cos 1 = 1.682941970 + 0.540302306 = 2.223244276. Typing diff(x^2 sin(x), x, 1) gives 2.223244275, the same value to nine decimal places. Open it in the derivative calculator.

Chain rule: the derivative of e^(−x²)

The outer function is eue^u and the inner one is u=−x2u = -x^2, so ddxe−x2=e−x2⋅(−2x)=−2xe−x2\frac{d}{dx}e^{-x^2} = e^{-x^2} \cdot (-2x) = -2x e^{-x^2}. At x=1x = 1 this is −2e−1=−0.7357588823-2e^{-1} = -0.7357588823, which matches diff(e^(-x^2), x, 1). See each step.

Integration by parts, checked by differentiating back

For ∫xexdx\int x e^x\,dx choose u=xu = x and dv=exdxdv = e^x\,dx, so du=dxdu = dx and v=exv = e^x. Then ∫xexdx=xex−∫exdx=(x−1)ex+C\int x e^x\,dx = x e^x - \int e^x\,dx = (x - 1)e^x + C. To check it, differentiate the answer with the product rule: ex+(x−1)ex=xexe^x + (x - 1)e^x = x e^x, the integrand. By the Fundamental Theorem, ∫01xexdx=(1−1)e1−(0−1)e0=1\int_0^1 x e^x\,dx = (1 - 1)e^1 - (0 - 1)e^0 = 1, and integral(x e^x, x, 0, 1) returns 1. Open the antiderivative.

Substitution: a definite integral with u = x²

In ∫0π/22xcos⁡x2dx\int_0^{\sqrt{\pi/2}} 2x \cos x^2\,dx, let u=x2u = x^2, so du=2xdxdu = 2x\,dx and the bounds become 0 and π2\frac{\pi}{2}. The integral is ∫0π/2cos⁡udu=sin⁡π2−sin⁡0=1\int_0^{\pi/2} \cos u\,du = \sin\frac{\pi}{2} - \sin 0 = 1. Check it.

How to use calculus on a calculator

The scientific calculator has five calculus functions: diff, integral, limit, sum and prod. Each takes the expression, the name of the variable, and then the point or the bounds. They return a number, not a formula; for the formula with steps, use the math solver or the dedicated calculators.

Calculus functions in the scientific calculator
FunctionMeaningExampleResult
diff(f, x, a)Derivative of f with respect to x at x = adiff(x^3, x, 2)12
integral(f, x, a, b)Definite integral of f from a to bintegral(x^2, x, 0, 3)9
limit(f, x, a)Two-sided limit as x approaches alimit(sin(x)/x, x, 0)1
limit(f, x, a, 1)Right-hand limit (use −1 for the left-hand limit)limit(abs(x)/x, x, 0, 1)1
sum(f, k, a, b)f summed for k = a, a + 1, …, bsum(k^2, k, 1, 10)385
prod(f, k, a, b)f multiplied for k = a, a + 1, …, bprod(k, k, 1, 6)720

The second argument names the variable, and it can be any name: integral(t^2, t, 0, 3) is also 9. That variable exists only inside the function, so it does not change a value you have stored under the same name. The aliases derivative, integrate, lim, Σ, product and Π also work.

Calculus always uses radians

Inside diff, integral and limit, trigonometric functions use radians whatever the angle unit setting, because the formulas assume it: the derivative of sin x is cos x only when x is in radians. So even in degree mode, diff(sin(x), x, 0) = 1 and integral(sin(x), x, 0, π) = 2. sum and prod are ordinary repeated arithmetic and follow the current angle unit. See radians vs degrees for why.

Derivatives: diff

diff(f, x, a) returns the slope of f at the single point x = a. It uses central differences at several step sizes combined by Richardson extrapolation, which typically gives 10 to 12 correct significant digits. If the function is undefined near the point, for example diff(sqrt(x), x, 0), you get an error rather than a misleading slope.

Definite integrals: integral

integral(f, x, a, b) uses adaptive Gauss–Kronrod quadrature: a 15-point Kronrod rule with an embedded 7-point Gauss rule estimates the error on each piece, and the piece with the largest error is split until the total error estimate is about 10⁻¹¹ of the result. Either bound can be inf or -inf, so integral(exp(-x^2), x, -inf, inf) gives 1.772453851, which is √π. When the integrand is undefined inside the interval or the integral diverges, as with integral(1/x, x, 1, inf), you get an error instead of a number.

Limits: limit

limit(f, x, a) approaches a from both sides with steadily smaller steps, extrapolates the sequence of values, and checks that the two sides agree. Add a fourth argument of 1 for the limit from the right or −1 for the limit from the left; the point can be inf or -inf. limit(1/x^2, x, 0) gives ∞, and limit(abs(x)/x, x, 0) reports that the left-hand and right-hand limits are different, while limit(abs(x)/x, x, 0, -1) gives −1.

Sums and products: sum and prod

sum and prod need whole-number bounds and allow up to 1,000,000 terms. Sums use compensated (Kahan) summation, which keeps rounding errors from piling up over many terms. A product example is prod(1 - 1/k^2, k, 2, 100) = 0.505.

How far to trust a numerical answer

These methods are accurate for smooth functions. Functions that oscillate extremely fast, have a spike narrower than the sampling, or change behavior very close to the point can mislead any numerical method. When a result matters, check it with a graph in the graphing calculator or with the integral calculator and limit calculator, which show their working.

Frequently asked questions

What are the basic calculus formulas?

The basic derivative formulas are the power rule (the derivative of xⁿ is nxⁿ⁻¹), the product, quotient and chain rules, and the derivatives of eˣ, ln x, sin x and cos x. The basic integral formulas reverse them, for example ∫xⁿ dx = xⁿ⁺¹/(n + 1) + C, and the Fundamental Theorem of Calculus links the two: ∫ from a to b of f(x) dx = F(b) − F(a).

How do you use calculus on a calculator?

Type the function, the variable and the point or bounds. In the scientific calculator, diff(x^3, x, 2) gives the derivative of x³ at x = 2, which is 12, and integral(x^2, x, 0, 3) gives 9. Calculus always uses radians. For the answer as a formula with steps, use the derivative, integral or limit calculator instead.

What is the difference between a derivative and an integral?

A derivative measures the rate of change of a function, the slope of its graph at a point. An integral adds up a quantity over an interval, the signed area under the graph. They are inverse operations: by the Fundamental Theorem of Calculus, differentiating the integral of f gives back f.

Can the scientific calculator give me the derivative as a formula?

No, diff returns the value of the derivative at one point. For the formula, use the derivative calculator, or type derivative of ln(x^2 + 1) or d/dx x^2 sin(x) in the math solver, which shows each rule used.

Why do I get an error for integral(1/x, x, -1, 1)?

The integrand 1/x is undefined at x = 0, inside the interval, so the integral does not exist as an ordinary integral. Split the interval or check the function with a graph.

How accurate are the results?

Integrals of smooth functions are usually correct to about 11 significant digits, and an integral whose error estimate stays above about one part in a million is reported as not converging. Derivatives are typically correct to 10 to 12 digits. A limit is accepted only when the extrapolated values agree to at least six significant digits, and is usually far more accurate. The default display shows 10 significant digits.

Sources and further reading

  1. Calculus Volume 1, chapters 2 to 5 (limits, derivatives and integration) (opens in a new tab), OpenStax, Rice University (Gilbert Strang and Edwin Herman, 2016)
  2. NIST Digital Library of Mathematical Functions, chapter 4, Elementary Functions (opens in a new tab), National Institute of Standards and Technology
  3. QUADPACK: A Subroutine Package for Automatic Integration, Springer (Robert Piessens, Elise de Doncker-Kapenga, Christoph W. Überhuber and David K. Kahaner, 1983)

Tools on this page

Derivative Calculator

First to fifth derivatives with rule-by-rule steps, f′(a), the tangent line and a graph.

Integral Calculator

Antiderivatives with named steps, plus definite and improper integrals with an error estimate and area graph.

Limit Calculator

Two-sided, one-sided and infinite limits with steps, a table of values and the indeterminate form named.

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.