Calculus 2, Lab 3: Arc length and surface area#
For this tutorial, you will do some of your work on paper, and some using the computer.
(You can do it entirely on the computer if you are comfortable with typing up your work using Markdown and LaTeX.)
Arc length (again)#
Recall that the length of a curve \(y=f(x)\), \(a\leq x\leq b\), is given by
Suppose \(f\) is a one-to-one function, and that our curve can also be given by \(x=g(y)\), where \(g=f^{-1}\) is the inverse of \(f\).
In the derivation of the arc length formula, instead of writing \(\Delta x^2+\Delta y^2 = \left(1+\left(\frac{\Delta y}{\Delta x}\right)^2\right)\Delta x^2\), we could have equally well written \(\Delta x^2+\Delta y^2 = \left(\left(\frac{\Delta x}{\Delta y}\right)^2+1\right)\Delta y^2\).
This leads to an alternate formula for arc length: if \(x=g(y)\), for \(c\leq y\leq d\), then
Before proceeding, make sure to execute the next cell:
import sympy as sy
import numpy as np
sy.init_printing()
Problem 1#
Consider the curve \(y=\sqrt{x}\), for \(0\leq x\leq 4\).
(a) Set up the integral to compute the length of this curve, and explain why it’s improper.
(b) Set up another integral to compute the length of the curve, by first writing \(x\) as a function of \(y\).
(c) Compute the arc length exactly, using SymPy. Then use the evalf()
function to get a decimal value for the length.
(d) Using the midpoint rule program from Tutorial 3, evaluate the integral from part (a) numerically, using 100 subintervals.
(e) Using the midpoint rule program from Tutorial 3, evaluate the integral from part (b) numerically, using 100 subintervals.
(f) Using the Simpson’s rule program from Tutorial 3, evaluate the integral from part (b) numerically, using 100 subintervals.
(g) Compare your answers from parts (d), (e), and (f) to the value from part (c). Which one is most accurate?
Note: the easiest way to compare is to subtract each estimate from the value found in part (c). For example, you might enter something like sy.integrate(s,(y,0,2)).evalf()-midpoint(f,0,4,100)
.
(h) Why can’t we use Simpson’s rule for the integral from part (a)?
Some reminders:#
the syntax for integration in SymPy is
sy.integrate(f,(x,a,b))
you can define a SymPy function by simply writing
f =
, followed by an expression in terms of xdon’t forget that for SymPy you’ll need to include
x = sy.symbols('x')
to define x as a symbol!for a Numpy function, you need to use the syntax
def f(x):
. (The second line is indented, begins withreturn
, and then gives an expression in x.) There is also the “lambda” method if you want a shortcut.click the “+” button in the toolbar to get more code cells!
Surface area#
Suppose that a curve of the form \(y=f(x), a\leq x\leq b\) (or \(x=g(y), c\leq x\leq d\)) is revolved about an axis.
To keep things reasonable, the axis should be either horizontal or vertical.
The surface area of the surface generated in this way is given by an integral of the form
where \(ds\) is the arc length element (either \(\sqrt{1+f'(x)^2}\,dx\) or \(\sqrt{1+g'(y)^2}\,dy\), depending on setup), and \(R\) is the “radius” of the circle travelled by a point on the curve: the distance from the curve to the axis of rotation.
In this sketch, we have a horizontal axis \(y=h\), and \(y=f(x)\), so \(R(x)=f(x)-h\) is the distance from the curve to the axis. You will find that in most examples, we use the \(x\) axis (so \(h=0\)), because for integrals done by hand, there is often a significant difference in difficulty between the integral of \(f(x)\sqrt{1+f'(x)^2}\) and \(\sqrt{1+f'(x)^2}\).
If we were to write \(x=g(y)\) for this curve (we wouldn’t, for this particular curve, because the function is not one-to-one, but hypothetically…), then \(R(y)=y-h\) and \(ds=\sqrt{1+g'(y)^2}\,dy\).
For a vertical axis \(x=k\), we would have either \(R(x)=x-k\) or \(R(y)=g(y)-k\), depending on the variable of integration.
Problem 2#
Consider again the curve \(y=\sqrt{x}\), \(0\leq x\leq 4\). Set up the following integrals to compute surface area:
(a) When revolved about the \(x\) axis, using \(x\) as the integration variable.
(b) When revolved about the \(x\) axis, using \(y\) as the integration variable.
(c) When revolved about the \(y\) axis, using \(x\) as the integration variable.
(d) When revolved about the \(y\) axis, using \(y\) as the integration variable.
Then, use the computer to evaluate each integral (or compute the integrals by hand), and confirm that your answers for (a) and (b) are the same, and that your answers for (c) and (d) are the same.