15 lines
144 KiB
JSON
15 lines
144 KiB
JSON
{
|
||
"hash": "73efc2e9657f02c4ba245847cafcd6e9",
|
||
"result": {
|
||
"markdown": "# Optimization\n\n\n\nThis section uses these add-on packages:\n\n``` {.julia .cell-code}\nusing CalculusWithJulia\nusing Plots\nusing Roots\nusing SymPy\n```\n\n\n\n\n---\n\n\nA basic application of calculus is to answer questions which relate to the largest or smallest a function can be given some constraints.\n\n\nFor example,\n\n\n> Of all rectangles with perimeter $20$, which has of the largest area?\n\n\n\nThe main tool is the extreme value theorem of Bolzano and Fermat's theorem about critical points, which combined say:\n\n\n> If the function $f(x)$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then the extrema exist and must occur at either an end point or a critical point.\n\n\n\nThough not all of our problems lend themselves to a description of a continuous function on a closed interval, if they do, we have an algorithmic prescription to find the absolute extrema of a function:\n\n\n1. Find the critical points. For this we can use a root-finding algorithm like `find_zero`.\n2. Evaluate the function values at the critical points and at the end points.\n3. Identify the largest and smallest values.\n\n\nWith the computer we can take some shortcuts, as we will be able to graph our function to see where the extreme values will be, and in particular if they occur at end points or critical points.\n\n\n## Fixed perimeter and area\n\n\nThe simplest way to investigate the maximum or minimum value of a function over a closed interval is to just graph it and look.\n\n\nWe began with the question of which rectangles of perimeter $20$ have the largest area? The figure shows a few different rectangles with this perimeter and their respective areas.\n\n::: {.cell cache='true' hold='true' execution_count=4}\n\n::: {.cell-output .cell-output-display execution_count=5}\n```{=html}\n<div class=\"d-flex justify-content-center\"> <figure> <img src=\"data:image/gif;base64,R0lGODlhAANAAvcBAAAAAAD/AAEBAQMDAgQEBAZTggcGBQgICAhTgQo+XAsLCwtTgAuf+g0NDQ4LBg4ODg8PDw8yRw9XhBAQEBB/wxCh+RERERFbiRGi+hMQChMTExQUFBSJ0RVgjhYUEBYWFhdhjhd7uBgYGBkZGRlTdxlxpxoaGhpWehqa6RsWCxul+hwcHBxdhRxlkxym+x2Jyx8fHyAcFCBrmCBrmSEhISFpliFtnCIiIiJUciMd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LGa1aYK1ErT1Gk9RbrPnJYIos6sj0tzyiWMrrOtdIUTMWG1V1nx0kt9TeZfzRRYfg2WTYWF5mH1ulhTJVZhj2VYZEmij0N+7B73aCytNGsrzuLKs7oCLa9E6yvSAsu0wkItsVRrLNYiy7XKgi2zZOss2v9Cy7bSwi21dGst3mLLt9oCLreE6y3igsu44kIuuZRrLuaiy7nqgi67pOsu6sLLuvLCLr20ay/u4muy3fSuv8QLMPIKLJTorSR4f2pejbWXY+kd5XthFt9Trpdi97VYfjE235n1t2b/vVmAczbgnRXYKyor2ckO/DMGB83BQ4Nw0SR8NAonzcKIVC+G71bfXm4Ykvb9cCYBK2JQarjDJEYxYUtcShUjlsWthPErZRxLGs/SxrXE8S11nEse79LFjAWyY338SyIH08jDRLKr9isyJpNMyJuFcmel/Fkqh9bKo8VyabV8Wi6n1surBXNrxfxaMsfWzLNFc23VfFs259YozbuFc2/l/Fs6SyQBMFjBCnxghz77+c+ADrSgB03oQhvazz8x42YCAgA7\" class=\"card-img-top\" alt=\"A Figure\">\n <figcaption><div class=\"markdown\"><p>Some possible rectangles that satisfy the constraint on the perimeter and their area.</p>\n</div> </figcaption>\n </figure>\n</div>\n```\n:::\n:::\n\n\nThe basic mathematical approach is to find a function of a single variable to maximize or minimize. In this case we have two variables describing a rectangle: a base $b$ and height $h$. Our formulas are the area of a rectangle:\n\n\n\n$$\nA = bh,\n$$\n\n\nand the formula for the perimeter of a rectangle:\n\n\n\n$$\nP = 2b + 2h = 20.\n$$\n\n\nFrom this last one, we see that $b$ can be no bigger than $10$ and no smaller than $0$ from the restriction put in place through the perimeter. Solving for $h$ in terms of $b$ then yields this restatement of the problem:\n\n\nMaximize $A(b) = b \\cdot (10 - b)$ over the interval $[0,10]$.\n\n\nThis is exactly the form needed to apply our theorem about the existence of extrema (a continuous function on a closed interval). Rather than solve analytically by taking a derivative, we simply graph to find the value:\n\n::: {.cell execution_count=5}\n``` {.julia .cell-code}\nArea(b) = b * (10 - b)\nplot(Area, 0, 10)\n```\n\n::: {.cell-output .cell-output-display execution_count=6}\n{}\n:::\n:::\n\n\nYou should see the maximum occurs at $b=5$ by symmetry, so $h=5$ as well, and the maximum area is then $25$. This gives the satisfying answer that among all rectangles of fixed perimeter, that with the largest area is a square. As well, this indicates a common result: there is often some underlying symmetry in the answer.\n\n\n### Exploiting polymorphism\n\n\nBefore moving on, let's see a slightly different way to do this problem with `Julia`, where we trade off some algebra for a bit of abstraction. This technique was discussed in the section on [functions](../precalc/functions.html).\n\n\nLet's first write area as a function of both base and height:\n\n::: {.cell execution_count=6}\n``` {.julia .cell-code}\nA(b, h) = b * h\n```\n\n::: {.cell-output .cell-output-display execution_count=7}\n```\nA (generic function with 1 method)\n```\n:::\n:::\n\n\nFrom the constraint given by the perimeter being a fixed value we can solve for `h` in terms of `b`. We write this as a function:\n\n::: {.cell execution_count=7}\n``` {.julia .cell-code}\nh(b) = (20 - 2b) / 2\n```\n\n::: {.cell-output .cell-output-display execution_count=8}\n```\nh (generic function with 1 method)\n```\n:::\n:::\n\n\nTo get `A(b)` we simply need to substitute `h(b)` into our formula for the area, `A`. However, instead of doing the substitution ourselves using algebra we let `Julia` do it through composition of functions:\n\n::: {.cell execution_count=8}\n``` {.julia .cell-code}\nA(b) = A(b, h(b))\n```\n\n::: {.cell-output .cell-output-display execution_count=9}\n```\nA (generic function with 2 methods)\n```\n:::\n:::\n\n\nNow we can solve graphically as before, or numerically, such as here where we search for zeros of the derivative:\n\n::: {.cell execution_count=9}\n``` {.julia .cell-code}\nfind_zeros(A', 0, 10) # find_zeros in `Roots`,\n```\n\n::: {.cell-output .cell-output-display execution_count=10}\n```\n1-element Vector{Float64}:\n 5.0\n```\n:::\n:::\n\n\n(As a reminder, the notation `A'` is defined in `CalculusWithJulia` using the `derivative` function from the `ForwardDiff` package.)\n\n\n:::{.callout-note}\n## Note\nLook at the last definition of `A`. The function `A` appears on both sides, though on the left side with one argument and on the right with two. These are two \"methods\" of a *generic* function, `A`. `Julia` allows multiple definitions for the same name as long as the arguments (their number and type) can disambiguate which to use. In this instance, when one argument is passed in then the last defintion is used (`A(b,h(b))`), whereas if two are passed in, then the method that multiplies both arguments is used. The advantage of multiple dispatch is illustrated: the same concept - area - has one function name, though there may be different ways to compute the area, so there is more than one implementation.\n\n:::\n\n#### Example: Norman windows\n\n\nHere is a similar, though more complicated, example where the analytic approach can be a bit more tedious, but the graphical one mostly satisfying, though we do use a numerical algorithm to find an exact final answer.\n\n\nLet a \"[Norman](https://en.wikipedia.org/wiki/Norman_architecture)\" window consist of a rectangular window of top length $x$ and side length $y$ and a half circle on top. The goal is to maximize the area for a fixed value of the perimeter. Again, assume this perimeter is $20$ units.\n\n\nThis figure shows two such windows, one with base length given by $x=3$, the other with base length given by $x=4$. The one with base length $4$ seems to have much bigger area, what value of $x$ will lead to the largest area?\n\n::: {.cell hold='true' execution_count=10}\n\n::: {.cell-output .cell-output-display execution_count=11}\n{}\n:::\n:::\n\n\nFor this problem, we have two equations.\n\n\nThe area is the area of the rectangle plus the area of the half circle ($\\pi r^2/2$ with $r=x/2$).\n\n\n\n$$\nA = xy + \\pi(x/2)^2/2\n$$\n\n\nIn `Julia` this is\n\n::: {.cell execution_count=11}\n``` {.julia .cell-code}\nAᵣ(x, y) = x*y + pi*(x/2)^2 / 2\n```\n\n::: {.cell-output .cell-output-display execution_count=12}\n```\nAᵣ (generic function with 1 method)\n```\n:::\n:::\n\n\nThe perimeter consists of $3$ sides of the rectangle and the perimeter of half a circle ($\\pi r$, with $r=x/2$):\n\n\n\n$$\nP = 2y + x + \\pi(x/2) = 20\n$$\n\n\nWe solve for $y$ in the first with $y = (20 - x - \\pi(x/2))/2$ so that in `Julia` we have:\n\n::: {.cell execution_count=12}\n``` {.julia .cell-code}\ny(x) = (20 - x - pi * x/2) / 2\n```\n\n::: {.cell-output .cell-output-display execution_count=13}\n```\ny (generic function with 1 method)\n```\n:::\n:::\n\n\nAnd then we substitute in `y(x)` for `y` in the area formula through:\n\n::: {.cell execution_count=13}\n``` {.julia .cell-code}\nAᵣ(x) = Aᵣ(x, y(x))\n```\n\n::: {.cell-output .cell-output-display execution_count=14}\n```\nAᵣ (generic function with 2 methods)\n```\n:::\n:::\n\n\nOf course both $x$ and $y$ are non-negative. The latter forces $x$ to be no more than $x=20/(1+\\pi/2)$.\n\n\nThis leaves us the calculus problem of finding an absolute maximum of a continuous function over the closed interval $[0, 20/(1+\\pi/2)]$. Our theorem tells us this maximum must occur, we now proceed to find it.\n\n\nWe begin by simply graphing and estimating the values of the maximum and where it occurs.\n\n::: {.cell execution_count=14}\n``` {.julia .cell-code}\nplot(Aᵣ, 0, 20/(1+pi/2))\n```\n\n::: {.cell-output .cell-output-display execution_count=15}\n{}\n:::\n:::\n\n\nThe naked eye sees that maximum value is somewhere around $27$ and occurs at $x\\approx 5.6$. Clearly from the graph, we know the maximum value happens at the critical point and there is only one such critical point.\n\n\nAs reading the maximum from the graph is more difficult than reading a $0$ of a function, we plot the derivative using our approximate derivative.\n\n::: {.cell execution_count=15}\n``` {.julia .cell-code}\nplot(Aᵣ', 5.5, 5.7)\n```\n\n::: {.cell-output .cell-output-display execution_count=16}\n{}\n:::\n:::\n\n\nWe confirm that the critical point is around $5.6$.\n\n\n#### Using `find_zero` to locate critical points.\n\n\nRather than zoom in graphically, we now use a root-finding algorithm, to find a more precise value of the zero of $A'$. We know that the maximum will occur at a critical point, a zero of the derivative. The `find_zero` function from the `Roots` package provides a non-linear root-finding algorithm based on the bisection method. The only thing to keep track of is that solving $f'(x) = 0$ means we use the derivative and not the original function.\n\n\nWe see from the graph that $[0, 20/(1+\\pi/2)]$ will provide a bracket, as there is only one relative maximum:\n\n::: {.cell execution_count=16}\n``` {.julia .cell-code}\nx′ = find_zero(Aᵣ', (0, 20/(1+pi/2)))\n```\n\n::: {.cell-output .cell-output-display execution_count=17}\n```\n5.600991535115574\n```\n:::\n:::\n\n\nThis value is the lone critical point, and in this case gives the position of the value that will maximize the function. The value and maximum area are then given by:\n\n::: {.cell execution_count=17}\n``` {.julia .cell-code}\n(x′, Aᵣ(x′))\n```\n\n::: {.cell-output .cell-output-display execution_count=18}\n```\n(5.600991535115574, 28.004957675577867)\n```\n:::\n:::\n\n\n(Compare this answer to the previous, is the square the figure of greatest area for a fixed perimeter, or just the figure amongst all rectangles? See [Isoperimetric inequality](https://en.wikipedia.org/wiki/Isoperimetric_inequality) for an answer.)\n\n\n### Using `argmax` to identify where a function is maximized\n\n\nThis value that maximizes a function is sometimes referred to as the *argmax*, or argument which maximizes the function. In `Julia` the `argmax(f,domain)` function is defined to \"Return a value $x$ in the domain of $f$ for which $f(x)$ is maximized. If there are multiple maximal values for $f(x)$ then the first one will be found.\" The domain is some iterable collection. In the mathematical world this would be an interval $[a,b]$, but on the computer it is an approximation, such as is returned by `range` below. Without out having to take a derivative, as above, but sacrificing some accuracy, the task of identifying `x` for where `A` is maximum, could be done with\n\n::: {.cell execution_count=18}\n``` {.julia .cell-code}\nargmax(Aᵣ, range(0, 20/(1+pi/2), length=10000))\n```\n\n::: {.cell-output .cell-output-display execution_count=19}\n```\n5.6011593738142205\n```\n:::\n:::\n\n\n#### A symbolic approach\n\n\nWe could also do the above problem symbolically with the aid of `SymPy`. Here are the steps:\n\n::: {.cell execution_count=19}\n``` {.julia .cell-code}\n@syms 𝒘::real 𝒉::real\n\n𝑨₀ = 𝒘 * 𝒉 + pi * (𝒘/2)^2 / 2\n𝑷erim = 2*𝒉 + 𝒘 + pi * 𝒘/2\n𝒉₀ = solve(𝑷erim - 20, 𝒉)[1]\n𝑨₁ = 𝑨₀(𝒉 => 𝒉₀)\n𝒘₀ = solve(diff(𝑨₁,𝒘), 𝒘)[1]\n```\n\n::: {.cell-output .cell-output-display execution_count=20}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{40}{\\pi + 4}\n\\]\n</span>\n```\n:::\n:::\n\n\nWe know that `𝒘₀` is the maximum in this example from our previous work. We shall see soon, that just knowing that the second derivative is negative at `𝒘₀` would suffice to know this. Here we check that condition:\n\n::: {.cell execution_count=20}\n``` {.julia .cell-code}\ndiff(𝑨₁, 𝒘, 𝒘)(𝒘 => 𝒘₀)\n```\n\n::: {.cell-output .cell-output-display execution_count=21}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n- (\\frac{\\pi}{4} + 1)\n\\]\n</span>\n```\n:::\n:::\n\n\nAs an aside, compare the steps involved above for a symbolic solution to those of previous work for a numeric solution:\n\n::: {.cell hold='true' execution_count=21}\n``` {.julia .cell-code}\nAᵣ(w, h) = w*h + pi*(w/2)^2 / 2\nh(w) = (20 - w - pi * w/2) / 2\nAᵣ(w) = A(w, h(w))\nfind_zero(A', (0, 20/(1+pi/2))) # 40 / (pi + 4)\n```\n\n::: {.cell-output .cell-output-display execution_count=22}\n```\n3.8898452964834274\n```\n:::\n:::\n\n\nThey are similar, except we solved for `h0` symbolically, rather than by hand, when we solved for `h(w)`.\n\n\n##### Example\n\n\n\n::: {.cell hold='true' execution_count=23}\n\n::: {.cell-output .cell-output-display execution_count=24}\n{}\n:::\n:::\n\n\nA trapezoid is *inscribed* in the upper-half circle of radius $r$. The trapezoid is found be connecting the points $(x,y)$ (in the first quadrant) with $(r, 0)$, $(-r,0)$, and $(-x, y)$. Find the maximum area. (The above figure has $x=0.75$ and $r=1$.)\n\n\nHere the constraint is simply $r^2 = x^2 + y^2$ with $x$ and $y$ being non-negative. The area is then found through the average of the two lengths times the height. Using `height` for `y`, we have:\n\n::: {.cell execution_count=24}\n``` {.julia .cell-code}\n@syms x::positive r::positive\nhₜ = sqrt(r^2 - x^2)\naₜ = (2x + 2r)/2 * hₜ\npossible_sols = solve(diff(aₜ, x) ~ 0, x) # possibly many solutions\nx0 = first(possible_sols) # only solution is also found from first or [1] indexing\n```\n\n::: {.cell-output .cell-output-display execution_count=25}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{r}{2}\n\\]\n</span>\n```\n:::\n:::\n\n\nThe other values of interest can be found through substitution. For example:\n\n::: {.cell execution_count=25}\n``` {.julia .cell-code}\nhₜ(x => x0)\n```\n\n::: {.cell-output .cell-output-display execution_count=26}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{\\sqrt{3} r}{2}\n\\]\n</span>\n```\n:::\n:::\n\n\n## Trigonometry problems\n\n\nMany maximization and minimization problems involve triangles, which in turn use trigonometry in their description. Here is an example, the \"ladder corner problem.\" (There are many other [ladder](http://www.mathematische-basteleien.de/ladder.htm) problems.)\n\n\nA ladder is to be moved through a two-dimensional hallway which has a bend and gets narrower after the bend. The hallway is $8$ feet wide then $5$ feet wide. What is the longest such ladder that can be navigated around the corner?\n\n\nThe figure shows a ladder of length $l_1 + l_2$ that got stuck - it was too long.\n\n::: {.cell hold='true' execution_count=26}\n\n::: {.cell-output .cell-output-display execution_count=27}\n{}\n:::\n:::\n\n\nWe approach this problem in reverse. It is easy to see when a ladder is too long. It gets stuck at some angle $\\theta$. So for each $\\theta$ we find that ladder length that is just too long. Then we find the minimum length of all these ladders that are too long. If a ladder is this length or more it will get stuck for some angle. However, if it is less than this length it will not get stuck. So to maximize a ladder length, we minimize a different function. Neat.\n\n\nNow, to find the length $l = l_1 + l_2$ as a function of $\\theta$.\n\n\nWe need to brush off our trigonometry, in particular right triangle trigonometry. We see from the figure that $l_1$ is the hypotenuse of a right triangle with opposite side $8$ and $l_2$ is the hypotenuse of a right triangle with adjacent side $5$. So, $8/l_1 = \\sin\\theta$ and $5/l_2 = \\cos\\theta$.\n\n\nThat is, we have\n\n::: {.cell execution_count=27}\n``` {.julia .cell-code}\nl(l1, l2) = l1 + l2\nl1(t) = 8/sin(t)\nl2(t) = 5/cos(t)\n\nl(t) = l(l1(t), l2(t))\t\t# or simply l(t) = 8/sin(t) + 5/cos(t)\n```\n\n::: {.cell-output .cell-output-display execution_count=28}\n```\nl (generic function with 2 methods)\n```\n:::\n:::\n\n\nOur goal is to minimize this function for all angles between $0$ and $90$ degrees, or $0$ and $\\pi/2$ radians.\n\n\nThis is not a continuous function on a closed interval - it is undefined at the endpoints. That being said, a quick plot will convince us that the minimum occurs at a critical point and there is only one critical point in $(0, \\pi/2)$.\n\n::: {.cell execution_count=28}\n``` {.julia .cell-code}\ndelta = 0.2\nplot(l, delta, pi/2 - delta)\n```\n\n::: {.cell-output .cell-output-display execution_count=29}\n{}\n:::\n:::\n\n\nThe graph shows the minimum occurs between $0.50$ and $1.00$ radians, a bracket for the derivative. Here we find $x$ and the minimum value:\n\n::: {.cell hold='true' execution_count=29}\n``` {.julia .cell-code}\nx = find_zero(l', (0.5, 1.0))\nx, l(x)\n```\n\n::: {.cell-output .cell-output-display execution_count=30}\n```\n(0.8634136052517809, 18.219533699708656)\n```\n:::\n:::\n\n\nThat is, any ladder less than this length can get around the hallway.\n\n\n## Rate times time problems\n\n\nEthan Hunt, a top secret spy, has a mission to chase a bad guy. Here is what we know:\n\n\n * Ethan likes to run. He can run at $10$ miles per hour.\n * He can drive a car - usually some concept car by BMW - at $30$ miles per hour, but only on the road.\n\n\nFor his mission, he needs to go $10$ miles west and $5$ `miles north. He can do this by:\n\n\n * just driving $8.310$ miles west then $5$ miles north, or\n * just running the diagonal distance, or\n * driving $0 < x < 10$ miles west, then running on the diagonal\n\n\nA quick analysis says:\n\n\n * It would take $(10+5)/30$ hours to just drive\n * It would take $\\sqrt{10^2 + 5^2}/10$ hours to just run\n\n\nNow, if he drives $x$ miles west ($0 < x < 10$) he would run an amount given by the hypotenuse of a triangle with lengths $5$ and $10-x$. His time driving would be $x/30$ and his time running would be $\\sqrt{5^2+(10-x)^2}/10$ for a total of:\n\n\n\n$$\nT(x) = x/30 + \\sqrt{5^2 + (10-x)^2}/10, \\quad 0 < x < 10\n$$\n\n\nWith the endpoints given by $T(0) = \\sqrt{10^2 + 5^2}/10$ and $T(10) = (10 + 5)/30$.\n\n\nLet's plot $T(x)$ over the interval $(0,10)$ and look:\n\n::: {.cell execution_count=30}\n``` {.julia .cell-code}\nT(x) = x/30 + sqrt(5^2 + (10-x)^2)/10\n```\n\n::: {.cell-output .cell-output-display execution_count=31}\n```\nT (generic function with 1 method)\n```\n:::\n:::\n\n\n::: {.cell execution_count=31}\n``` {.julia .cell-code}\nplot(T, 0, 10)\n```\n\n::: {.cell-output .cell-output-display execution_count=32}\n{}\n:::\n:::\n\n\nThe minimum happens way out near 8. We zoom in a bit:\n\n::: {.cell execution_count=32}\n``` {.julia .cell-code}\nplot(T, 7, 9)\n```\n\n::: {.cell-output .cell-output-display execution_count=33}\n{}\n:::\n:::\n\n\nIt appears to be around $8.3$. We now use `find_zero` to refine our guess at the critical point using $[7,9]$:\n\n::: {.cell execution_count=33}\n``` {.julia .cell-code}\nα = find_zero(T', (7, 9))\n```\n\n::: {.cell-output .cell-output-display execution_count=34}\n```\n8.232233047033631\n```\n:::\n:::\n\n\nOkay, got it. Around$8.23$. So is our minimum time\n\n::: {.cell execution_count=34}\n``` {.julia .cell-code}\nT(α)\n```\n\n::: {.cell-output .cell-output-display execution_count=35}\n```\n0.804737854124365\n```\n:::\n:::\n\n\nWe know this is a relative minimum, but not that it is the global minimum over the closed time interlal. For that we must also check the endpoints:\n\n::: {.cell execution_count=35}\n``` {.julia .cell-code}\nsqrt(10^2 + 5^2)/10, T(α), (10+5)/30\n```\n\n::: {.cell-output .cell-output-display execution_count=36}\n```\n(1.118033988749895, 0.804737854124365, 0.5)\n```\n:::\n:::\n\n\nAhh, we see that $T(x)$ is not continuous on $[0, 10]$, as it jumps at $x=10$ down to an even smaller amount of $1/2$. It may not look as impressive as a miles-long sprint, but Mr. Hunt is advised by Benji to drive the whole way.\n\n\n### Rate times time ... the origin story\n\n\n\n\n\nThe last example is a modern day illustration of a problem of calculus dating back to l'Hospital. His parameterization is a bit different. Let's change his by taking two points $(0, a)$ and $(L,-b)$, with $a,b,L$ positive values. Above the $x$ axis travel happens at rate $r_0$, and below, travel happens at rate $r_1$, again, both positive. What value $x$ in $[0,L]$ will minimize the total travel time?\n\n\nWe approach this symbolically with `SymPy`:\n\n::: {.cell execution_count=37}\n``` {.julia .cell-code}\n@syms x::positive a::positive b::positive L::positive r0::positive r1::positive\n\nd0 = sqrt(x^2 + a^2)\nd1 = sqrt((L-x)^2 + b^2)\n\nt = d0/r0 + d1/r1 # time = distance/rate\ndt = diff(t, x) # look for critical points\n```\n\n::: {.cell-output .cell-output-display execution_count=38}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{- L + x}{r_{1} \\sqrt{b^{2} + \\left(L - x\\right)^{2}}} + \\frac{x}{r_{0} \\sqrt{a^{2} + x^{2}}}\n\\]\n</span>\n```\n:::\n:::\n\n\nThe answer will occur at a critical point or an endpoint, either $x=0$ or $x=L$.\n\n\nThe structure of `dt` is too complicated for simply calling `solve` to find the critical points. Instead we help `SymPy` out a bit. We are solving an equation of the form $a/b + c/d = 0$. These solutions will also be solutions of $(a/b)^2 - (c/d)^2=0$ or even $a^2d^2 - c^2b^2 = 0$. This follows as solutions to $u+v=0$, also solve $(u+v)\\cdot(u-v)=0$, or $u^2 - v^2=0$. Setting $u=a/b$ and $v=c/d$ completes the comparison.\n\n\nWe can get these terms - $a$, $b$, $c$, and $d$ - as follows:\n\n::: {.cell execution_count=38}\n``` {.julia .cell-code}\nt1, t2 = dt.args # the `args` property returns the arguments to the outer function (+ in this case)\n```\n\n::: {.cell-output .cell-output-display execution_count=39}\n```\n(x/(r0*sqrt(a^2 + x^2)), (-L + x)/(r1*sqrt(b^2 + (L - x)^2)))\n```\n:::\n:::\n\n\nThe equivalent of $a^2d^2 - c^2 b^2$ is found using the generic functions `numerator` and `denominator` to access the numerator and denominator of the fractions:\n\n::: {.cell execution_count=39}\n``` {.julia .cell-code}\nex = numerator(t1^2)*denominator(t2^2) - denominator(t1^2)*numerator(t2^2)\n```\n\n::: {.cell-output .cell-output-display execution_count=40}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n- r_{0}^{2} \\left(- L + x\\right)^{2} \\left(a^{2} + x^{2}\\right) + r_{1}^{2} x^{2} \\left(b^{2} + \\left(L - x\\right)^{2}\\right)\n\\]\n</span>\n```\n:::\n:::\n\n\nThis is a polynomial in the `x` variable of degree $4$, as seen here where the `sympy.Poly` function is used to identify the symbols of the polynomial from the parameters:\n\n::: {.cell execution_count=40}\n``` {.julia .cell-code}\np = sympy.Poly(ex, x) # a0 + a1⋅x + a2⋅x^2 + a3⋅x^3 + a4⋅x^4\np.coeffs()\n```\n\n::: {.cell-output .cell-output-display execution_count=41}\n```\n5-element Vector{Sym}:\n -r0^2 + r1^2\n 2*L*r0^2 - 2*L*r1^2\n -L^2*r0^2 + L^2*r1^2 - a^2*r0^2 + b^2*r1^2\n 2*L*a^2*r0^2\n -L^2*a^2*r0^2\n```\n:::\n:::\n\n\nFourth degree polynomials can be solved. The critical points of the original equation will be among the $4$ solutions given. However, the result is complicated. The [article](http://www.ams.org/samplings/feature-column/fc-2016-05) – from which the figure came – states that \"In today's textbooks the problem, usually involving a river, involves walking along one bank and then swimming across; this corresponds to setting $g=0$ in l'Hospital's example, and leads to a quadratic equation.\" Let's see that case, which we can get in our notation by taking $b=0$:\n\n::: {.cell execution_count=41}\n``` {.julia .cell-code}\nq = ex(b=>0)\nfactor(q)\n```\n\n::: {.cell-output .cell-output-display execution_count=42}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n- \\left(- L + x\\right)^{2} \\left(a^{2} r_{0}^{2} + r_{0}^{2} x^{2} - r_{1}^{2} x^{2}\\right)\n\\]\n</span>\n```\n:::\n:::\n\n\nWe see two terms: one with $x=L$ and another quadratic. For the simple case $r_0=r_1$, a straight line is the best solution, and this corresponds to $x=L$, which is clear from the formula above, as we only have one solution to the following:\n\n::: {.cell execution_count=42}\n``` {.julia .cell-code}\nsolve(q(r1=>r0), x)\n```\n\n::: {.cell-output .cell-output-display execution_count=43}\n```\n1-element Vector{Sym}:\n L\n```\n:::\n:::\n\n\nWell, not so fast. We need to check the other endpoint, $x=0$:\n\n::: {.cell execution_count=43}\n``` {.julia .cell-code}\nta = t(b=>0, r1=>r0)\nta(x=>0), ta(x=>L)\n```\n\n::: {.cell-output .cell-output-display execution_count=44}\n```\n(L/r0 + a/r0, sqrt(L^2 + a^2)/r0)\n```\n:::\n:::\n\n\nThe value at $x=L$ is smaller, as $L^2 + a^2 \\leq (L+a)^2$. (Well, that was a bit pedantic. The travel rates being identical means the fastest path will also be the shortest path and that is clearly $x=L$ and not $x=0$.)\n\n\nNow, if, say, travel above the line is half as slow as travel along, then $2r_0 = r_1$, and the critical points will be:\n\n::: {.cell execution_count=44}\n``` {.julia .cell-code}\nout = solve(q(r1 => 2r0), x)\n```\n\n::: {.cell-output .cell-output-display execution_count=45}\n```\n2-element Vector{Sym}:\n L\n sqrt(3)*a/3\n```\n:::\n:::\n\n\nIt is hard to tell which would minimize time without more work. To check a case ($a=1, L=2, r_0=1$) we might have\n\n::: {.cell execution_count=45}\n``` {.julia .cell-code}\nx_straight = t(r1 =>2r0, b=>0, x=>out[1], a=>1, L=>2, r0 => 1) # for x=L\n```\n\n::: {.cell-output .cell-output-display execution_count=46}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\sqrt{5}\n\\]\n</span>\n```\n:::\n:::\n\n\nCompared to the smaller ($x=\\sqrt{3}a/3$):\n\n::: {.cell execution_count=46}\n``` {.julia .cell-code}\nx_angle = t(r1 =>2r0, b=>0, x=>out[2], a=>1, L=>2, r0 => 1)\n```\n\n::: {.cell-output .cell-output-display execution_count=47}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{\\sqrt{3}}{2} + 1\n\\]\n</span>\n```\n:::\n:::\n\n\nWhat about $x=0$?\n\n::: {.cell execution_count=47}\n``` {.julia .cell-code}\nx_bent = t(r1 =>2r0, b=>0, x=>0, a=>1, L=>2, r0 => 1)\n```\n\n::: {.cell-output .cell-output-display execution_count=48}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n2\n\\]\n</span>\n```\n:::\n:::\n\n\nThe value of $x=\\sqrt{3}a/3$ minimizes time:\n\n::: {.cell execution_count=48}\n``` {.julia .cell-code}\nmin(x_straight, x_angle, x_bent)\n```\n\n::: {.cell-output .cell-output-display execution_count=49}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{\\sqrt{3}}{2} + 1\n\\]\n</span>\n```\n:::\n:::\n\n\nThe traveler in this case is advised to head to the $x$ axis at $x=\\sqrt{3}a/3$ and then travel along the $x$ axis.\n\n\nWill this approach always be true? Consider different parameters, say we switch the values of $a$ and $L$ so $a > L$:\n\n::: {.cell execution_count=49}\n``` {.julia .cell-code}\npts = [0, out...]\nm,i = findmin([t(r1 =>2r0, b=>0, x=>u, a=>2, L=>1, r0 => 1) for u in pts]) # min, index\nm, pts[i]\n```\n\n::: {.cell-output .cell-output-display execution_count=50}\n```\n(sqrt(5), L)\n```\n:::\n:::\n\n\nHere traveling directly to the point $(L,0)$ is fastest. Though travel is slower, the route is more direct and there is no time saved by taking the longer route with faster travel for part of it.\n\n\n## Unbounded domains\n\n\nMaximize the function $xe^{-(1/2) x^2}$ over the interval $[0, \\infty)$.\n\n\nHere the extreme value theorem doesn't technically apply, as we don't have a closed interval. However, **if** we can eliminate the endpoints as candidates, then we should be able to convince ourselves the maximum must occur at a critical point of $f(x)$. (If not, then convince yourself for all sufficiently large $M$ the maximum over $[0,M]$ occurs at a critical point, not an endpoint. Then let $M$ go to infinity. In general, for an optimization problem of a continuous function on the interval $(a,b)$ if the right limit at $a$ and left limit at $b$ can be ruled out as candidates, the optimal value must occur at a critical point.)\n\n\nSo to approach this problem we first graph it over a wide interval.\n\n::: {.cell execution_count=50}\n``` {.julia .cell-code}\nf(x) = x * exp(-x^2)\nplot(f, 0, 100)\n```\n\n::: {.cell-output .cell-output-display execution_count=51}\n{}\n:::\n:::\n\n\nClearly the action is nearer to $1$ than $100$. We try graphing the derivative near that area:\n\n::: {.cell execution_count=51}\n``` {.julia .cell-code}\nplot(f', 0, 5)\n```\n\n::: {.cell-output .cell-output-display execution_count=52}\n{}\n:::\n:::\n\n\nThis shows the value of interest near $0.7$ for a critical point. We use `find_zero` with $[0,1]$ as a bracket\n\n::: {.cell execution_count=52}\n``` {.julia .cell-code}\nc = find_zero(f', (0, 1))\n```\n\n::: {.cell-output .cell-output-display execution_count=53}\n```\n0.7071067811865476\n```\n:::\n:::\n\n\nThe maximum is then at\n\n::: {.cell execution_count=53}\n``` {.julia .cell-code}\nf(c)\n```\n\n::: {.cell-output .cell-output-display execution_count=54}\n```\n0.42888194248035333\n```\n:::\n:::\n\n\n##### Example: Minimize the surface area of a can\n\n\nFor a more applied problem of this type (infinite domain), consider a can of some soft drink that is to contain $355$ml which is $355$ cubic centimeters. We use metric units, as the relationship between volume (cubic centimeters) and fluid amount (ml) is clear. A can to hold this amount is produced in the shape of cylinder with radius $r$ and height $h$. The materials involved give the surface area, which would be:\n\n\n\n$$\nSA = h \\cdot 2\\pi r + 2 \\cdot \\pi r^2.\n$$\n\n\nThe volume satisfies:\n\n\n\n$$\nV = 355 = h \\cdot \\pi r^2.\n$$\n\n\nFind the values of $r$ and $h$ which minimize the surface area.\n\n\nFirst the surface area in both variables is given by\n\n::: {.cell execution_count=54}\n``` {.julia .cell-code}\nSA(h, r) = h * 2pi * r + 2pi * r^2\n```\n\n::: {.cell-output .cell-output-display execution_count=55}\n```\nSA (generic function with 1 method)\n```\n:::\n:::\n\n\nSolving from the constraint on the volume for `h` in terms of `r` yields:\n\n::: {.cell execution_count=55}\n``` {.julia .cell-code}\ncanheight(r) = 355 / (pi * r^2)\n```\n\n::: {.cell-output .cell-output-display execution_count=56}\n```\ncanheight (generic function with 1 method)\n```\n:::\n:::\n\n\nComposing gives a function of `r` alone:\n\n::: {.cell execution_count=56}\n``` {.julia .cell-code}\nSA(r) = SA(canheight(r), r)\n```\n\n::: {.cell-output .cell-output-display execution_count=57}\n```\nSA (generic function with 2 methods)\n```\n:::\n:::\n\n\nThis is minimized subject to the constraint that $r \\geq 0$. A quick glance shows that as $r$ gets close to $0$, the can must get infinitely tall to contain that fixed volume, and would have infinite surface area as the $1/r^2$ in the first term implies. On the other hand, as $r$ goes to infinity, the height must go to $0$ to make a really flat can. Again, we would have infinite surface area, as the $r^2$ term at the end indicates. With this observation, we can rule out the endpoints as possible minima, so any minima must occur at a critical point.\n\n\nWe start by making a graph, making an educated guess that the answer is somewhere near a real life answer, or around $3$-$5$ cms in radius:\n\n::: {.cell execution_count=57}\n``` {.julia .cell-code}\nplot(SA, 2, 10)\n```\n\n::: {.cell-output .cell-output-display execution_count=58}\n{}\n:::\n:::\n\n\nThe minimum looks to be around $4$cm and is clearly between $2$cm and $6$cm. We can use `find_zero` to zero in on the value of the critical point:\n\n::: {.cell execution_count=58}\n``` {.julia .cell-code}\nrₛₐ = find_zero(SA', (2, 6))\n```\n\n::: {.cell-output .cell-output-display execution_count=59}\n```\n3.8372152480156734\n```\n:::\n:::\n\n\nOkay, $3.837...$ is our answer for $r$. Use this to get $h$:\n\n::: {.cell execution_count=59}\n``` {.julia .cell-code}\ncanheight(rₛₐ)\n```\n\n::: {.cell-output .cell-output-display execution_count=60}\n```\n7.674430496031345\n```\n:::\n:::\n\n\nThis produces a can which is about square in profile. This is not how most cans look though. Perhaps our model is too simple, or the cans are optimized for some other purpose than minimizing materials.\n\n\n## Questions\n\n\n###### Question\n\n\nA geometric figure has area given in terms of two measurements by $A=\\pi a b$ and perimeter $P = \\pi (a + b)$. If the perimeter is fixed to be 20 units long, what is the maximal area the figure can be?\n\n::: {.cell hold='true' execution_count=60}\n\n::: {.cell-output .cell-output-display execution_count=61}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='14410026343440980595' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_14410026343440980595\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"14410026343440980595\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='14410026343440980595_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"14410026343440980595\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 31.83098861837907) <= 0.001);\n var msgBox = document.getElementById('14410026343440980595_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_14410026343440980595\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_14410026343440980595\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA geometric figure has area given in terms of two measurements by $A=\\pi a b$ and perimeter $P=\\pi \\cdot \\sqrt{a^2 + b^2}/2$. If the perimeter is 20 units long, what is the maximal area?\n\n::: {.cell hold='true' execution_count=61}\n\n::: {.cell-output .cell-output-display execution_count=62}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='4238723021423998893' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_4238723021423998893\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"4238723021423998893\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='4238723021423998893_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"4238723021423998893\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 254.64790894703262) <= 0.001);\n var msgBox = document.getElementById('4238723021423998893_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_4238723021423998893\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_4238723021423998893\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA rancher with $10$ meters of fence wishes to make a pen adjacent to an existing fence. The pen will be a rectangle with one edge using the existing fence. Say that has length $x$, then $10 = 2y + x$, with $y$ the other dimension of the pen. What is the maximum area that can be made?\n\n::: {.cell hold='true' execution_count=62}\n\n::: {.cell-output .cell-output-display execution_count=63}\n{}\n:::\n:::\n\n\n::: {.cell hold='true' execution_count=63}\n\n::: {.cell-output .cell-output-display execution_count=64}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='13208432303360697487' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_13208432303360697487\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"13208432303360697487\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='13208432303360697487_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"13208432303360697487\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 12.5) <= 0.001);\n var msgBox = document.getElementById('13208432303360697487_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_13208432303360697487\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_13208432303360697487\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\nIs there \"symmetry\" in the answer between $x$ and $y$?\n\n::: {.cell hold='true' execution_count=64}\n\n::: {.cell-output .cell-output-display execution_count=65}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='1036416324436824696' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_1036416324436824696\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1036416324436824696_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1036416324436824696\"\n id=\"radio_1036416324436824696_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n Yes\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1036416324436824696_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1036416324436824696\"\n id=\"radio_1036416324436824696_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n No\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='1036416324436824696_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_1036416324436824696\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 2;\n var msgBox = document.getElementById('1036416324436824696_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_1036416324436824696\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_1036416324436824696\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nWhat is you were do do two pens like this back to back, then the answer would involve a rectangle. Is there symmetry in the answer now?\n\n::: {.cell hold='true' execution_count=65}\n\n::: {.cell-output .cell-output-display execution_count=66}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='7388943100715285629' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_7388943100715285629\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_7388943100715285629_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_7388943100715285629\"\n id=\"radio_7388943100715285629_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n Yes\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_7388943100715285629_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_7388943100715285629\"\n id=\"radio_7388943100715285629_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n No\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='7388943100715285629_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_7388943100715285629\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('7388943100715285629_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_7388943100715285629\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_7388943100715285629\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA rectangle of sides $w$ and $h$ has fixed area $20$. What is the *smallest* perimeter it can have?\n\n::: {.cell hold='true' execution_count=66}\n\n::: {.cell-output .cell-output-display execution_count=67}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='14287542307063268678' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_14287542307063268678\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"14287542307063268678\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='14287542307063268678_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"14287542307063268678\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 17.88854381999832) <= 0.001);\n var msgBox = document.getElementById('14287542307063268678_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_14287542307063268678\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_14287542307063268678\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA rectangle of sides $w$ and $h$ has fixed area $20$. What is the *largest* perimeter it can have?\n\n::: {.cell hold='true' execution_count=67}\n\n::: {.cell-output .cell-output-display execution_count=68}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='13019763125264887210' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_13019763125264887210\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_13019763125264887210_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_13019763125264887210\"\n id=\"radio_13019763125264887210_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n It can be infinite\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_13019763125264887210_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_13019763125264887210\"\n id=\"radio_13019763125264887210_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n It is also 20\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_13019763125264887210_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_13019763125264887210\"\n id=\"radio_13019763125264887210_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(17.888\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='13019763125264887210_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_13019763125264887210\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('13019763125264887210_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_13019763125264887210\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_13019763125264887210\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA cardboard box is to be designed with a square base and an open top holding a fixed volume $V$. What dimensions yield the minimal surface area?\n\n\nIf this problem were approached symbolically, we might see the following code. First:\n\n``` {.julia .cell-code}\n@syms V::positive x::positive z::positive\nSA = 1 * x * x + 4 * x * z\n```\n\n\nWhat does this express?\n\n::: {.cell hold='true' execution_count=69}\n\n::: {.cell-output .cell-output-display execution_count=69}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='746970759183802381' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_746970759183802381\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_746970759183802381_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_746970759183802381\"\n id=\"radio_746970759183802381_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n The box has a square base with open top, so <code>x*x</code> is the amount of material in the base; the 4 sides each have <code>x*z</code> area.\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_746970759183802381_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_746970759183802381\"\n id=\"radio_746970759183802381_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n The surface area of a box is <code>6x*x</code>, so this is wrong.\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_746970759183802381_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_746970759183802381\"\n id=\"radio_746970759183802381_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n The volume is a fixed amount, so is <code>x*x*z</code>, with sides suitably labeled\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='746970759183802381_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_746970759183802381\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('746970759183802381_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_746970759183802381\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_746970759183802381\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nWhat does this command express?\n\n``` {.julia .cell-code}\nSA = subs(SA, z => V / x^2)\n```\n\n\n::: {.cell hold='true' execution_count=71}\n\n::: {.cell-output .cell-output-display execution_count=70}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='18441017924815697983' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_18441017924815697983\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_18441017924815697983_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_18441017924815697983\"\n id=\"radio_18441017924815697983_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n This command replaces <code>z</code>, reparameterizing in <code>V</code> instead.\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_18441017924815697983_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_18441017924815697983\"\n id=\"radio_18441017924815697983_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n This command replaces <code>z</code> with an expression in <code>x</code> using the constraint of fixed volume <code>V</code>\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_18441017924815697983_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_18441017924815697983\"\n id=\"radio_18441017924815697983_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n This command is merely algebraic simplification\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='18441017924815697983_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_18441017924815697983\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 2;\n var msgBox = document.getElementById('18441017924815697983_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_18441017924815697983\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_18441017924815697983\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nWhat does this command find?\n\n``` {.julia .cell-code}\nsolve(diff(SA, x) ~ 0, x)\n```\n\n\n::: {.cell hold='true' execution_count=73}\n\n::: {.cell-output .cell-output-display execution_count=71}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='6420101803047130942' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_6420101803047130942\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6420101803047130942_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6420101803047130942\"\n id=\"radio_6420101803047130942_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n This solves \\(SA'=0\\), that is it find critical points of a continuously differentiable function\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6420101803047130942_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6420101803047130942\"\n id=\"radio_6420101803047130942_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n This solves for \\(V\\) the fixed, but unknown volume\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6420101803047130942_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6420101803047130942\"\n id=\"radio_6420101803047130942_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n This checks the values of <code>SA</code> at the end points of the domain\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='6420101803047130942_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_6420101803047130942\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('6420101803047130942_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_6420101803047130942\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_6420101803047130942\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nWhat do these commands do?\n\n``` {.julia .cell-code}\ncps = solve(diff(SA, x) ~ 0, x)\nxx = filter(isreal, cps)[1]\ndiff(SA, x, x)(xx) > 0\n```\n\n\n::: {.cell hold='true' execution_count=75}\n\n::: {.cell-output .cell-output-display execution_count=72}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='6657013094529428218' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_6657013094529428218\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6657013094529428218_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6657013094529428218\"\n id=\"radio_6657013094529428218_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n This applies the first derivative test to the lone <em>real</em> critical point showing there is a local minimum at that point.\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6657013094529428218_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6657013094529428218\"\n id=\"radio_6657013094529428218_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n This finds the `<code>4</code>th derivative of <code>SA</code>\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6657013094529428218_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6657013094529428218\"\n id=\"radio_6657013094529428218_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n This applies the second derivative test to the lone <em>real</em> critical point showing there is a local minimum at that point.\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='6657013094529428218_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_6657013094529428218\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('6657013094529428218_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_6657013094529428218\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_6657013094529428218\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA rain gutter is constructed from a 30\" wide sheet of tin by bending it into thirds. If the sides are bent 90 degrees, then the cross-sectional area would be $100 = 10^2$. This is not the largest possible amount. For example, if the sides are bent by 45 degrees, the cross sectional area is:\n\n::: {.cell hold='true' execution_count=76}\n\n::: {.cell-output .cell-output-display execution_count=73}\n```\n120.71067811865474\n```\n:::\n:::\n\n\nFind a value in degrees that gives the maximum. (The first task is to write the area in terms of $\\theta$.\n\n::: {.cell hold='true' execution_count=77}\n\n::: {.cell-output .cell-output-display execution_count=74}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='9147017952071217698' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_9147017952071217698\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"9147017952071217698\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='9147017952071217698_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"9147017952071217698\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 60.00000000000001) <= 0.001);\n var msgBox = document.getElementById('9147017952071217698_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_9147017952071217698\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_9147017952071217698\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question Non-Norman windows\n\n\nSuppose our new \"Norman\" window has half circular tops at the top and bottom? If the perimeter is fixed at $20$ and the dimensions of the rectangle are $x$ for the width and $y$ for the height.\n\n\nWhat is the value of $y$ that maximizes the area?\n\n::: {.cell hold='true' execution_count=78}\n\n::: {.cell-output .cell-output-display execution_count=75}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='8649951940268082728' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_8649951940268082728\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"8649951940268082728\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='8649951940268082728_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"8649951940268082728\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 0.0) <= 0.001);\n var msgBox = document.getElementById('8649951940268082728_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_8649951940268082728\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_8649951940268082728\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question (Thanks https://www.math.ucdavis.edu/~kouba)\n\n\nA movie screen projects on a wall 20 feet high beginning 10 feet above the floor. This figure shows $\\theta$ for $x=30$:\n\n::: {.cell hold='true' execution_count=79}\n\n::: {.cell-output .cell-output-display execution_count=76}\n{}\n:::\n:::\n\n\nWhat value of $x$ gives the largest angle $\\theta$? (In degrees.)\n\n::: {.cell hold='true' execution_count=80}\n\n::: {.cell-output .cell-output-display execution_count=77}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='5558061039647112731' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_5558061039647112731\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"5558061039647112731\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='5558061039647112731_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"5558061039647112731\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 30.000000000000004) <= 0.1);\n var msgBox = document.getElementById('5558061039647112731_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_5558061039647112731\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_5558061039647112731\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA maximum likelihood estimator is a value derived by maximizing a function. For example, if\n\n::: {.cell execution_count=81}\n``` {.julia .cell-code}\nLikhood(t) = t^3 * exp(-3t) * exp(-2t) * exp(-4t) ## 0 <= t <= 10\n```\n\n::: {.cell-output .cell-output-display execution_count=78}\n```\nLikhood (generic function with 1 method)\n```\n:::\n:::\n\n\nThen `Likhood(t)` is continuous and has single peak, so the maximum occurs at the lone critical point. It turns out that this problem is bit sensitive to an initial condition, so we bracket\n\n::: {.cell execution_count=82}\n``` {.julia .cell-code}\nfind_zero(Likhood', (0.1, 0.5))\n```\n\n::: {.cell-output .cell-output-display execution_count=79}\n```\n0.3333333333333333\n```\n:::\n:::\n\n\nNow if $Likhood(t) = \\exp(-3t) \\cdot \\exp(-2t) \\cdot \\exp(-4t), \\quad 0 \\leq t \\leq 10$, by graphing, explain why the same approach won't work:\n\n::: {.cell hold='true' execution_count=83}\n\n::: {.cell-output .cell-output-display execution_count=80}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='6469700976523781378' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_6469700976523781378\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6469700976523781378_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6469700976523781378\"\n id=\"radio_6469700976523781378_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(Likhood(t)\\) is not continuous on \\(0\\) to \\(10\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6469700976523781378_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6469700976523781378\"\n id=\"radio_6469700976523781378_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n It does work and the answer is x = 2.27...\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6469700976523781378_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6469700976523781378\"\n id=\"radio_6469700976523781378_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(Likhood(t)\\) takes its maximum at a boundary point - not a critical point\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='6469700976523781378_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_6469700976523781378\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('6469700976523781378_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_6469700976523781378\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_6469700976523781378\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n##### Question\n\n\nLet $x_1$, $x_2$, $x_n$ be a set of unspecified numbers in a data set. Form the expression $s(x) = (x-x_1)^2 + \\cdots (x-x_n)^2$. What is the smallest this can be (in $x$)?\n\n\nWe approach this using `SymPy` and $n=10$\n\n``` {.julia .cell-code}\n@syms s xs[1:10]\ns(x) = sum((x-xi)^2 for xi in xs)\ncps = solve(diff(s(x), x), x)\n```\n\n\nRun the above code. Baseed on the critical points found, what do you guess will be the minimum value in terms of the values $x_1$, $x_2, \\dots$?\n\n::: {.cell hold='true' execution_count=85}\n\n::: {.cell-output .cell-output-display execution_count=81}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='6874417312423664729' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_6874417312423664729\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6874417312423664729_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6874417312423664729\"\n id=\"radio_6874417312423664729_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n The square roots of the values squared, \\((x_1^2 + \\cdots x_n^2)^2\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6874417312423664729_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6874417312423664729\"\n id=\"radio_6874417312423664729_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n The median, or middle number, of the values\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_6874417312423664729_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_6874417312423664729\"\n id=\"radio_6874417312423664729_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n The mean, or average, of the values\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='6874417312423664729_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_6874417312423664729\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('6874417312423664729_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_6874417312423664729\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_6874417312423664729\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nMinimize the function $f(x) = 2x + 3/x$ over $(0, \\infty)$.\n\n::: {.cell hold='true' execution_count=86}\n\n::: {.cell-output .cell-output-display execution_count=82}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='7261566816956016652' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_7261566816956016652\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"7261566816956016652\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='7261566816956016652_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"7261566816956016652\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 1.2247448713915892) <= 0.001);\n var msgBox = document.getElementById('7261566816956016652_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_7261566816956016652\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_7261566816956016652\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nOf all rectangles of area 4, find the one with smallest perimeter. What is the perimeter?\n\n::: {.cell hold='true' execution_count=87}\n\n::: {.cell-output .cell-output-display execution_count=83}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='3670977864314057190' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_3670977864314057190\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"3670977864314057190\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='3670977864314057190_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"3670977864314057190\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 8.0) <= 0.001);\n var msgBox = document.getElementById('3670977864314057190_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_3670977864314057190\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_3670977864314057190\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA running track is in the shape of two straight aways and two half circles. The total distance (perimeter) is 400 meters. Suppose $w$ is the width (twice the radius of the circles) and $h$ is the height. What dimensions minimize the sum $w + h$?\n\n\nYou have $P(w, h) = 2\\pi \\cdot (w/2) + 2\\cdot(h-w)$.\n\n::: {.cell hold='true' execution_count=88}\n\n::: {.cell-output .cell-output-display execution_count=84}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='2772112494892335987' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_2772112494892335987\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"2772112494892335987\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='2772112494892335987_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"2772112494892335987\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 200.0) <= 0.001);\n var msgBox = document.getElementById('2772112494892335987_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_2772112494892335987\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_2772112494892335987\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nA cell phone manufacturer wishes to make a rectangular phone with total surface area of 12,000 $mm^2$ and maximal screen area. The screen is surrounded by bezels with sizes of 8$mm$ on the long sides and 32$mm$ on the short sides. (So, for example, the screen width is shorter by $2\\cdot 8$ mm than the phone width.)\n\n\nWhat are the dimensions (width and height) that allow the maximum screen area?\n\n\nThe width is:\n\n::: {.cell hold='true' execution_count=89}\n\n::: {.cell-output .cell-output-display execution_count=85}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='15174392563900087518' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_15174392563900087518\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"15174392563900087518\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='15174392563900087518_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"15174392563900087518\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 54.772255750516614) <= 0.001);\n var msgBox = document.getElementById('15174392563900087518_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_15174392563900087518\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_15174392563900087518\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\nThe height is?\n\n::: {.cell hold='true' execution_count=90}\n\n::: {.cell-output .cell-output-display execution_count=86}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='11826684620644474451' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_11826684620644474451\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"11826684620644474451\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='11826684620644474451_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"11826684620644474451\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 219.08902300206643) <= 0.001);\n var msgBox = document.getElementById('11826684620644474451_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_11826684620644474451\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_11826684620644474451\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nFind the value $x > 0$ which minimizes the distance from the graph of $f(x) = \\log_e(x) - x$ to the origin $(0,0)$.\n\n::: {.cell hold='true' execution_count=91}\n\n::: {.cell-output .cell-output-display execution_count=87}\n{}\n:::\n:::\n\n\n::: {.cell hold='true' execution_count=92}\n\n::: {.cell-output .cell-output-display execution_count=88}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='15954247524079189361' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_15954247524079189361\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"15954247524079189361\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='15954247524079189361_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"15954247524079189361\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 1.2607180017701087) <= 0.001);\n var msgBox = document.getElementById('15954247524079189361_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_15954247524079189361\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_15954247524079189361\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\n\n\n\nThe figure above poses a problem about cones in spheres, which can be reduced to a two-dimensional problem. Take a sphere of radius $r=1$, and imagine a secant line of length $l$ connecting $(-r, 0)$ to another point $(x,y)$ with $y>0$. Rotating that line around the $x$ axis produces a cone and its lateral surface is given by $SA=\\pi \\cdot y \\cdot l$. Write $SA$ as a function of $x$ and solve.\n\n\nThe largest lateral surface area is:\n\n::: {.cell hold='true' execution_count=94}\n\n::: {.cell-output .cell-output-display execution_count=90}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='7314002774291021204' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_7314002774291021204\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"7314002774291021204\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='7314002774291021204_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"7314002774291021204\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 4.836798304624581) <= 0.001);\n var msgBox = document.getElementById('7314002774291021204_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_7314002774291021204\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_7314002774291021204\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\nThe surface area of a sphere of radius $1$ is $4\\pi r^2 = 4 \\pi$. This is how many times greater than that of the largest cone?\n\n::: {.cell hold='true' execution_count=95}\n\n::: {.cell-output .cell-output-display execution_count=91}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='2494272360147701227' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_2494272360147701227\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2494272360147701227_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2494272360147701227\"\n id=\"radio_2494272360147701227_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n exactly four times\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2494272360147701227_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2494272360147701227\"\n id=\"radio_2494272360147701227_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n about \\(2.6\\) times as big\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2494272360147701227_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2494272360147701227\"\n id=\"radio_2494272360147701227_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n exactly \\(\\pi\\) times\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2494272360147701227_4\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2494272360147701227\"\n id=\"radio_2494272360147701227_4\" value=\"4\">\n </input>\n <span class=\"label-body px-1\">\n about the same\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='2494272360147701227_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_2494272360147701227\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('2494272360147701227_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_2494272360147701227\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_2494272360147701227\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nIn the examples the functions `argmax(f, itr)` and `findmin(collection)` were used. These have mathematical analogs. What is `argmax(f,itr)` in terms of math notation, where $vs$ is the iterable collection of values:\n\n::: {.cell hold='true' execution_count=96}\n\n::: {.cell-output .cell-output-display execution_count=92}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='4275990076349368874' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_4275990076349368874\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_4275990076349368874_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_4275990076349368874\"\n id=\"radio_4275990076349368874_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(\\{i \\mid v_i \\text{ in } vs, f(v_i) = \\max(f(vs))\\}\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_4275990076349368874_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_4275990076349368874\"\n id=\"radio_4275990076349368874_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(\\{f(v) \\mid v \\text{ in } vs, f(v) = \\max(f(vs))\\}\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_4275990076349368874_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_4275990076349368874\"\n id=\"radio_4275990076349368874_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(\\{v \\mid v \\text{ in } vs, f(v) = \\max(f(vs))\\}\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='4275990076349368874_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_4275990076349368874\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('4275990076349368874_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_4275990076349368874\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_4275990076349368874\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nThe functions are related: `findmax` returns the maximum value and an index in the collection for which the value will be largest; `argmax` returns an element of the set for which the function is largest, so `argmax(identify, itr)` should correspond to the index found by `findmax` (through `itr[findmax(itr)[2]`)\n\n\n###### Question\n\n\nLet $f(x) = (a/x)^x$ for $a,x > 0$. When is this maximized? The following might be helpful\n\n::: {.cell hold='true' execution_count=97}\n``` {.julia .cell-code}\n@syms x::positive a::postive\ndiff((a/x)^x, x)\n```\n\n::: {.cell-output .cell-output-display execution_count=93}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\left(\\frac{a}{x}\\right)^{x} \\left(\\log{\\left(\\frac{a}{x} \\right)} - 1\\right)\n\\]\n</span>\n```\n:::\n:::\n\n\nThis can be `solve`d to discover the answer.\n\n::: {.cell hold='true' execution_count=98}\n\n::: {.cell-output .cell-output-display execution_count=94}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='2900001479542526707' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_2900001479542526707\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2900001479542526707_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2900001479542526707\"\n id=\"radio_2900001479542526707_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(a/e\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2900001479542526707_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2900001479542526707\"\n id=\"radio_2900001479542526707_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(e/a\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2900001479542526707_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2900001479542526707\"\n id=\"radio_2900001479542526707_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(e\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2900001479542526707_4\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2900001479542526707\"\n id=\"radio_2900001479542526707_4\" value=\"4\">\n </input>\n <span class=\"label-body px-1\">\n \\(a \\cdot e\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='2900001479542526707_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_2900001479542526707\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('2900001479542526707_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_2900001479542526707\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_2900001479542526707\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nThe ladder problem has an trigonometry-free solution. We show one attributed to [Asma](http://www.mathematische-basteleien.de/ladder.htm).\n\n::: {.cell hold='true' execution_count=99}\n\n::: {.cell-output .cell-output-display execution_count=95}\n{}\n:::\n:::\n\n\nIntroducing a variable $p$, we get, following the above figure, the ladder of length $c$ touching the wall at $b+bp$ and $a + x$.\n\n\nUsing similar triangles, we have:\n\n::: {.cell hold='true' execution_count=100}\n``` {.julia .cell-code}\n@syms a::positive b::positive p::positive x::positive\nsolve(x/b ~ (x+a)/(b + b*p), x)\n```\n\n::: {.cell-output .cell-output-display execution_count=96}\n```\n1-element Vector{Sym}:\n a/p\n```\n:::\n:::\n\n\nWith $x = a/p$ we get by Pythagorean's theorem that\n\n\n\n$$\n\\begin{align*}\nc^2 &= (a + a/p)^2 + (b + bp)^2 \\\\\n &= a^2(1 + \\frac{1}{p})^2 + b^2(1+p)^2.\n\\end{align*}\n$$\n\n\nThe ladder problem minimizes $c$ or equivalently $c^2$.\n\n\nWhy is the following set of commands useful in this task:\n\n``` {.julia .cell-code}\nc2 = a^2*(1 + 1/p)^2 + b^2*(1+p)^2\nc2p = diff(c2, p)\neq = numer(together(c2p))\nsolve(eq ~ 0, p)\n```\n\n\n::: {.cell hold='true' execution_count=102}\n\n::: {.cell-output .cell-output-display execution_count=97}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='16667848741121653462' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_16667848741121653462\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16667848741121653462_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16667848741121653462\"\n id=\"radio_16667848741121653462_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n It finds the critical points\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16667848741121653462_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16667848741121653462\"\n id=\"radio_16667848741121653462_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n It finds the minimal value of <code>p</code>\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16667848741121653462_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16667848741121653462\"\n id=\"radio_16667848741121653462_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n It finds the minimal value of <code>c</code>\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='16667848741121653462_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_16667848741121653462\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('16667848741121653462_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_16667848741121653462\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_16667848741121653462\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nThe polynomial `nu` is what degree in `p`?\n\n::: {.cell hold='true' execution_count=103}\n\n::: {.cell-output .cell-output-display execution_count=98}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='3363536479898455844' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_3363536479898455844\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"3363536479898455844\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='3363536479898455844_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"3363536479898455844\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 4) <= 0);\n var msgBox = document.getElementById('3363536479898455844_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_3363536479898455844\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_3363536479898455844\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\nThe only positive real solution for $p$ from $nu$ is\n\n::: {.cell hold='true' execution_count=104}\n\n::: {.cell-output .cell-output-display execution_count=99}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='427612891768514364' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_427612891768514364\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_427612891768514364_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_427612891768514364\"\n id=\"radio_427612891768514364_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(1\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_427612891768514364_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_427612891768514364\"\n id=\"radio_427612891768514364_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\((a/b)^{2/3}\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_427612891768514364_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_427612891768514364\"\n id=\"radio_427612891768514364_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(\\sqrt{3}/2 \\cdot (a/b)^{2/3}\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='427612891768514364_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_427612891768514364\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 2;\n var msgBox = document.getElementById('427612891768514364_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_427612891768514364\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_427612891768514364\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nIn [Hall](https://www.maa.org/sites/default/files/hall03010308158.pdf) we can find a dozen optimization problems related to the following figure of the parabola $y=x^2$ a point $P=(a,a^2)$, $a > 0$, and its normal line. We will do two.\n\n::: {.cell hold='true, echo' execution_count=105}\n``` {.julia .cell-code}\np = plot(; legend=false, aspect_ratio=:equal, axis=nothing, border=:none)\n\tb = 2.\n\tplot!(p, x -> x^2, -b, b)\n\tplot!(p, [-b,b], [0,0])\n\tplot!(p, [0,0], [0, b^2])\n\ta = 1\n\tscatter!(p, [a],[a^2])\n\tm = 2a\n\tplot!(p, x -> a^2 + m*(x-a), 1/2, b)\n\tmₚ = -1/m\n\tplot!(p, x -> a^2 + mₚ*(x-a))\n\tscatter!(p, [-3/2], [(3/2)^2])\n\tannotate!(p, [(1+1/4, 1+1/8, \"P\"), (-3/2-1/4, (-3/2)^2-1/4, \"Q\")])\np\n```\n\n::: {.cell-output .cell-output-display execution_count=100}\n{}\n:::\n:::\n\n\nWhat do these commands do?\n\n::: {.cell hold='true' execution_count=106}\n``` {.julia .cell-code}\n@syms x::real, a::real\nmₚ = - 1 / diff(x^2, x)(a)\nsolve(x^2 - (a^2 + mₚ*(x-a)) ~ 0, x)\n```\n\n::: {.cell-output .cell-output-display execution_count=101}\n```\n2-element Vector{Sym}:\n a\n -a - 1/(2*a)\n```\n:::\n:::\n\n\n::: {.cell hold='true' execution_count=107}\n\n::: {.cell-output .cell-output-display execution_count=102}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='2209974711139371570' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_2209974711139371570\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2209974711139371570_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2209974711139371570\"\n id=\"radio_2209974711139371570_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n It finds the tangent line\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2209974711139371570_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2209974711139371570\"\n id=\"radio_2209974711139371570_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n It finds the point \\(P\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_2209974711139371570_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_2209974711139371570\"\n id=\"radio_2209974711139371570_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n It finds the \\(x\\) value of the intersection points of the normal line and the parabola\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='2209974711139371570_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_2209974711139371570\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('2209974711139371570_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_2209974711139371570\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_2209974711139371570\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\nNumerically, find the value of $a$ that minimizes the $y$ coordinate of $Q$.\n\n::: {.cell hold='true' execution_count=108}\n\n::: {.cell-output .cell-output-display execution_count=103}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='7771735743217274760' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_7771735743217274760\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"7771735743217274760\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='7771735743217274760_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"7771735743217274760\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 0.7071067811865476) <= 0.001);\n var msgBox = document.getElementById('7771735743217274760_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_7771735743217274760\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_7771735743217274760\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\nNumerically find the value of $a$ that minimizes the length of the line seqment $PQ$.\n\n\n\n```{juila}\n#| hold: true\n#| echo: false\nx(a) = -a - 1/(2a)\nd(a) = (a-x(a))^2 + (a^2 - x(a)^2)^2\na = find_zero(d', 1)\nnumericq(a)\n```\n\n",
|
||
"supporting": [
|
||
"optimization_files"
|
||
],
|
||
"filters": [],
|
||
"includes": {
|
||
"include-in-header": [
|
||
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\" integrity=\"sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==\" crossorigin=\"anonymous\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js\" integrity=\"sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==\" crossorigin=\"anonymous\"></script>\n<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>\n"
|
||
]
|
||
}
|
||
}
|
||
} |