$$ \newcommand{\RR}{\mathbb{R}} \newcommand{\QQ}{\mathbb{Q}} \newcommand{\CC}{\mathbb{C}} \newcommand{\NN}{\mathbb{N}} \newcommand{\ZZ}{\mathbb{Z}} \newcommand{\EE}{\mathbb{E}} \newcommand{\HH}{\mathbb{H}} \newcommand{\SO}{\operatorname{SO}} \newcommand{\dist}{\operatorname{dist}} \newcommand{\length}{\operatorname{length}} \newcommand{\uppersum}[1]{{\textstyle\sum^+_{#1}}} \newcommand{\lowersum}[1]{{\textstyle\sum^-_{#1}}} \newcommand{\upperint}[1]{{\textstyle\smallint^+_{#1}}} \newcommand{\lowerint}[1]{{\textstyle\smallint^-_{#1}}} \newcommand{\rsum}[1]{{\textstyle\sum_{#1}}} \newcommand{\partitions}[1]{\mathcal{P}_{#1}} \newcommand{\erf}{\operatorname{erf}} \newcommand{\ihat}{\hat{\imath}} \newcommand{\jhat}{\hat{\jmath}} \newcommand{\khat}{\hat{k}} \newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}} \newcommand{\smat}[1]{\left(\begin{smallmatrix}#1\end{smallmatrix}\right)} $$

Assignment 11

Problems

In this assignment you are a mathematician / data scientist employed by the San Francisco Parks and Recreation department, tasked with helping design signange for the new park by Ocean Beach authorized via Ballot Initiative during the recent election. All three problems on the assignment will be part of this common story. Some helpful details: the new park will constructed on a strip of land between golden gate park and the ocean, on the current location of the Great Highway and nearby sand dunes. You are put in charge of a rectangular region of the park which will be preserved as a bird sanctuary, and contain a single circular hiking trail for birdwatchers to observe nesting behavior with minimal intereference.

Bird watchers from across the state are already planning trips during the breeding season of the Snowy Plover, and many of these semi-professional bird watchers are quite nerdy, data - driven individuals. The Parks and Rec department has already received many emails asking for exact details about the bird sanctuary region and the hiking trail (even though it is still under construction!)

Here are several excerpts of their messages.

To Whom it May Concern:

I have been searching for months for a certain subspecies of snowy plover, and am optimistic this new SF park will be the correct place. This subspecies is very particular about the elevation of its nest above sea level, and so before booking a trip I would like to enquire what is the range of elevations encountered by the hiking trail, as well as its average elevation?“

Dear Parks and Rec:

I’m curious, how large is the portion of the park set aside for a bird sanctuary? I hope there are enough acres that we may expect nesting of some of the more territorial seabirds.

Your boss, after getting dozes of such emails, has decided that the Parks Department must produce a very detailed sign for the bird sanctuary, else they will be getting these emails from every visitor! The proposed sign looks like this:

Ocean Beach Bird Sanctuary:

Total Park Area = ?

Trail Stats:

Max Elevation = ?

Min Elevation = ?

Average Elevation = ?

You’ve been tasked with filling in the question marks for this sign. A radar scan of the beachfront revealed that the park is well-modeled by the following elevation function (I’ve chosen here to use units where the numbers are convenient for calculation, instead of realistic)

  • \(H(x,y)=6+x-y^2\) for \(x\in[-3,3]\) and \(y\in[-2,2]\)
  • In terms of \((x,y)\), the hiking trail is a circle \(C\) of radius \(2\) centered at \((0,0)\).

High Points and Low Points

What is the highest and lowest elevation the trail will reach? At which points \((x,y)\) do these occur? Hint: this doesn’t need any of our new material!

Average Trail Elevation

In Calculus I you learn the average value of a function on an interval is the integral divided by the interval’s length: \(\mathrm{avg}(f)=\frac{1}{b-a}\int_a^b f\,dx\). This same idea carries over to integrals along curves: the average value of \(f\) along a curve \(C\) is the Line Integral of \(f\) along \(C\) divided by the length of \(C\).

Use this idea to find the average elevation of the hiking trail. Hint: first parameterize \(C\).

Overall Park Stats

You notice your boss has filled in the park area portion of the sign with 24. You ask how they got this and they reply they simply used the length and width of the rectangular plot of land. But you know this is wildly incorrect! The landscape itself is not a flat rectangle but a very hilly and sloped piece of dunes. The true park area is the surface area of the landscape within these rectangular borders. Do a surface integral to find the area of this new park.

Hint: the integral you set up here is going to be best done with a trig sub. I’ll help out with a bit of it: the sub \(y=\frac{\tan \theta}{\sqrt{2}}\) is helpful, and its also nice to know that \[\int \sec^3\theta d\theta =\frac{1}{2}\sec x\tan x +\frac{1}{2}\ln|\sec x+\tan x|\]

Whether you convert the bounds or sub back, feel free to use a calculator to evaluate the final nubmer!

Solutions

Peaks and Valleys

We are looking for maxes and mins of the elevation function \(H(x,y)\) constrained to the hiking trail, so this is a natural place to employ Lagrange multipliers. First, we need to write our constraint as a level set. We were told it is a circle of radius 2 centered at the origin so this is \(x^2+y^2=4\). Taking the gradients of our function \(H\) and constraint \(g\) we find

\[\nabla H = \langle 1,-2y\rangle\hspace{1cm}\nabla g = \langle 2x,2y\rangle\]

To find constrained maxes and mins we set \(\nabla H =\lambda \nabla g\) and solve the resulting system of equations

\[\left\{ \begin{matrix} 1 =\lambda 2x\\ -2y=\lambda 2y\\ x^2+y^2=4 \end{matrix} \right\} \]

The second equation implies that either \(y=0\) or \(\lambda = -1\) so we follow these two paths separately. If \(y=0\) the third equation implies that \(x^2=4\) so \(x=\pm 2\) yielding two critical points \((2,0)\) and \((-2 0)\). If instead \(\lambda=-1\) we can plug this into the first equation to see \(x=-1/2\), which then yields \(y\) upon substituting into the third:

\[x^2+y^2=4\,\implies\, \frac{1}{4}+y^2=4\,\implies\, y^2=\frac{15}{4}\] \[\implies y=\pm\sqrt{15}/2\]

This gives two more points \((-1/2, \sqrt{15}/2)\) and \((-1/2,-\sqrt{15}/2)\). To find the overall max and min, we need only plug these into \(H\) and choose the largest and smallest values:

\[H(2,0)=8\] \[H(-2,0)=4\] \[H\left(\frac{-1}{2},\frac{\sqrt{15}}{2}\right)=1.75\] \[H\left(\frac{-1}{2},\frac{-\sqrt{15}}{2}\right)=1.75\]

Thus the highest point along the hiking trail is at elevation 8 and the lowest is at elevation 1.75.

Average Trail Elevation

We are going to need to compute a line integral here so we better start parameterizing our curve. Its a circle of radius 2 about \((0,0)\), and the problem doesn’t say whether it goes clockwise or counterclockiwse (it won’t affect our answer) so we choose counterclockwise and write

\[c(t)=(2\cos t, 2\sin t)\]

From here we can find the infinitesimal arclength \(ds\) by calculating speed:

\[c^\prime(t)=(-2\sin t, 2\cos t)\,\implies\, |c^\prime(t)|=\sqrt{(-2\cos t)^2+(2\sin t)^2}=2\]

Thus, \(ds = 2dt\). To calculate the elevation along the hiking trail, we plug in the points \(c(t)\) of the trail to the elevation function \(H\):

\[H(c(t))=H(2\cos t, 2\sin t)= 6+2\cos t - (2\sin t)^2\]

This is all we need to find the line integral of \(H\) along \(C\):

\[\int_C H\,ds = \int_0^{2\pi} (6+2\cos t - 4\sin^2 t) 2 dt\]

This integral is best done in pieces: \[12\int_0^{2\pi}dt+4\int_{0}^{2\pi}\cos t - 8\int_0^{2\pi}\sin^2 t dt = 12(2\pi)+4(0)-8(\pi)=16\pi\]

To find the average elevation then, we need to divide this by the length of the circular trail. We know the circles radius is 2 so we can just use \(C=2\pi r\) to see the answer is \(4\pi\), or we can use the fact that we found \(ds=2dt\) and do the line integral \[\int_C ds = \int_0^{2\pi}2dt = 2t\Big|_0^{2\pi}=4\pi\]

In either case, we have the average

\[\mathrm{avg}(H)=\frac{16\pi}{4\pi}=4\]

Park Stats

To find the total area of the park, we need to compute the surface integral \(\iint_S dS\), where \(S\) is the surface given by the height function \(6+x-y^2\). The area element of this graph is \[dS = \sqrt{1+H_x^2+H_y^2}dxdy\] And computing \(H_x = 1\), \(H_y=-2y\) we find \[dS = \sqrt{1+(1)^2+(-2y)^2}=\sqrt{2+4y^2}\]

Because the park spans from \(-3\leq x\leq 3\) and \(-2\leq y\leq 2\), its area is given by the double integral

\[\iint_S dS = \int_{-2}^2\int_{-3}^3 \sqrt{2+4y^2}dxdy\]

The integral does not contain any \(x\)’s so the inside integral is easy: it just multiplies the result by \(6\). This leaves the integral \(6\int_{-2}^2 \sqrt{2+4y^2}dy\), which requires a trigonometric substitution. Using \(y=\tan x / \sqrt{2}\) we find

\[2+4y^2 = 2+4\frac{\tan^2 \theta}{2}=2+2\tan^2\theta = 2(1+\tan^2\theta)=2\sec^2\theta\]

Thus \(\sqrt{2+4y^2}\) becomes \(\sqrt{2\sec^2\theta}=\sqrt{2}\sec\theta\). We also need to sub for \(dy\), which is \[dy = d\left(\frac{\tan \theta}{\sqrt{2}}\right)=\frac{\sec^2\theta}{\sqrt{2}}d\theta\]

Putting this all together gives

\[\int \sqrt{2+4y^2}dy = \int \sqrt{2}\sec\theta\frac{\sec^2\theta}{\sqrt{2}}d\theta = \int\sec^3\theta d\theta\]

This integral we are given in the problem to equal \(\frac{1}{2}\sec \theta\tan \theta +\frac{1}{2}\ln|\sec \theta+\tan \theta|\). We need to evaluate this at the original bounds \(y=\pm 2\) so lets convert them to \(\theta\). Since \(y=(\tan\theta)/\sqrt{2}\) we see \(\theta = \mathrm{arctan}(2\sqrt{2})\approx 1.23\) and the bound \(y=-2\) similarly corresponds to \(\theta = -1.23\). Plugging these in gives

\[\int_{-2}^2\sqrt{2+4y^2}dy = \frac{1}{2}\sec \theta\tan \theta +\frac{1}{2}\ln|\sec \theta+\tan \theta|\Bigg|_{-1.23}^{1.23}\approx 10.248\]

Our entire surface integral is six times this, or

\[\mathrm{Area} \approx 61.49\]

The high elevation and bumps of the sand dunes certainly increases the area over your bosses incorrect estimate!

Note: If anyone is interested, there’s a more elegant way to plug in the bounds that results in an exact answer. When \(y=2\) we use \(y=\frac{\tan \theta}{\sqrt{2}}\) to see \(\tan\theta = 2\sqrt{2}\). Since \(\sec^2 \theta=\tan^2\theta +1\), we see \(\sec^2 \theta = 9\) so \(\sec \theta= 3\). Thus, plugging in \(y=2\) to our function is the same as plugging in \(\tan \theta=2\sqrt{2}\) and \(\sec \theta=3\):

\[ \frac{1}{2}\sec \theta\tan \theta +\frac{1}{2}\ln|\sec \theta+\tan \theta|= \frac{1}{2}6\sqrt{2} +\frac{1}{2}\ln|2\sqrt{2}+3|\]

Doing the same for \(y=-2\) we see \(\tan\theta =-2\sqrt{2}\), and the same calculation yields \(\sec\theta = 3\). Thus, the lower bound gives \(-\frac{1}{2}6\sqrt{2} +\frac{1}{2}\ln|-2\sqrt{2}+3|\). Subtracting these gives the exact value of the integral,

\[\begin{align} \int_{-2}^2 \sqrt{2+y^2}dy &= \left(\frac{1}{2}6\sqrt{2} +\frac{1}{2}\ln|2\sqrt{2}+3|\right)-\left( -\frac{1}{2}6\sqrt{2} +\frac{1}{2}\ln|-2\sqrt{2}+3|\right)\\ &= 6\sqrt{2}+\frac{1}{2}\ln\left|\frac{3+2\sqrt{2}}{3-2\sqrt{2}}\right|\\ &\approx 10.248028548277\ldots \end{align}\]