Student[VectorCalculus]
int
computes the integral of a function
Calling Sequence
Parameters
Description
Examples
int(f, domain, output = output_type)
f
-
Vector(algebraic) or algebraic; specify the object to be integrated
domain
list(name)=domain_function or extra arguments to be passed to the top-level int command
output = output_type
(optional) equation; output_type can be one of integral or value.
The int(f, domain) command computes the integral of the function f over the region specified by domain.
If output=integral is specified, the command returns an unevaluated integral. If output=value is specified, the command returns the computed value of the integral. The default is output=value.
If f is an expression, domain must have the form list(name)=domain_function where domain_function is an unevaluated function call describing the region. If f is a Vector, the top-level int command is mapped over the components of f with domain passed to int as well as the extra arguments.
list(name) is a list specifying the variables of integration.
Specify the region of integration using unevaluated function calls. The possible regions of integration are Circle, Ellipse, Parallelepiped, Rectangle, Region, Sector, Sphere, Tetrahedron, and Triangle.
Circle(center, radius)
The first parameter, center, is the center of the circle and must have type Vector(2, algebraic). The second parameter, radius, is the radius of the circle and must have type algebraic. If a coordinate system attribute is specified on center, the center is interpreted in that coordinate system.
Ellipse(center, major, minor, angle)
The first parameter, center, is the center of the ellipse and must have type Vector(2, algebraic). The second and third parameters, major and minor, are the lengths of the semimajor and semiminor axes of the ellipse, respectively. The last parameter angle specifies the angle through which the ellipse is rotated from its standard position, in which its major axis is coincident with the x-axis. Note: The ellipse specified by this structure is obtained by first performing the rotation on an ellipse in standard position; this rotated ellipse is then translated to the point center.
Ellipse(expr)
The parameter expr must be an expression of type algebraic. The Ellipse is specified by the equation expr = 0. The two variable names that appear in expr must be the same as those specified in the left-hand side of domain. A Cartesian equation for a general conic section is of the form A⁢x2+B⁢x⁢y+C⁢y2+E⁢x+F⁢y+G=0, and specifies the locus of all points x,y that satisfy the equation; this locus is a non-degenerate, real ellipse if and only if three conditions hold:
Δ≔Determinant⁡2⁢A|B|E,B|2⁢C|F,E|F|2⁢G≠0
C⁢Δ<0
−4⁢A⁢C+B2<0
Parallelepiped(r1, ..., rk)
This specifies a k-dimensional region of integration. Each ri must have type algebraic..algebraic and the expressions in these ranges cannot depend on the variables of integration. The range ri specifies the integration interval for the ith variable of integration.
Rectangle(r1, r2)
This is a specialization of Parallelepiped to R^2. In the xy-plane, the integration has the order dx dy, and range r1 can be of the form x1(y)..x2(y), in contrast to the restrictions on ranges in Parallelepiped.
Region(r1, ..., rk)
This specifies a k-dimensional region of integration. Each ri must have type algebraic..algebraic and the ith range can only depend on the first i-1 variables. The integral over the region is transformed into an iterated integral. The range ri specifies the integration interval for the ith variable of integration.
Sector(object, start, finish)
The first parameter of Sector, object, must be a Circle or Ellipse structure. The parameters start and finish must be of type algebraic. This represents the sector of the specified Circle or Ellipse, starting at angle start radians and ending at angle finish radians.
For a Circle, an angle of 0 points in the positive x direction. For example, if start is 0 and finish is π2, it would represent the top-right quarter of a circle centered anywhere.
For an Ellipse, an angle of 0 points in the direction of one of its semimajor axes: the one in the right-half of the plane. If the Ellipse is vertical (its major axis is coincident with the y-axis), then the 0 angle points in the negative y direction. For example, consider an ellipse centered at the origin with a rotation of Pi/4 (its major axis sits on the line y = x). If start is −π4 and finish is π4, it would represent the region of the ellipse inside first quadrant of the plane. If the ellipse is not centered at the origin, these angles are treated as if the center of the ellipse were the origin.
Sphere(center, radius)
The first parameter, center, is the center of the sphere and must have type 'Vector'(3, algebraic). The second parameter, radius, is the radius of the sphere and must have type algebraic. If a coordinate system attribute is specified on center, the center is interpreted in that coordinate system.
Tetrahedron(v1, v2, v3, v4)
Each vi must have type 'Vector'(3, algebraic). These represent the vertices of the tetrahedron. If coordinate system attributes are specified on these Vectors, each vertex is interpreted in its own coordinate system.
Triangle(v1, v2, v3)
Each vi must have type 'Vector'(2, algebraic). These represent the vertices of the triangle. If coordinate system attributes are specified on these Vectors, each vertex is interpreted in its own coordinate system.
If integration is done in non-cartesian coordinates for the selected region, the integration variables are automatically substituted for a suitable set of coordinate names. A custom variable substitution can be achieved by adding an additional argument of type list(name), containing the desired variable names, to the region of integration.
with⁡StudentVectorCalculus:
int⁡x2+y2,x,y=Circle⁡0,0,r
π⁢r42
int⁡exp⁡−x2−y2−z2,x,y,z=Sphere⁡0,0,0,r
π⁢π⁢erf⁡r⁢ⅇr2−2⁢r⁢ⅇ−r2
int⁡exp⁡−x2−y2−z2,x,y,z=Sphere⁡0,0,0,1,r,φ,θ,inert
∫01∫0π∫02⁢πr2⁢ⅇ−r2⁢sin⁡φⅆθⅆφⅆr
int⁡x⁢y,x,y=Triangle⁡0,0,1,0,0,1
124
int⁡sin⁡x⁢cos⁡y⁢tan⁡z,x,y,z=Parallelepiped⁡0..π,0..π2,0..π4
ln⁡2
int⁡sin⁡xx,x,y=Rectangle⁡0..π2,0..π2
Si⁡π2⁢π2
int⁡1,x,y=Region⁡0..1,x2..x
16
int⁡x+y+z,x,y,z=Tetrahedron⁡0,0,0,1,0,0,0,1,0,0,0,1
18
int⁡x+y+z,x,y,z=Tetrahedron⁡0,0,0,1,0,0,0,1,0,0,0,1,inert
∫01∫01−t∫0−1+t⁢x−1+t1−tx+y+tⅆyⅆxⅆt
int⁡1,x,y=Ellipse⁡x24+y29−1
6⁢π
int⁡y2,x,y=Sector⁡Circle⁡0,0,r,0,π
π⁢r48
int⁡x,x,y=Sector⁡Ellipse⁡x24+y29−1,0,π2
4
int⁡t,t2,t3,t
See Also
Student[VectorCalculus][diff]
Student[VectorCalculus][Flux]
Student[VectorCalculus][limit]
Student[VectorCalculus][LineInt]
Student[VectorCalculus][PathInt]
Student[VectorCalculus][series]
Student[VectorCalculus][SurfaceInt]
Student[VectorCalculus][Vector]
Download Help Document