APPM 2350 Project 2: Hiking
October 24, 2018
1 Your Friends are Coming to Visit!
Some of your friends are coming to visit you here in Boulder, and you’ve decided to take them
hiking. Since this is their first time in Colorado, your friends are a little nervous to venture into the
wilderness. So they’ve asked that you provide them with as much information as possible about
your hiking adventure. Using information provided to you about the Lagrange mountain range,
your task is to use Mathematica to write a hiking report for your friends. You want to be as
convincing as possible, so make sure you follow the instructions clearly. If anything is missed, your
friends won’t go with you and you’ll have to stay home.
2 Mathematical Preliminaries
A function φ(r) is called a radial function centered at ~xi where r = |~x ~xi
|. That is, r only
depends on the distance from ~x from the center, ~xi
. The term radial is used because these functions
are radially symmetric. There are many types of radial functions, here are some common ones:
1
Radial Function Type φ(r)
Gaussian e
(εr)
2
Multiquadric p
1 + (εr)
2
Inverse Quadratic 1
1+(εr)
2
Inverse Multiquadric √
1
1+(εr)
2
In each of these functions, ε is called the shape parameter, as it affects the shape of the function.
As ε decreases toward zero the radial functions become flatter; as ε increases the radial functions
become steeper. If you’re curious, plot a few radial functions in 2D with different values of the
parameter ε to see how it affects the shape, but don’t include them in your project.
Radial functions provide a nice way to obtain an infinitely differentiable interpolation for a set of
data. These interpolations take the form:
s(x) = Xn
i=1
λiφ(|~x ~xi
|)
where λi
is the weight applied to the radial function centered at ~xi
.
3 Defining the Mountain Range
The Lagrange mountain range is defined in terms of Gaussian radial functions on the square domain
0 ≤ x ≤ 5 and 0 ≤ y ≤ 5, where the x and y values are given in thousands of feet. The coordinates
of each mountain’s center, along with their weight and shape parameter are given in this table:
Mountain Name Center ε λ
K-13 (1,1) 1 .9
Mount Adamore (3,1) 3 1
Issaquah Peak (3.75,1) 2 .8
Mount Jojo (4,3) 2 1
Soweroski Peak (3,3.5) 3 0.75
Leibs Peak (2,3) 2 .9
Jacobi Peak (0.75,3) 4 0.5
Your first task is to construct a function, m(x, y), by adding together the radial functions corresponding
to each of the given mountains, using the appropriate centers, shape parameters, and
weights. Note that the units of m(x, y) are in thousands of feet above 7, 000ft. Make a 3D plot
or your mountain range function on the domain 0 ≤ x ≤ 5 and 0 ≤ y ≤ 5. In addition, make a
contour plot on the same domain. This will be the topographic map of the mountain range you
will take on your hike, so be sure to use enough contours or else you might get lost.
2
4 Analyzing the Mountain Range
Your friends need to be convinced this hike won’t be too hard, but they’ve never taken Calculus
3 so you need to do all the work for them. The trail you’ll be taking them on is defined by the
vector-valued function
r(t) = h2.5 + 1.8 cos(4t), 2 + 1.2 sin(4t)i, 0 ≤ t ≤
π
2
.
Overlay a plot of the path onto your 3D plot and your topographic map. Indicate the location of
the trailhead (where t = 0) on each plot.
You can either hike this trail clockwise or counterclockwise. One of your friends has a bad knee,
and she won’t be able to go down the steepest section of the trail without injuring herself but
should have no problem going up it. Judging by where the path lies on your topographic map, pick
a direction and explain your reasoning.
An angry Honey Badger lives on Curtis Pass, which you’ll arrive at π
4
hours into your hike. Your
friends need to know both the slope of the trail and rate change of elevation (ft/hr) you will
experience as you pass the Honey Badger’s den so they can decide if they’ll be able to outrun him
or not. Make sure to solve this one properly, because honey badger’s don’t care about you or your
friends.
Now that you’re an expert in calculating rate of change in elevation, find where the rate change is
the greatest, and the least, over the whole path. Make a plot of the rate of change in elevation over
the whole path.
Some of your friends are from the east coast and aren’t used to such high elevations. They need to
know what the highest elevation along the hiking trail will be. According to your east coast friends,
they won’t go if the trail goes over 9,000 ft. What is the elevation of the highest point on the trail?
Use Lagrange multipliers to solve this problem. Note: you will want to use the numerical solver
FindRoot[...], and you will need to provide a decent initial guess for x, y and λ for FindRoot
to work. The x and y values are up to you, but you should use an initial guess of λ = ?1. Make
sure that the answer returned is the global maximum and not a minimum or some other local
maximum. A plot of the elevation along the trail will be helpful here, so make one.
In case you want to go swimming, you’ll need to know the coordinates of Lake Mochi at the center
of The Lagrange mountain range. Judging by your topographic map, make a guess for where Lake
Mochi is located. Using your guess, find the actual location of Lake Mochi using properties of the
gradient vector. Indicate the location of Lake Mochi on your topographic map and your 3D plot
by including a realistic blue disk in both.
One of your friends wants to know the total volume of rock, above sea level (or elevation zero ft)
and on or inside the trail, that is underneath the Lagrange mountain range. Use NIntegrate to
approximate this volume. Note: you must include units in your answer, as usual. But be careful
about them. If you’re feeling Mathematica-lly adventurous, you might look up ImplicitRegion
to simplify your calculation. Otherwise, a standard double integral will suffice. Ignore any errors
NIntegrate might throw at you.
Legend has it that some of the rock in the Lagrange mountain range, above 7, 000ft, is made of
3
the rare precious element known as Clairautnium. If the density of Clairautnium above 7, 000ft, in
grams per cubic foot, is given by
δ(x, y, z) = e
.25((x?2.5)2+(y?2.5)2+(z?.2)2
)
calculate the total mass of Clairautnium that can be found in the Lagrange mountain range above
7, 000ft. Your friends have heard of the legend, of course (who hasn’t!), but don’t know what
superpower Clairautnium bestows upon anyone lucky enough to find some nor how likely it is that
you’ll stumble upon a nugget of Clairautnium while hiking on the trail. Please tell them the answers
to both these questions.
Before any of your friends will agree to go on this hike with you, they need to see a professional
quality report of all of your findings.
5 For Fun (Optional)
Using the mountain range function in this project as an example, construct your own mountain
range using radial functions. You are not limited to the Gaussian, so use whichever ones you want.
Also, you’re not limited to 7 peaks – include as many or as few as you like. Try to make the coolest
mountain range you can, or perhaps try to emulate a real-life mountain range. You might just get
a few points of extra credit if your mountain range is especially neat.
Updated: October 24, 2018
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。