You will write three small functions that find the volume of a solid of revolution by adding up thin discs and thin washers. The checker uses a cone, a sphere and a washer.
The idea. A thin disc of radius and thickness has volume . Cut the interval from to into equal slices. Measure the radius at the middle of each slice, and add the disc volumes. A washer has an outer and an inner radius, and its volume is the difference of two discs.
Your tasks.
disc_volume(radius, thickness). Return the volume of one thin disc.solid_volume(f, a, b, n). Add up n discs, taking the radius f(x) at the middle of each slice.washer_volume(outer, inner, a, b, n). Add up n washers with the radii outer(x) and inner(x).Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…