Question: What is the meaning of "Calculate the volume integral of f over the sphere of radius r"

I was working through some example problems and came across this statement.  Actually comparing Sympy results to Maple. (I prefer Maple).

"Calculate the volume integral of f(...) over the sphere of radius r"

I can solve the problem, but, got hung up on the exact meaning of the problem statement.

Tom Dean

restart
with(VectorCalculus):
with(LinearAlgebra):

## http://www.acme.byu.edu/wp-content/uploads/2017/08/Sympy.pdf
## Problem 7

f := proc(x, y, z)
    (x^2 + y^2 + z^2)^2
end proc;

(M, d) := Jacobian([rho*sin(phi)*cos(theta),
                    rho*sin(phi)*sin(theta),
                    rho*cos(phi)],
                   [rho, phi, theta],
                   'determinant' );
abs(d);
simplify(%);

eqn := f(rho*sin(phi)*cos(theta), rho*sin(phi)*sin(theta), rho*cos(phi));
eqn := eqn * abs(simplify(d));

soln := int(eqn,[rho=0..r,theta=0..2*Pi,phi=0..Pi]);
subs(r=3, soln);

 

Please Wait...