Introduction
Mathematical notions are acquired not only by solving problems, but looking at examples, too. The latter develops ability to represent mathematical objects intellectually. MuPAD provides tools for visualization of two- and three-dimensional objects. In the paper we focus on this particularly important feature of MuPAD. Thus, symbolic and exact computations will play less significant role here.
Mathematical problems given in this paper are devoted to "Triple integrals - integration by substitution". All examples are classical ones from a course of Calculus and Analysis. University and high technical school students will be our target group.
A schedule of class (without support of computer laboratory) could be proposed as follows:
- Subject: Substitution of variable in triple integrals.
- Duration: 90 min.
- Goal: Ability to apply appropriate methods of calculating multiple integrals.
- Familiar notions: Fubini's theorem; normal region; Jacobi matrix. Theoretical knowledge concerning a lecture on substitution of variables in multiple integrals.
- Skills: Calculating triple integrals over normal region.
Content of teaching and training: Solving exercises to lecture course. - Activity: Discussion, individual work.
- Didactic means of support: Blackboard, handbook.
- Achievements: Student is able to apply an integration by substitution theorem to the case of triple integral:
- chooses appropriate diffeomorphism;
- calculates Jacobian determinant;
- transforms given integral into an integral over normal region.
MuPAD software supports and enriches teaching mathematics. Obviously, in a case of class with support of MuPAD software the above schedule should be modified in the following manner:
- Skills: Ability to compute triple integrals over normal region; basics in operating computer.
- Activity: Discussion, individual work, presentation.
- Didactic means of support: Blackboard, handbook, computer, mathematical software MuPAD, LAN, WAN.
- Organization form: Computer laboratory.
In first section we recall relevant theorems and formulas. Then we provide some problems solutions of which are based on application of spherical coordinates. In next sections we present problems related to cylinder coordinates, and, once more, spherical coordinates (simplex). We precede each collection of problems by recalling necessary notions and facts.
I would like to emphasize that I did not aim to deliver complete solutions to the problems. I rather concentrated on suitable presentation of surfaces bounding region of integration. My experience in teaching Calculus shows that this particular issue seems to be the most difficult for students.
Integration in spherical coordinates
We start with the basic facts we use in this section:

Example 1. Plot the surface given by the following formulae:

Solution 1. The part of a code uses Fact 1. i.e. relation between spherical and cartesian coordinates:
Obj:=plot::Surface(
[2*cos(u)*cos(v),2*sin(u)*cos(v),2*sin(v)],
u=0..2*PI,v=-PI/2..PI/2
):
plot(Obj,Scaling=Constrained)
Solution 2. To generate graph in spherical coordinates we use the plot::Spherical command:
Obj1:=plot::Spherical(
[2,u,z],u=0..PI, z=0..2*PI):
plot(Obj1, Scaling=Constrained)
Example 2. Plot the surface given by the following formulae:

Solution. The presented MuPAD code uses relation between spherical and cartesian coordinates (Fact 1.):
Obj:=plot::Surface(
[2*cos(u)*cos(v),2*sin(u)*cos(v),2*sin(v)],
u=0..2*PI,v=-PI/2..0
):
plot(Obj, Scaling=Constrained)
Problem 1
Compute the following integral
over an interior V of a sphere
Solution
We will start by visualizing the region of integration. We get an equation of the surface

in spherical coordinates by writing the following MuPAD instructions:
simplify(
subs(
x^2+y^2+z^2=x,
x=cos(u)*cos(v)*r,y=r*sin(u)*cos(v), z=r*sin(v)
)
);
![]()
Since r >= 0, we can plot the surface using the code:
Obj:=plot::Surface(
[(cos(u)*cos(v))^2, cos(u)*sin(u)*cos(v)^2, cos(u)*cos(v)*sin(v)]
u=0..PI,v=-PI/2..PI/2):
plot(Obj, Scaling=Constrained);
Now, let us calculate the Jacobian. This part of a code uses linalg package:
A:=matrix([
[diff(r*cos(u)*cos(v),u), diff(r*cos(u)*cos(v),v),diff(r*cos(u)*cos(v),r)],
[diff(r*sin(u)*cos(v),u), diff(r*sin(u)*cos(v),v),diff(r*sin(u)*cos(v),r)],
[diff(r*sin(v),u), diff(r*sin(v),v), diff(r*sin(v),r)]
]); linalg::det(A): simplify(%);
Now let us compute the integral. Applying the instructions:
assume(r>=0): simplify( subs(sqrt(x^2+y^2+z^2), x=cos(u)*cos(v)*r, y=r*sin(u)*cos(v), z=r*sin(v) ) );
We integrate by using the function int. By theorem of substitution of variables and the above results we are now able to integrate:
int(r^3*cos(v),r=0..cos(u)*cos(v)): int(%,u=0..PI): int(%,v=-PI/2..PI/2);
Problem 2
Compute an integral
over a region V bounded by the surface
Solution
We repeat the steps of the solution of Problem 1.
First we will visualize the region of integration. Here is the code generating model of the surface (for a = 7, b = 5, c = 2):
Obj:=plot::Surface [7*cos(u)*cos(v),5*sin(u)*cos(v),2*sin(v)], u=0..2*PI,v=-PI/2..PI/2): plot(Obj,Scaling=Constrained);
Next we will obtain Jacobian determinant:
MA:=matrix([
[diff(r*a*cos(u)*cos(v),u), diff(a*r*cos(u)*cos(v),v), diff(a*r*cos(u)*cos(v),r)],
[diff(b*r*sin(u)*cos(v),u), diff(b*r*sin(u)*cos(v),v), diff(b*r*sin(u)*cos(v),r)],
[diff(c*r*sin(v),u), diff(c*r*sin(v),v), diff(c*r*sin(v),r)]
]): linalg::det(MA): simplify(%);
![]()
We obtain the integral applying theorem about substitution of variables:
int(r^2*a*b*c*r^2*cos(v),r=0..1): int(%,u=0..2*PI): int(%,v=-PI/2..PI/2)

Problem 3
Compute the volume of region bounded by surface:

Solution
First we visualize the region of integration. Here is the code generating model of the surface for a = 3, b = 1, c = 2 (we use generalized spherical coordinates):
Obj:=plot::Surface( [3*(cos(u))^3*(cos(v))^3,(sin(u))^3*(cos(v))^3,2*(sin(v))^3], u=0..2*PI, v=-PI/2..PI/2): plot(Obj,Scaling=Constrained):
The reader is strongly suggested to complete the rest steps of solution.
Problem 4
Compute the volume of a region bounded by the surfaces:
Solution
Region of integration.
Code generating model of the surface:
Obj:=plot::Surface( [6*(sin(u)*cos(v))^2*(cos(u))^2*(cos(v))^2, 6*(sin(u)*cos(v))^2*(sin(u))^2*(cos(v))^2, 6*(sin(u)*cos(v))^2*(sin(v))^2], u=0..PI/2,v=0..PI/2): plot(Obj,Scaling=Constrained):
We advise the reader to complete a solution.
Problem 5
Compute the volume of a region bounded by surfaces:
The solution we will leave to the readers. Below we show only the model of the surface.
Model of a surface (for a = 1, b = 1, c = 1).
Problem 6
Compute the volume of a region bounded by surfaces:
for x=0, y=0 and z=0.
The reader will complete the computations in detail. Below we show only the model of the surface.
Model of a surface (for a = 1, b = 1, c = 1).
All interactive images in this article were produced with MuPAD and JavaView by M.Majewski