ISSUES IN SOLUTION
Probably the most natural measure of distance for the students would be to make the area between the curves as small as possible. However, this requires that we determine the points where the curves intersect which can only be done numerically. This provides a good motivation for the using least squares instead of the absolute value of the difference.
Probably the simplest solution is the 3 point fit solution (see Solutions). As shown under Extensions, it's actually not a bad solution and it's not even the worst of the four offered. So, you should also make sure that students should have a way to compare the solutions in other than visual ways. (For example, all solutions can be compared by the criteria of best fit by least squares.)
In the Least Squares fit, you do not know at the onset where the "best fitting" curve will hit the ground. A more complicated yet more satisfying solution is offered below.
Input :=
A = 68.7672;
c = 3.0022;
L = 299.2239;
fc = 625.0925;
f = fc - A(Cosh[c x/L]- 1);
g = -p1 x^2 + p2;
Input :=
zero = x /. Flatten[Solve[g == 0, x]]
Output =
Sqrt[p2]
-(--------)
Sqrt[p1]
Input :=
SE = Integrate[(f - g)^2, {x, 0, zero}]
Output =
-483806. Sqrt[p2]
----------------- +
Sqrt[p1]
3/2
925.146 p2
------------- -
Sqrt[p1]
5/2
0.533333 p2
-------------- -
Sqrt[p1]
6
2.73247 10 Sqrt[p1] Sqrt[p2]
0.0100333 Sqrt[p2]
Cosh[------------------] +
Sqrt[p1]
6
9.5113 10 Sinh[
0.0100333 Sqrt[p2]
------------------] +
Sqrt[p1]
8
2.7234 10 p1
0.0100333 Sqrt[p2]
Sinh[------------------] -
Sqrt[p1]
117831. Sinh[
0.0200666 Sqrt[p2]
------------------]
Sqrt[p1]
Input :=
derSEp1 = D[SE, p1];
derSEp2 = D[SE, p2];
By setting each partial derivative equal to zero and solving the resulting system of equations simultaneously, we find the values of p1 and p2 that minimize the sum of the square differences.
Input :=
sol = FindRoot[{derSEp1==0, derSEp2==0},
{p1, 0.005}, {p2, 652}]
Output =
{p1 -> 0.00684839, p2 -> 662.632}
How does the least squares parabola compare to the actual arch? We will retrieve the values for p1 and p2 from the above solution and then plot each curve to see. The true arch is the solid curve and the approximating curve is dashed.
Input :=
p1star = p1 /. sol[[1]];
p2star = p2 /. sol[[2]];
bestg = g /. {p1 -> p1star, p2 -> p2star}
Output =
2
662.632 - 0.00684839 x
Input :=
int = Max[L, -zero /. {p1 -> p1star, p2 -> p2star}]
Output =
311.059
Input :=
Plot[{f, bestg}, {x, -int, int},
AspectRatio -> Automatic,
PlotStyle -> {{AbsoluteThickness[2]},
{AbsoluteThickness[3],
AbsoluteDashing[{3, 6}]}},
AxesLabel -> {"[ft]", "height [ft]"}];
Input :=
^*)