int
definite and indefinite integration
Int
inert form of int
Calling Sequence
Parameters
Options
Basic Information
Description
Notes
Examples
Compatibility
int(expression, x)
∫expressionⅆx
Int(expression, x)
int(expression, x=a..b)
∫abexpressionⅆx
Int(expression, x=a..b)
int(expression, [x, y])
int(expression, x=a..b, opt)
int(expression, [x=a..b, y=c..d, ...], opt)
Int(expression, x=a..b, opt)
int(f, a..b, opt)
int(f, [a..b, c..d, ...], opt)
Int(f, a..b, opt)
expression
-
algebraic expression; integrand
x,y
name; variable of integration
a, b, c, d
endpoints of interval on which integral is taken
f
operator; integrand
opt
(optional) a sequence of one or more of the options listed below
The following options, which are described in more detail in the sections below, apply to definite integrals only. Where indicated, some options take their default value from environment variables. An option has a default value of false if its corresponding environment variable is not set.
AllSolutions=truefalse
Specifies whether int considers all possible real values for any symbols in the limits of integration. The default value is taken from _EnvAllSolutions.
continuous=truefalse
Specifies whether int looks for discontinuities. continuous=true instructs int not to look for discontinuities. The default value is taken from _EnvContinuous.
CauchyPrincipalValue=truefalse
Specifies whether a principal value integral is computed, that is, whether infinities are allowed to cancel in some cases. The default value is taken from _EnvCauchyPrincipalValue.
method=value
Specifies which internal integration routine(s) to use. See int/methods for more details.
numeric=truefalse
Specifies whether numeric integration methods are used instead of symbolic methods. If numeric=true is specified, other numeric integration options can be specified. See evalf/Int for more details.
useunits=truefalse or useunits=list of unit specifications
Specifies whether to preprocess the arguments to make sure units are handled correctly. The default behavior is automatically detect units and handle them if detected. Specifying useunits=false can disable that handling if units should be treated as symbols. Specifying useunits=true can force handling in cases where the automatic detection fails, such as when the integrand is an operator that can return units.
Finally, this option can be used to specify the units of some or all of the variables involved in the integration useunits=[x::Unit(unit_1), y::Unit(unit_2)] for integrals of expressions and useunits=[Unit(unit_1), Unit(unit_2)] for integrals of operators. The units specified this way will override the units detected automatically, but an error will be generated if the units are not consistent.
This help page contains complete information about the int and Int commands. For basic information, see the int help page.
The int command computes an indefinite or definite integral of the expression expression with respect to the variable x. The name integrate is a synonym for int.
You can enter the command int using either the 1-D or 2-D calling sequence. For instance, int(f,x) is equivalent to ∫fⅆx.
Indefinite integration is performed if the second argument x is a name. Note that no constant of integration appears in the result. Definite integration is performed if the second argument is of the form x=a..b where a and b are the endpoints of the interval of integration.
If a and b are finite complex numbers, the int routine computes the definite integral over the straight line from a to b.
If the integrand is specified as a Maple operator f, then the second argument must be a range a..b and not an equation, that is, a variable of integration must not be specified.
If Maple cannot find a closed form expression for the integral, the function call itself is returned.
The capitalized function name Int is the inert version of the int function, which simply returns unevaluated. It appears gray so that it is easily distinguished from a returned int calling sequence. In this form, expression can be a procedure, which can be integrated numerically.
For numerical integration, use the option numeric. For more information on numerical integration, see evalf/Int.
If the second argument is a list, an iterated integration is performed on the variables or ranges in the order given. For definite integration, the list can be omitted and the ranges can be given as a sequence. For indefinite integration, the variables can be given as a sequence instead of a list if all variables appear in the expression being integrated. Otherwise, there may be confusion between variables and option names.
Handling Discontinuities
Note that the indefinite integral in Maple is defined up to a piecewise constant. Hence, the results returned by int may be discontinuous at some points. In many cases, you can ensure continuity by replacing an indefinite integration problem by the corresponding definite integral.
int( floor(x), x );
x⁢x
int( floor(t), t = 0..x ) assuming x > 0;
x⁢x+−x⁢x+121≤x0otherwise
For symbolic definite integration, two options control how discontinuities are handled. By default, int checks for discontinuities, and computes the integral as a sum of independent definite integrals, each of which involves an integrand which has no discontinuities in the interior of the interval of integration.
The 'continuous' option instructs int not to look for discontinuities.
The 'CauchyPrincipalValue' option instructs int to consider the limits from the left and right at each interior discontinuity as a single limit (so that the independent variable approaches the discontinuity at the same rate from the right and the left). This allows for positive and negative infinite limits to cancel.
You can opt to enter a Cauchy principal value integral in typeset 2-D math, PV⁢∫abfⅆx, by using command completion. For details, see Entering Commands in 2-D Math.
Returning the Entire Set of Solutions
The 'AllSolutions' option, if set, forces int to return the entire set of solutions for the specified definite integral. This applies only to parameters in the endpoints of the interval, not to parameters in the integrand.
Note: The results returned with the 'AllSolutions' option may not be valid for some non-real parameter values. The results are always valid for all real parameter values.
The Maple series function may be invoked on an unevaluated integral to compute a series expansion of the integral (when possible).
When int is applied to a series structure, the internal function `int/series` is invoked to compute the integral efficiently.
Basic Examples
int⁡sin⁡x,x
−cos⁡x
int⁡sin⁡x,x=0..π
2
int⁡sin,a..b
cos⁡a−cos⁡b
int⁡xx3−1,x
ln⁡x−13−ln⁡x2+x+16+3⁢arctan⁡2⁢x+1⁢333
int⁡exp⁡−x2,x
π⁢erf⁡x2
int⁡exp⁡−x2⁢ln⁡x,x=0..∞
−π⁢γ4−π⁢ln⁡22
int⁡exp⁡−x2⁢ln⁡x,x
∫ⅇ−x2⁢ln⁡xⅆx
series⁡,x=0,4
ln⁡x−1⁢x+−ln⁡x3+19⁢x3+O⁡x5
int⁡,x
ln⁡x⁢x22−3⁢x24−x4⁢ln⁡x12+7⁢x4144+O⁡x6
int⁡exp⁡−x2⁢ln⁡x2,x=0..∞
π5216+γ2⁢π8+γ⁢π⁢ln⁡22+π⁢ln⁡222
The inert version of the int function simply returns unevaluated.
f≔7⁢x3+3⁢x2+5⁢x:
Int⁡f,x
∫7⁢x3+3⁢x2+5⁢xⅆx
Inert objects can be evaluated with the value command.
value⁡
74⁢x4+x3+52⁢x2
A double integral
Int⁡x⁢y2,x=0..1,y=0..1
∫01∫01x⁢y2ⅆxⅆy
int⁡x⁢y2,x,y
x2⁢y36
int⁡x⁢y2,x=0..y,y=−2..2
325
Integrals with Units
int⁡t2−1⁢Unit⁡s2⁢Unit⁡ms3,t=0..2⁢Unit⁡s
23⁢m
int⁡t2−1⁢Unit⁡s2⁢Unit⁡ms3,t,useunits=t::Unit⁡s
t33⁢ms3−t⁢ms
Using the useunits option to force incompatible dimensions will result in an error
int⁡t2−1⁢Unit⁡s2⁢Unit⁡ms3,t,useunits=t::Unit⁡m
Error, (in Tools:-IntegrateExpression) units problem can't make expression (t^2-Units:-Unit(s^2))*Units:-Unit(m/s^3) unit-free with units [t::Units:-Unit(m)]
int⁡t↦t2−Unit⁡h2⋅Unit⁡mh3,1.⁢Unit⁡s..2.⁢Unit⁡s,numeric,useunits=Unit⁡h
−0.0002777777278⁢m
A units problem error can also come from an inherent units incompatibility between the limits of integration and the integrand
int⁡t2−1⁢Unit⁡h2⁢Unit⁡mh3,t=1⁢Unit⁡ft..2⁢Unit⁡m
Error, (in Tools:-IntegrateExpression) units problem can't make expression (t^2-Units:-Unit(h^2))*Units:-Unit(m/h^3) unit-free with units [t::Units:-Unit(ft)]
Turning off units processing can force a symbolic answer even when the units do not appear to be compatible. This may necessary to produce answers in some parametric cases, but in this example produces a sum of terms with incompatible dimensions
int⁡t2−1⁢Unit⁡h2⁢Unit⁡mh3,t=1⁢Unit⁡ft..2⁢Unit⁡m,useunits=false
155696936595859375000⁢m4h3−21191250⁢m2h
Other Options
int⁡1x+a2,x=0..2,continuous
2a⁢2+a
int⁡1x3,x=−1..2,CauchyPrincipalValue
38
int⁡F⁡x⁢Heaviside⁡x−1,x=−1..3
∫13F⁡xⅆx
An Elliptic integral
int⁡1sqrt⁡2⁢t4−3⁢t2−2,t=2..3
5⁢EllipticF⁡73,555−5⁢EllipticF⁡22,555
Integrating algebraic functions (only for RootOf notation)
f≔x2−1+3⁢1+x2131+x223⁢xx2+22
f≔x2−1+3⁢x2+113⁢xx2+123⁢x2+22
f≔convert⁡f,RootOf:
g≔int⁡f,x
g≔−3⁢RootOf⁡_Z3−x2−1,index=12⁢x2+2+3⁢RootOf⁡_Z3−x2−1,index=122⁢x2+2−ln⁡3⁢RootOf⁡_Z3−x2−1,index=12+x2+3⁢RootOf⁡_Z3−x2−1,index=1+2x2+22
evala⁡diff⁡g,x−f
0
Define a Maple operator using the unapply command.
f≔unapply⁡x+y,x
f≔x↦x+y
int⁡f,4..5
92+y
Specify the 'AllSolutions' option.
int⁡1x,x=a..2
Warning, unable to determine if 0 is between a and 2; try to use assumptions or use the AllSolutions option
∫a21xⅆx
r≔int⁡1x,x=a..2,AllSolutions
r≔undefineda<0∞a=0−ln⁡a+ln⁡20<a
rassuming0<a
−ln⁡a+ln⁡2
rassuminga<0
undefined
int⁡abs⁡sin⁡x,x=0..2⁢π⁢massumingm::integer
∫02⁢π⁢msin⁡xⅆx
int⁡abs⁡sin⁡x,x=0..2⁢π⁢m,AllSolutionsassumingm::integer
4⁢m
The int command was updated in Maple 2016; see Advanced Math Updates for Maple 2016.
The int command was updated in Maple 2021.
The method option was updated in Maple 2023.
See Also
DEtools[integrate_sols]
diff
elliptic_int
evalf
evalf/Int
IntegrationTools
inttrans[fourier]
inttrans[laplace]
inttrans[mellin]
iscont
limit
series
symbolic order integration
unapply
VectorCalculus
VectorCalculus[int]
Download Help Document