┌ Warning: backend `PlotlyBase` is not installed.
└ @ Plots ~/.julia/packages/Plots/ju9dp/src/backends.jl:43
┌ Warning: backend `PlotlyKaleido` is not installed.
└ @ Plots ~/.julia/packages/Plots/ju9dp/src/backends.jl:43

Plots.PlotlyBackend()

In the March 2003 issue of the College Mathematics Journal, Leon M Hall posed 12 questions related to the following figure:

The figure shows \(f(x) = x^2\), the tangent line at \((a, f(a))\) (for \(a > 0\)), and the normal line at \((a, f(a))\). The questions all involve finding the value \(a\) which minimizes a related quantity.

The lone critical point must be at a minimum. (Given the geometry of the problem, as \(a\) goes to \(\infty\) the height does too, and as \(a\) goes to \(0\) the height will also go to \(\infty\). This can also be seen analytically, as \(q = -a - 1/(2a)\) which goes to \(-\infty\) when \(a\) heads to \(0\) or \(\infty\).)

We hide the code

In the remaining examples we don’t show the code by default.

1b. The length of the line segment \(PQ\)

Show the code

lseg =sqrt((f(a) -f(q))^2+ (a - q)^2);

2a. The horizontal distance between \(P\) and \(Q\)

Show the code

hd = a - q;

2b. The area of the parabolic segment

Show the code

A =simplify(integrate(nl -f(x), (x, q, a)));

2c. The volume of the rotated solid formed by revolving the parabolic segment around the vertical line \(k\) units to the right of \(P\) or to the left of \(Q\) where \(k > 0\).

The length of the arc of the parabola between \(P\) and \(Q\)

Show the code

L =integrate(sqrt(1+fp(x)^2), (x, q, a));

The \(y\) coordinate of the midpoint ofthe line segment \(PQ\)

Show the code

mp =nl(x => (a + q)/2);

The area of the trapezoid bound by the normal line, the \(x\)-axis, and the vertical lines through \(P\) and \(Q\).

Show the code

trap =1//2* (f(q) +f(a)) * (a - q);

The area bounded by the parabola and the \(x\) axis and the vertical lines through \(P\) and \(Q\)

Show the code

pa =integrate(x^2, (x, q, a));

The area of the surface formed by revolving the arc of the parabola between \(P\) and \(Q\) around the vertical line through \(P\)

Show the code

# use parametric and 2π ∫ u(t) √(u'(t)^2 + v'(t)^2) dtuu(x) = a - xvv(x) =f(uu(x))SA =2PI *integrate(uu(x) *sqrt(diff(uu(x),x)^2+diff(vv(x),x)^2), (x, q, a));

The height of the parabolic segment (i.e. the distance between the normal line and the tangent line to the parabola that is parallel to the normal line)

Show the code

# find b through mean value theorem,# then solve for point of intersectionb =only(solve(diff(f(x),x) ~-1/fp(a), x))b′ =only(solve(f(b) +fp(a)*(x-b) ~ nl, x))segment_height =sqrt((b-b′)^2+ (f(b) -nl(x=>b′))^2);

The volume of the solid formed by revolving the parabolic segment around the \(x\)-axis

Show the code

Vₓ =integrate(pi* (nl^2-f(x)^2), (x, q, a));

The area of the triangle bound by the normal line, the vertical line through \(Q\) and the \(x\)-axis

Show the code

triangle =1/2*f(q) * (a -f(a)/(-1/fp(a)) - q);

The area of the quadrilateral bound by the normal line, the tangent line, the vertical line through \(Q\) and the \(x\)-axis