Int - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


int

definite and indefinite integration

Int

inert form of int

 

Calling Sequence

Parameters

Options

Basic Information

Description

Notes

Examples

Compatibility

Calling Sequence

int(expression, x)

expressionⅆx

Int(expression, x)

expressionⅆx

int(expression, x=a..b)

abexpressionⅆx

Int(expression, x=a..b)

abexpressionⅆx

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)

 

Parameters

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

Options

• 

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.

Basic Information

• 

This help page contains complete information about the int and Int commands. For basic information, see the int help page.

Description

• 

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 );

xx

(1)

int( floor(t), t = 0..x ) assuming x > 0;

xx+xx+121x0otherwise

(2)
• 

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, PVabfⅆ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.

Notes

• 

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.

Examples

Basic Examples

intsinx,x

cosx

(3)

intsinx,x=0..π

2

(4)

intsin,a..b

cosacosb

(5)

intxx31,x

lnx13lnx2+x+16+3arctan2x+1333

(6)

intexpx2,x

πerfx2

(7)

intexpx2lnx,x=0..

πγ4πln22

(8)

intexpx2lnx,x

ⅇx2lnxⅆx

(9)

series,x=0,4

lnx1x+lnx3+19x3+Ox5

(10)

int,x

lnxx223x24x4lnx12+7x4144+Ox6

(11)

intexpx2lnx2,x=0..

π5216+γ2π8+γπln22+πln222

(12)

The inert version of the int function simply returns unevaluated.

f7x3+3x2+5x:

Intf,x

7x3+3x2+5xⅆx

(13)

Inert objects can be evaluated with the value command.

value

74x4+x3+52x2

(14)

A double integral

Intxy2,x=0..1,y=0..1

0101xy2ⅆxⅆy

(15)

intxy2,x,y

x2y36

(16)

intxy2,x=0..y,y=2..2

325

(17)

Integrals with Units

intt21Units2Unitms3,t=0..2Units

23m

(18)

intt21Units2Unitms3,t,useunits=t::Units

t33ms3tms

(19)

Using the useunits option to force incompatible dimensions will result in an error

intt21Units2Unitms3,t,useunits=t::Unitm

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)]

inttt2Unith2Unitmh3,1.Units..2.Units,numeric,useunits=Unith

0.0002777777278m

(20)

A units problem error can also come from an inherent units incompatibility between the limits of integration and the integrand

intt21Unith2Unitmh3,t=1Unitft..2Unitm

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

intt21Unith2Unitmh3,t=1Unitft..2Unitm,useunits=false

155696936595859375000m4h321191250m2h

(21)

Other Options

int1x+a2,x=0..2,continuous

2a2+a

(22)

int1x3,x=1..2,CauchyPrincipalValue

38

(23)

intFxHeavisidex1,x=1..3

13Fxⅆx

(24)

An Elliptic integral

int1sqrt2t43t22,t=2..3

5EllipticF73,5555EllipticF22,555

(25)

Integrating algebraic functions (only for RootOf notation)

fx21+31+x2131+x223xx2+22

fx21+3x2+113xx2+123x2+22

(26)

fconvertf,RootOf:

gintf,x

g3RootOf_Z3x21,index=12x2+2+3RootOf_Z3x21,index=122x2+2ln3RootOf_Z3x21,index=12+x2+3RootOf_Z3x21,index=1+2x2+22

(27)

evaladiffg,xf

0

(28)

Define a Maple operator using the unapply command.

funapplyx+y,x

fxx+y

(29)

intf,4..5

92+y

(30)

Specify the 'AllSolutions' option.

int1x,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

(31)

rint1x,x=a..2,AllSolutions

rundefineda<0a=0lna+ln20<a

(32)

rassuming0<a

lna+ln2

(33)

rassuminga<0

undefined

(34)

intabssinx&comma;x=0..2πmassumingm::integer

02πmsinx&DifferentialD;x

(35)

intabssinx&comma;x=0..2πm&comma;AllSolutionsassumingm::integer

4m

(36)

Compatibility

• 

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

int

IntegrationTools

inttrans[fourier]

inttrans[laplace]

inttrans[mellin]

iscont

limit

series

symbolic order integration

unapply

VectorCalculus

VectorCalculus[int]