- #1
lmannoia
- 32
- 0
Homework Statement
The question is to use MATLAB to evaluate a triple integral in spherical coordinates to find the mass density of the solid inside the cone z = (3x^2 + 3y^2)^.5 and below z = 5 where the mass density at (x,y,z) is equal to the z coordinate of the point.
Homework Equations
This is what I was doing. I'm using p for rho, f for phi, and t for theta to type it into matlab. I'm saying that p goes from 3 (or 0, I'm not sure...) to 5sec(f). Then f goes from 0 to pi/6 and t goes from 0 to 2pi. I'm integrating p^3*cos(f)*sin(t). I typed it in as:
syms p f t
int(int(int(cos(f)*sin(t)*p^3,p,3,5*sec(f)),f,0,pi/6),t,0,2*pi)
but MATLAB tells me that the answer is 0, which definitely isn't true, which means that I did something wrong somewhere! I know this might be hard to follow, but can someone spot my mistake?