In this lab you will explore how Mathematica can be used to work with change of variables.
To verify that is the incremental volume element in spherical coordinates, we can use the change of variable formulas and calculate the Jacobian. First define the change of variable formulas,
x = p Sin[u] Cos[v]; y = p Sin[u] Sin[v]; z = p Cos[u];Here we use , and . A vector in Mathematica is a list and a matrix is a list of lists, so the Jacobian matrix for this change of variables is given by,
jac = {{D[x,p],D[x,u],D[x,v]}, {D[y,p],D[y,u],D[y,v]}, {D[z,p],D[z,u],D[z,v]}}; MatrixForm[jac]The MatrixForm command is used to display lists of lists in the usual form for a matrix. We now can use the Det command to find the determinate of this Jacobian matrix,
detjac = Simplify[Det[jac]]and we should get .
Find the volume bounded by the graphs of and z=100.
First look at a graph,
Clear[x,y,z] f[x_,y_] = 9 (x - y)^2 + 4 (x + y)^2 Plot3D[f[x,y],{x,-5,5},{y,-5,5},PlotRange -> {0,100}, ClipFill -> None, PlotPoints -> 40] ContourPlot[f[x,y],{x,-5,5},{y,-5,5},PlotPoints -> 40, Contours -> {5,10,20,35,60,100}, ContourShading -> False]The Clear command erases the definitions we used above. We then can look at a surface plot and a contour plot to see what the region looks like. In this case, contour lines look like ellipses whose major and minor axes or on the lines . Our domain for limits of integration are not easily described as functions of x and y, so a change of variables is probably the best way to go. Based on the form of the function, try
u = 3 (x-y); v = 2 (x+y);The new area element is then found by
detjac = Simplify[Det[{{D[u,x],D[u,y]},{D[v,x],D[v,y]}}]]Which means that or . To see how this simplifies the geometry, first solve for x and y in terms of u and v,
Clear[u,v,x,y] Simplify[Solve[{u == 3 (x - y), v == 2 (x + y)},{x,y}]]Then graph the function f in terms of these new variables,
Plot3D[f[u/6+v/4,v/4-u/6],{u,-10,10},{v,-10,10}, PlotRange -> {0,100},ClipFill -> None, PlotPoints -> 40 ContourPlot[f[u/6+v/4,v/4-u/6],{u,-10,10},{v,-10,10}, PlotPoints -> 40,Contours -> {5,10,20,35,60,100}, ContourShading -> False]To see our function in terms of the new variables,
z=Simplify[f[u/6+v/4,v/4-u/6]]which would lead us to make another (more familiar) change of variables to polar coordinates (for u and v). Thus to calculate the volume we would
Clear[z] vol = Integrate[Integrate[Integrate[r/detjac,{z,r^2,100}], {r,0,10}],{theta,0,2 Pi}]where the integration in z has a lower limit of the bottom surface and an upper limit of 100, and the integration over x and y is change (twice) to an integration in polar coordinates of a circle of radius 10 (in the (u,v) domain).
Rework problem 26 on page 938 (section 15.4): Find of the ellipse . Try using the change of variables and . Investigate how this change of variables simplifies the domain and thus, the limits of integration. Then convert the integral,
into the new variables and integrate.