Products & Services Industries Academia Support User Community Company

Learn more about Symbolic Math Toolbox   

int - Integrate symbolic expression

Syntax

int(expr)
int(expr, v)
int(expr, a, b)
int(expr, v, a, b)

Description

int(expr) returns the indefinite integral of expr with respect to its symbolic variable as defined by symvar.

int(expr, v) returns the indefinite integral of expr with respect to the symbolic scalar variable v.

int(expr, a, b) returns the definite integral from a to b of expr with respect to the default symbolic variable. a and b are symbolic or double scalars.

int(expr, v, a, b) returns the definite integral of expr with respect to v from a to b.

Examples

Find indefinite integral of the following single-variable expression:

syms x; 
int(-2*x/(1 + x^2)^2)

The result is:

ans =
1/(x^2 + 1)
 

Find indefinite integral of the following multivariable expression with respect to z:

syms x z; 
int(x/(1 + z^2), z)

The result is:

ans =
x*atan(z)
 

Integral the following expression from 0 to 1:

syms x; 
int(x*log(1 + x), 0, 1)

The result is:

ans =
1/4
 

Integral the following expression from sin(t) to 1:

syms x t; 
int(2*x, sin(t), 1)

The result is:

ans =
cos(t)^2
 

Find indefinite integrals for the expressions listed as the elements of a matrix:

syms x t z;
alpha = sym('alpha');
int([exp(t), exp(alpha*t)])

The result is:

ans =
[ exp(t), exp(alpha*t)/alpha]

See Also

diff | symsum | symvar

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS