Skip to content

Calculus reference

ExpressionWhat it returnsFor f(x) = x²
f(3)f(3)An output value9
f(x)f'(x)A function describing the rate of change2x2x
f(3)f'(3)The rate at one input6
f(3)hf'(3)hA predicted output change for a small input change h6h6h
f(3)+f(3)hf(3)+f'(3)hA predicted new output9+6h9+6h
01f(x)dx\int_0^1 f(x)\,dxAccumulated signed area over an interval1/31/3
f(x)dx\int f(x)\,dxA family of antiderivatives on an intervalx3/3+Cx^3/3+C

Assume u and v are differentiable where the rule is applied, and c is constant.

OperationRuleExample
Sum(u+v)=u+v(u+v)'=u'+v'(x2+x)=2x+1(x^2+x)'=2x+1
Constant multiple(cu)=cu(cu)'=cu'(3x2)=6x(3x^2)'=6x
Power(xn)=nxn1(x^n)'=nx^{n-1}(x3)=3x2(x^3)'=3x^2
Product(uv)=uv+uv(uv)'=u'v+uv'(x2ex)=2xex+x2ex(x^2e^x)'=2xe^x+x^2e^x
Composition(g(u(x)))=g(u(x))u(x)(g(u(x)))'=g'(u(x))u'(x)((3x+1)2)=2(3x+1)3((3x+1)^2)'=2(3x+1)\cdot3
Quotient(u/v)=(uvuv)/v2(u/v)'=(u'v-uv')/v^2(1/x)=1/x2(1/x)'=-1/x^2

The quotient requires v0v\ne0. The power rule applies to real n on x>0x>0; particular powers have larger domains. The derivative of x\sqrt{x} is 1/(2x)1/(2\sqrt{x}) for x>0x>0, not at zero.

Other useful derivatives are (ex)=ex(e^x)'=e^x, (lnx)=1/x(\ln x)'=1/x for x>0x>0, and (ax)=(lna)ax(a^x)'=(\ln a)a^x for a>0a>0. The formulas (sinx)=cosx(\sin x)'=\cos x and (cosx)=sinx(\cos x)'=-\sin x use radians.

An interior local maximum or minimum of a differentiable function has f(x)=0f'(x)=0. The converse does not hold: x3x^3 has a zero derivative at zero and keeps increasing.

At a stationary point, a positive second derivative gives a local minimum, a negative one gives a local maximum, and zero gives no verdict. Also check boundaries and points where the derivative does not exist. For a global claim, compare the whole stated domain.

For continuous f on [a,b][a,b] and an antiderivative F with F=fF'=f,

abf(x)dx=F(b)F(a).\int_a^b f(x)\,dx=F(b)-F(a).
IntegrandAn antiderivativeCondition
xnx^nxn+1/(n+1)x^{n+1}/(n+1)n1n\ne-1, on an interval where the power rule applies
1/x1/xlnx\ln\lvert x\rvertInterval does not cross zero
exe^xexe^xAll real x
ccxc constant

A definite integral counts area below the axis negatively. The total geometric area is abf(x)dx\int_a^b |f(x)|\,dx when a<ba<b.

The unweighted average height is 1baabf(x)dx\frac1{b-a}\int_a^b f(x)\,dx. An expectation instead weights by a probability distribution; for a continuous X, E[g(X)]=g(x)fX(x)dx\mathbb E[g(X)]=\int g(x)f_X(x)\,dx when the expectation exists.

For f(x,y)=x2y+yf(x,y)=x^2y+y, hold the other input fixed:

fx=2xy,fy=x2+1.\frac{\partial f}{\partial x}=2xy,\qquad \frac{\partial f}{\partial y}=x^2+1.

At (2,3)(2,3), the gradient is (12,5)(12,5). A small step (h,k)(h,k) gives the linear prediction Δf12h+5k\Delta f\approx12h+5k.

For steps of the same Euclidean length, the nonzero gradient gives the direction of greatest first-order increase. A sufficiently small step against it decreases a differentiable function:

θnew=θηL(θ).\theta_{\mathrm{new}}=\theta-\eta\nabla L(\theta).

Here θ is the vector of parameters, L the loss, and η a positive learning rate. A large step can increase the loss. A zero gradient alone does not prove a minimum.

Why can h approach zero after we divided by h?

The quotient is evaluated for nonzero h. Its limit describes the value those quotients approach. For x2x^2 at 3, the quotient is 6+h6+h and its limit is 6. We never evaluate 0/00/0.

What does dx mean?

In the integral notation used here, dx identifies the integration variable. The finite rectangle widths are Δx; the integral is their limiting sum. In df/dx, the notation identifies a derivative. Differential notation has further uses, but treating dx as literally zero does not justify these operations.

What is the difference between d and ∂?

A partial derivative holds other independent inputs fixed. A total derivative follows how the input actually changes. For f(x,y)=xyf(x,y)=xy, the partial derivative in x is y. If instead y also changes as y=xy=x, then f(x,x)=x2f(x,x)=x^2 and the derivative along that path is 2x2x. State what is fixed before differentiating.

Practice these distinctions or apply a gradient to a fitted line.

Definition

Read the full glossary entry →