# Example of a calculus optimization problem where the answer occurs at an endpoint

I'm teaching optimization problems in calculus right now. An easy example would be something like: Find the dimensions of a rectangle with perimeter $$100$$ m whose area is as large as possible. The goal would be to find the value of $$x$$ that maximizes $$A(x) = x(\frac{100-2x}{2}) = x(50 - x),$$ where $$x \in [0, 50].$$ When working over a closed interval, I teach them to find the critical points, and then evaluate $$A(x)$$ at the critical points and also the endpoints of $$[0, 50].$$ They know that critical points aren't necessarily absolute max's or min's, so that's why they need to check the endpoints as well. My question is if there are any examples of some optimization problems where the absolute max or absolute min occurs at the endpoints of a closed interval. Every time we do these problems, the answer is always at the critical point, and it makes the last step of checking the endpoints seem pointless.

• I assume you mean application-ish examples? Generally this will mean that somehow there is no tradeoff to making $x$ as large or small as possible, so this amounts to situations like a profit function where the revenue per unit always exceeds the cost per unit. Or else that there is a tradeoff but it only comes into play outside the domain that you're limited to. – Ian Oct 29 at 16:34
• Yes that's the idea – Smash Oct 29 at 16:35
• Just keep your existing applications. The maximum of a convex function over a convex set occurs at the boundary, so as long as the objective function is nonlinear, you can always pick a sense (max or min) such that the optimal solution is at the boundary. – LinAlg Oct 29 at 16:36

Suppose your rectangle is limited to having width $$\leq 20$$ (i.e., same maximization problem but $$x\in[0,20]$$). Now the maximum will occur at the endpoint $$x=20$$. This example may be unsatisfactory since now the critical point doesn't even lie in the interval, but you can easily cook up an example where the critical points do occur inside the interval yet the extrema are on the boundary. For instance, finding the maximum and minimum of $$y=x^3-x$$ on $$[-2,2]$$.
The height of an object above the surface of the water is modeled by the function $$h(t)=-t^3+5t^2-8t+4$$ On the interval $$t\in[0,3]$$, when was the object furthest above the water? Furthest underwater?
Critical numbers are $$t=\frac43, 2$$. Test and compare $$h(0), h(\frac43), h(2), h(3)$$ to get extreme values.
The object is furthest above the water at $$t=0$$ and is furthest underwater at $$t=3$$.