$$ \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 8

Problems

Heatshields on Rockets

You are working with several research teams at NASA who are trying to understand and model the heat flow along the nose cone of a rocket during re-entry. Below is a picture from a real simulation of this just for context (though you do not need this picture to solve the problem)

Waves of hot and cold on a nose-cone for a rocket traveling at hypersonic speeds.

You and your team use the heat equation as a model of this: if \(x\) is the distance along the nose cone (starting with \(x=0\) at the tip) and \(t\) is the time, then the temperature \(H(x,t)\) of the metal at point \(x\) and time \(t\) satisfies the equation

\[\frac{\partial H}{\partial t} = \lambda^2 \frac{\partial ^2 H}{\partial x^2}\]

Where \(\lambda\) is a positive constant that depends on the metal you choose to make the nose of the rocket out of (larger values of \(\lambda\) means that it conducts heat faster, smaller values mean it conducts heat slower).

Your team of atmospheric scientists tell you that during re-entry waves of plasma will be crashing over the nose cone, heating it up in a complicated pattern. Once this portion of the flight is over, the temperature distribution along the nose cone is expected to look like

Temperature distribution (as a function of \(x\) along the nose cone) at time \(t=0\).

Your team of theorists find an exact solution to the heat equation describing these plasma waves: it looks like this

\[H(x,t)=e^{-\lambda^2 t}\sin(\lambda x)\]

(You don’t have to turn this in, but it’s a good idea to verify this is a solution to the heat equation, by taking the derivatives on both sides and seeing the results are equal!)

Your team of mechanical engineers says that the materials they have built the nose cone out of have \(\lambda = 4\), but their measurement is only accurate to within \(\pm 0.1\). The rocket team plans to measure the temperature at the location \(x=\pi/2\) as a function of time. However, because the rocket is vibrating during re-entry, they can only measure position to within \(\pm 0.05\).

  • Use error analysis to figure out how far off the actual temperature reading might be from the predicted theoretical value by \(H(x,t)\) at \(t=0\).

\[dH = H_x dx + H_\lambda d \lambda\]

Optimization

You are once again working on the engineering team developing new rocket engines for the Artemis mission, where on a previous homework you submitted recommendations to your team members on how to modify the nozzle width and fuel temperature to increase efficiency. Now, you are tasked with taking this efficient design and trying to maximize the thrust during the initial burn to leave earth’s atmosphere, which is where most fuel gets used up.

Having already set the nozzle diameter and fuel temperature, you look to study the effect of two other variables: the overall radius of the rocket and the slope of the nose-cone (both of which greatly affect air resistance) on the net thrust. Your colleagues run a computational simulation of the atmospheric physics, and determine that the net force varies as a function of the radius \(r\) and slope \(s\) as

\[F(r,s)=8+4rs-4r^4-4s^4\]

Find the critical points of \(F\): these are the configurations that you and your engineering team should investigate more closely.

After figuring this out, what radius and slope should you recommend to the manufacturing team? (Remember radius should be a positive number, as its a length).

Directional Differentiation

A small bug is flying through the air in a room, where the temperature distribution (in degrees Celsius) is given by a scalar function \(T\colon \mathbb{R}^3\to\mathbb{R}\) \[T(x,y,z)=xy+yz+xyz-(x^2+y^2)\] The bug’s motion is modeled by a parametric curve \(\vec{c}\colon\mathbb{R}\to\mathbb{R}^3\): \[\vec{c}(t)=\left(1+t,\,\,\frac{t^2}{2}-1,\,\,\frac{1}{3}+t+\frac{t^3}{3}\right)\]

  • What is the temperature where the fly is at \(t=2\)?
  • How quickly is the temperature changing in the direction of the fly’s motion at \(t=2\)?

The fly is seeking out a plate of warm food in the room to land on, and evolution has endowed the fly with a simple strategy that works: at a given point \(\vec{p}\) in space, the fly should attempt to turn and fly towards the nearest warm object (that is, in the direction in which temperature in increasing the quickest).

  • From its position at \(t=2\), what (unit vector) direction should the fly head to approach the food most efficiently?
  • What is the angle between the current fly’s flightpath and this new optimal direction?

Solutions

Heatshields

The heat equation describes how a function measuring the heat of an object varies in both \(x\) and \(t\). It sets the first time derivative of \(H\) equal to (a positive multiple of) the second space derivative of \(H\). First derivatives measure the rate of change, and second derivatives measure concavity, so this equation says

The rate of change of \(H\) in time is proportional to the concavity of \(H\) in the \(x\) direction.

We can use this to understand qualitatively what happens over time: where a functions concavity is positive, the equation says \(\partial_tH\) is positive, so \(H\) is increasing. Similarly, if the concavity is negative, then \(H\) must be decreasing. Looking at the plot, this means the peaks (maxima, so negative concavity) are decreasing and the minima are increasing, so the temperature is evening out over time.

The heat equation causes \(H\) to even out over time.

For the error analysis, we need to compute \(H_x\) and \(H_\lambda\):

\[H_x=\frac{\partial}{\partial x}e^{-\lambda^2 t}\sin(\lambda x) = e^{-\lambda^2 t}\lambda \cos(\lambda x)\]

Now we need to evaluate this at the point we are interested in: \(\lambda = 4, x=\pi/2,\) and \(t=0\).:

\[H_x = e^{4^2\cdot 0}\cdot 4 \cdot \cos(4 \frac{\pi}{2})= 1\cdot 4\cdot 1=4\]

Similarly we need to find \(H_\lambda\) and evaluate at the values of interest. Since \(\lambda\) shows up twice in our formula, we are going to need to use the product rule:

\[H_\lambda = \frac{\partial}{\partial \lambda}e^{-\lambda^2 t}\sin(\lambda x)=-2\lambda e^{-\lambda^2 t}\sin(\lambda x)+e^{-\lambda^2 t}x\cos(\lambda x)\]

\[\begin{align*}H_\lambda &= -2\cdot 4\cdot e^{-4\cdot 0^2}\sin\left(0\cdot\frac{\pi}{2}\right)+e^{-4\cdot 0^2}\cdot \frac{\pi}{2}\cdot \cos\left(4\frac{\pi}{2}\right)\\ &= -2\cdot 4\cdot 1\cdot 0 + 1\cdot \frac{\pi}{2}\cdot 1\\ &=\frac{\pi}{2} \end{align*}\]

Thus we now know how to estimate the potential error \(dH\) in a heat measurement caused by our uncertainty in the material parameter \(\lambda\) and the sensor position \(x\):

\[\begin{align*} dH &= H_x dx + H_\lambda d\lambda\\ &= 4 dx + \frac{pi}{2} d\lambda\\ &= 4(0.05)+\frac{\pi}{2}(0.1)\\ &=0.35707\ldots \end{align*}\]

Thus, if our measurement is more than \(0.36\) or so away from the theoretical prediction, we know there’s an error in our experiment or theory somewhere!

Optimization

To optimize the behavior of this rocket, we are searching for maxima in \((r,s)\). That means we again must begin by finding critical points and classifying them. Starting with the gradient

\[\nabla F = \langle 4s-16r^3,4r-16s^3\rangle\]

As the critical points are where the gradient vanishes, this leads to the system of equations

\[\left\{s=4r^3,\, r=4s^3\right\}\]

Similar to the previous problem, we can subsitute one of these into the other to get an equation in a single variable:

\[s=4r^3=4(4s^3)^3= 4^4 s^9\]

Thus, either \(s=0\) (and hence \(r=0\) too) or we can divide by \(s\) and see that

\[1=4^4 s^8\,\,\implies\,\,\frac{1}{4^4}=s^8\]

Taking the fourth root of both sides gives

\[s^2=\frac{1}{4}\,\,\implies\,\, s=\pm\frac{1}{2}\]

Plugging these into the equation \(r=4s^3\) to get \(r\) in each case, we find three critical points:

\[\left\{(0,0),\left(\tfrac{1}{2},\tfrac{1}{2}\right),\left(\tfrac{-1}{2},\tfrac{-1}{2}\right)\right\}\]

Now to classify these we must apply the second derivative test:

\[H=\pmat{f_{xx}& f_{xy}\\ f_{xy}& f_{yy}}=\pmat{-48r^2 & 4\\ 4& -48s^2}\]

\[D=\det H = (-48r^2)(-48 s^2)-(4)(4)=48^2 r^2s^2-4^2\]

Plugging in the critical points, we find that

\[D(0,0)=-16\hspace{1cm}D(\tfrac{1}{2},\tfrac{1}{2})=144\hspace{1cm}D(\tfrac{-1}{2},\tfrac{-1}{2})=144\]

Thus \((0,0)\) is a saddle, and we need to look closer at the sign of \(f_{rr}\) to determine the other two extrema. In each case \(f_rr=-12>0\) so they are each maxima.

BUT: remember that \(r\) is a radius in the problem, and must be a positive number, so we can actually ignore this critical point - it doesn’t correspond to a buildable rocket. This means we should suggest the parameters

\[(r,s)=\left(\frac{1}{2},\frac{1}{2}\right)\]

to NASA, where the maximal value is \[F(1/2,1/2)=\frac{31}{4}\]

Directional Differentiation

At \(t=2\) we can find the fly’s location by just plugging in \(2\) to the parametric curve:

\[\vec{c}(2)=\left(1+2,\frac{2^2}{2}-1,\frac{1}{3}+2+\frac{2^3}{3}\right)=\left(3,1,5\right)\]

To find the temperature here, we then plug this into \(T(x,y,z)\):

\[T(\vec{c}(2))=T(3,1,5)=(3)(1)+(1)(5)+(3)(1)(5)-(1^2+3^2)=13\]

To find how quickly the temperature is changing in the direction of the fly’s motion, we first need to find this direction. That means finding the unit vector in the direction of \(\vec{c}^\prime(2)\).

\[\vec{c}^\prime(t)=\langle 1,t,1+t^2\rangle\] \[\vec{c}^\prime(2)=\langle 1,2,5\rangle\]

\[\|\vec{c}^\prime(2)\|=\|\langle 1,2,5\rangle\|=\sqrt{1^2+2^2+5^2}=\sqrt{30}\]

Thus the unit vector in the direction of the fly’s motion is

\[v=\left\langle\frac{1}{\sqrt{30}},\frac{2}{\sqrt{30}},\frac{5}{\sqrt{30}}\right\rangle\]

To find the rate temperature is changing in this direction, we need to find the directional derivative. This is computed using the gradient vector \[D_v T = \nabla T \cdot v\]

So we next need to find the gradient at the fly’s position:

\[\nabla T = \langle y+yz-2x,x+z+xz-2y,y+xy \rangle\]

And evaluating at the fly’s position \((3,1,5)\) gives

\[\nabla T(3,1,5)=\langle 1+5-6,3+5+15-2,1+3\rangle=\langle 0,21,4\rangle\]

Dotting this with the direction vector gives the directional derivative we seek:

\[\langle 0,21,4\rangle\cdot \left\langle\frac{1}{\sqrt{30}},\frac{2}{\sqrt{30}},\frac{5}{\sqrt{30}}\right\rangle = \frac{42}{\sqrt{30}}+\frac{20}{\sqrt{30}}=\frac{62}{\sqrt{30}}\approx 11.32\]

Thus,the rate of change of temperature is 11.32 degrees per second

Next, the direction \(\vec{d}\) where temperature is increasing fastest is the direction of the gradient, so we just need to divide \(\nabla T\) by its magnitude:

\[\|\nabla T\|=\|\langle 0,21,4\rangle\|=\sqrt{457}\]

\[\vec{d}=\left\langle0,\frac{21}{\sqrt{457}},\frac{4}{\sqrt{457}}\right\rangle\]

And finally, to find the angle the fly should turn to head in this direction, we can use the dot product! We already have the unit vector \(v\) in the fly’s direction, and the unit vector \(d\) in the direction of fastest increase in temperature. So

\[\cos\theta = v\cdot d = \frac{42}{\sqrt{30}\sqrt{457}}+\frac{20}{\sqrt{30}\sqrt{475}}=\frac{62}{\sqrt{13710}}\approx 0.529\]

Taking the inverse cosine, we find that \(\theta=1.0127\) radians, or approximately 58 degrees.