Calculus
Calculus is the mathematical study of continuous change.
It has two main branches: differential calculus and integral calculus. These two branches are related by the fundamental theorem of calculus:
\int_a^b f(x) \,\mathrm{d}x = F(b) - F(a)
where F
is an antiderivative of f
, that is F' = f
.
To calculate the derivative of a function, use the D
function or ND
to calculate a numerical approximation
To calculate the integral (antiderivative) of a function, use the Integrate
function or NIntegrate
to calculate a numerical approximation.
["D", expr, var]
The D
function represents the partial derivative of a function expr
with respect to
the variable var
.
["D", "f", "x"]
["D", expr, var-1, var-2, ...]
Multiple variables can be specified to compute the partial derivative of a multivariate function.
["D", "f", "x", "y"]
["D", expr, var, var]
A variable can be repeated to compute the second derivative of a function.
["D", "f", "x", "x"]
Explanation
The derivative is a measure of how a function changes as its input changes. It is the ratio of the change in the value of a function to the change in its input value.
The derivative of a function f(x)
with respect to its input x
is denoted by f'(x)
or \frac{df}{dx}
. The derivative of a function f(x)
is defined as:
f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}
where:
-
h
is the change in the input variable. -
f(x + h) - f(x)
is the change in the value of the function. -
\frac{f(x + h) - f(x)}{h}
is the ratio of the change in the value of the function to the change in its input value. -
\lim_{h \to 0} \frac{f(x + h) - f(x)}{h}
is the limit of the ratio of the change in the value of the function to the change in its input value ash
approaches0
. -
The limit is taken as
h
approaches0
because the derivative is the instantaneous rate of change of the function at a point, and the change in the input value must be infinitesimally small to be instantaneous. -
Wikipedia: Derivative
-
Wolfram Mathworld: Derivative
- Wikipedia: Derivative
- Wikipedia: Notation for Differentiation, Leibniz's Notation, Lagrange's Notation, Newton's Notation
- Wolfram Mathworld: Derivative
- NIST: Derivative
LaTeX | MathJSON |
---|---|
f'(x) | ["Derivative", "f", "x"] |
f\prime(x) | ["Derivative", "f", "x"] |
f^{\prime}(x) | ["Derivative", "f", "x"] |
f''(x) | ["Derivative", "f", "x", 2] |
f\prime\prime(x) | ["Derivative", "f", "x", 2] |
f^{\prime\prime}(x) | ["Derivative", "f", "x", 2] |
f\doubleprime(x) | ["Derivative", "f", "x", 2] |
f^{(n)}(x) | ["Derivative", "f", "x", "n"] |
["ND", expr, value]
The ND
function returns a numerical approximation of the partial derivative of a function expr at the point value.
["ND", "Sin", 1]
// ➔ 0.5403023058681398
Note: ["ND", "Sin", 1]
is equivalent to ["N", ["D", "Sin", 1]]
.
["Derivative", expr]
The Derivative
function represents the derivative of a function expr.
["Apply", ["Derivative", "f"], "x"]
// This is equivalent to:
[["Derivative", "f"], "x"]
["Derivative", expr, n]
When a n
argument is present it represents the n-th derivative of a function expr.
["Apply", ["Derivative", "f", "n"], "x"]
Derivative
is an operator in the mathematical sense, that is, a function that takes a function
as an argument and returns a function.
The Derivative
function is used to represent the derivative of a function in a symbolic form. It is not used to calculate the derivative of a function. To calculate the derivative of a function, use the D
function or ND
to calculate a numerical approximation.
["Integrate", expr]
An indefinite integral, also known as an antiderivative, refers to the reverse process of differentiation.
["Integrate", "Sin"]
["Integrate", expr, index]
["Integrate", ["Sin", "x"], "x"]
The LaTeX expression above include a LaTeX spacing command \,
to add a
small space between the function and the differential operator. The differential
operator is wrapped with a \mathrm{}
command so it can be displayed upright.
Both of these typographical conventions are optional, but they make the
expression easier to read. The expression \int \sin x dx
\int f(x) dx
is equivalent.
["Integrate", expr, bounds]
A definite integral computes the net area between a function f(x)
and
the x-axis over a specified interval [a, b]
. The "net area" accounts for
areas below the x-axis subtracting from the total.
["Integrate", ["Power", "x", 2], ["Tuple", "x", 0, 2]]
The notation for the definite integral of f(x)
from a
to b
is given by:
\int_{a}^{b} f(x) \mathrm{d}x = F(b) - F(a)
where:
dx
indicates the variable of integration.[a, b]
are the bounds of integration, witha
being the lower bound andb
being the upper bound.F(x)
is an antiderivative off(x)
, meaningF'(x) = f(x)
.
Use NIntegrate
to calculate a numerical approximation of the definite integral of a function.
["Integrate", expr, bounds, bounds]
A double integral computes the net volume between a function f(x, y)
and the xy-plane over a specified region [a, b] \times [c, d]
. The
"net volume" accounts for volumes below the xy-plane subtracting from the
total. The notation for the double integral of f(x, y)
from a
to
b
and c
to d
is given by:
\int_{a}^{b} \int_{c}^{d} f(x, y) \,\mathrm{d}x \,\mathrm{d}y
["Integrate", ["Power", "x", 2], ["Tuple", "x", 0, 3], ["Tuple", "y", 0, 2]]
Explanation
Given a function f(x)
, finding its indefinite integral, denoted as
\int f(x) \,\mathrm{d}x
, involves finding a new function
F(x)
such that F'(x) = f(x)
.
Mathematically, this is expressed as:
\int f(x) \,\mathrm{d}x = F(x) + C
where:
\mathrm{d}x
specifies the variable of integration.F(x)
is the antiderivative or the original function.C
is the constant of integration, accounting for the fact that there are many functions that can have the same derivative, differing only by a constant.
- Wikipedia: Integral, Antiderivative, Integral Symbol
- Wolfram Mathworld: Integral
- NIST: Integral
["NIntegrate", expr, lower-bound, upper-bound]
Calculate the numerical approximation of the definite integral of a function
f(x)
from a
to b
.
["NIntegrate", ["Function", ["Power", "x", 2], "x"], 0, 2]
["Limit", fn, value]
Evaluate the expression fn as it approaches the value value.
["Limit", ["Divide", ["Sin", "_"], "_"], 0]
["Limit", ["Function", ["Divide", ["Sin", "x"], "x"], "x"], 0]
This function evaluates to a numerical approximation when using expr.N()
. To
get a numerical evaluation with expr.evaluate()
, use NLimit
.
["NLimit", fn, value]
Evaluate the expression fn as it approaches the value value.
["NLimit", ["Divide", ["Sin", "_"], "_"], 0]
// ➔ 1
["NLimit", ["Function", ["Divide", ["Sin", "x"], "x"], "x"], 0]
// ➔ 1
The numerical approximation is computed using a Richardson extrapolation algorithm.