MATH 156 LAB 7Topic 1: Area between two curves.We have seen how to graph two functions simultaneously. We have also seen how to solve equations. With these two processes, we can calculate the area between two curves. Example: Find the area between the parabola NiMvJSJ5RyomIiIjIiIiKiQlInhHRiZGJw== and the line NiMvJSJ5RywmKiYiIiMiIiIlInhHRighIiIiIiVGKA==.f:=x->2*x^2;g:=x->-2*x+4;plot({f(x), g(x)}, x=-3..3);By looking at the graph it seems rather obvious that the two curves intersect when NiMvJSJ4RyIiIg== and when NiMvJSJ4RywkIiIjISIi. We can verify that by setting the two equations to be equal and solving:solve(f(x)=g(x), x);For later purposes it will be interesting to give names to the two solutions. We achieve this by labeling the result of the previous command by solv:solv:=solve(f(x)=g(x), x);Now we can recover the two solutions as solv[1] and solv[2]:solv[1];solv[2];To find the area between the two curves we use the formula NiMtJSRpbnRHNiQsJi0lImZHNiMlInhHIiIiLSUiZ0dGKSEiIi9GKjslImFHJSJiRw==where the NiMtJSJmRzYjJSJ4Rw== is the top function and NiMtJSJnRzYjJSJ4Rw== is the bottom function. Also NiMlImFH is the NiMlInhH-coordinate of the point furthest left and NiMlImJH is the NiMlInhH-coordinate of the point furthest to the right on the region we study. Since in our example NiMyLSUiZkc2IyUieEctJSJnR0Ym in the region we are interested, we do:A:=Int(g(x)-f(x), x=solv[2]..solv[1]);value(A);Check this answer by doing the integration. As you see it is not too difficult to find this area even without Maple. However things can get more complicated and we need Maple to help us. In the next example the expressions for the common points between the two curves contain square roots.Find the area between the curve NiMvLSUiZkc2IyUieEcsJkYnIiIiRilGKQ== and NiMvLSUiZ0c2IyUieEcqJEYnIiIj. Plot them first! Use the solve command to find the common points of the two graphs.Things can get uglier when Maple cannot even find the common points exactly:Find the area between the two curves NiMvJSJ5RyokJSJ4RyIiJw== and NiMvJSJ5RywmJSJ4RyIiIiIiI0Yn. Plot them first! Use the solve command to find the common points of the two graphs.With the solve commend we find one point of intersection at NiMvJSJ4RywkIiIiISIi, which we could see on the graph. The other expressions that Maple shows imply that Maple cannot exactly calculate the roots. However it can approximate them with the fsolve command:solv:=fsolve(f(x)=g(x), x=-1.5..1.5);Now find the area between the two graphs.Topic 2: Volumes of revolution.We would like to see graphically the solids of revolution when we rotate NiMvJSJ5Ry0lImZHNiMlInhH around the NiMlInhH-axis between NiMvJSJ4RyUiYUc= and NiMvJSJ4RyUiYkc=. For this we need graphing in 3 dimensions and parametric plots.Example: Show the solid of revolution, when we rotate NiMvJSJ5RywmKiQlInhHIiIjIiIiRikhIiI= around the NiMlInhH-axis between the NiMlInhH-intercepts of NiMvJSJ5RywmKiQlInhHIiIjIiIiRikhIiI=.f:=x->x^2-1;NiM+JSJmR2YqNiMlInhHNiI2JCUpb3BlcmF0b3JHJSZhcnJvd0dGKCwmKiQpOSQiIiMiIiJGMUYxISIiRihGKEYosolve(f(x)=0,x);NiQiIiIhIiI=So the NiMlInhH-intercepts are -1 and 1. The plotting command is:plot3d([x, f(x)*cos(t), f(x)*sin(t)], x=-1..1, t=0..2*Pi, axes=BOXED);In case you need to revolve around the NiMlInlH-axis, first of all you need a function of NiMlInlH: NiMvJSJ4Ry0lImdHNiMlInlH and the NiMlInlH-limits NiQlImNHJSJkRw==. The command is plot3d([g(y)*cos(t), g(y)*sin(t), y], y=c..d, t=0..2*Pi).Maple allows you to compute the volume of revolution directly. For this we need the student package and more precisely a part of it for Calculus:with(Student[Calculus1]):V:=VolumeOfRevolution(f(x), x=-1..1, output=integral,axis=horizontal);value(V);The option output=integral asks Maple to show the integral for the volume of revolution. The option axis=horizontal tells Maple that we are rotating around the NiMlInhH-axis. There is another method of plotting the solid of revolution. It uses the optiom output=plot:VolumeOfRevolution(f(x), x=-1..1, output=plot,axis=horizontal);Explain why the integral above is the correct one. Recall the disc method.With Maple we can also plot and compute the volume of revolution between two curves. Here is the sphere with a hole in the middle, rotated by 90 degrees.f:=x->sqrt(1-x^2);g:=x->1/2;solv:=solve(f(x)=g(x),x);spher:=plot3d([x, f(x)*cos(t), f(x)*sin(t)], x=solv[1]..solv[2],t=0..2*Pi, axes=BOXED, scaling=constrained):hole:=plot3d([x, g(x)*cos(t), g(x)*sin(t)], x=solv[1]..solv[2], t=0..2*Pi, axes=BOXED):plot3d([x, g(x)*cos(t), g(x)*sin(t)], x=solv[1]..solv[2], t=0..2*Pi, axes=BOXED);with(plots):display(hole,spher);VolumeOfRevolution(f(x), g(x), x=solv[1]..solv[2], output=plot, axis=horizontal, scaling=constrained);W:=VolumeOfRevolution(f(x), g(x), x=solv[1]..solv[2], output=integral, axis=horizontal);Explain why this is the correct integral. Recall the washer method.As you can see the plotting in the student package is not better than our own.Show the solid of revolution when we revolve NiMvLSUiZkc2IyUieEctJSVzcXJ0RzYjLCYiIiUiIiIqJEYnIiIjISIi around the NiMlInlH-axis. Compute the volume. Notice that we need to solve for NiMvSSJ4RzYiLUklc3FydEdGJTYjLCYiIiUiIiIqJEkieUdGJSIiIyEiIg== . In fact NiMvSSJ5RzYiLUklc3FydEdGJTYjLCYiIiUiIiIqJEkieEdGJSIiIyEiIg== gives NiMvKiRJInlHNiIiIiMsJiIiJSIiIiokSSJ4R0YmRichIiI=, which gives NiMvKiRJInhHNiIiIiMsJiIiJSIiIiokSSJ5R0YmRichIiI= and finally NiMvSSJ4RzYiLUklc3FydEdGJTYjLCYiIiUiIiIqJEkieUdGJSIiIyEiIg==. The range of NiNJInlHNiI= is again 0 to 2.f:=x->sqrt(4-x^2);If you have covered the cylindrical shell method in class, explain the integral above. Recall the cylindrical shells method.Rotate around the NiMlInlH-axis the ellipse with equation NiMvLCYqJiUieEciIiMiIiohIiIiIiIqJiUieUdGJyIjXEYpRipGKg==. Graph the solid of revolution and compute its volume. Use BOTH methods of graphing, i.e. the one out of the student package and the one with plot3d. Be careful to graph all of the solid of revolution, not just half of it.We solve for NiMlInlH to get NiMvJSJ4RyomIiIkIiIiLSUlc3FydEc2IywmRidGJyomJSJ5RyIiIyIjXCEiIkYwRic=. The NiMlInlH-limits are -7 and 7.If you have covered the cylindrical shell method in class, explain the integral using cylindrical shells.