That (meaning #476) is a beautiful problem!
How do people come up with such problems? They just like to play around with maths. It can be a lot of fun! There are some hobby mathematicians and there always have been (e.g. Pierre de Fermat). Play around with parabolas and inscribed shapes enough and you too will come up with such a problem! Also, parabolas are pretty common. From your TV antenna to bathroom mirrors, telescopes, some archways. Kinetic energy at non-relativistic velocities is given by KE = (m/2)v^2, a parabola in the velocity v. The parabola is also a conic section and as such the trajectory of some objects visiting the solar system. There are many more examples from chemistry, physics, astronomy, economics, etc.
It's relatively easy to solve problem 476 using calculus (and some symmetry arguments). A visualisation of the solution can be found below.
But please give the problem a try before you look at my solution that's the only way you'll develop the necessary intuition! If you are having trouble, look at the hints below, but not yet at the actual solution. Disclaimer: There might be an easier solution.
HINTS:
First observe that the sought after size/area of the largest such rectangle cannot depend on the y-position (height) of its centre. The area would be the same on Mount Everest as it is at sea level.
You may shift the graph of f(x) = 2x^2 + 2 and the line segment AB up and down (or alternatively shift the x-axis down and up) by the same constant amount (any amount you like) and you won't change the problem. So let's do that:
000000000000000000000000000000000000000000000000000000000000000000000000000000
Actual SOLUTION (over-explained):
First shift the parabola and the line segment AB down by 4 units such that AB now lies on the x-axis:
A = (-1, 0)
B = (+1, 0)
Observe that line segment AB is perpendicular to the y-axis. This will be important later.
The "new" parabola is given by
g(x) = f(x) - 4 = 2x^2 - 2
which obviously has roots at x = -1 and x = +1 because A and B are still points on the parabola.
Now suppose one vertex of the family of rectangles lies between point A and point B at a position x which we don't yet pretend to know. We know that -1 ≤ x ≤ 1 however. And we know due to the parabola's axial symmetry about the y-axis that if one vertex of the rectangle lies at x, the other vertex (on the line segment AB) MUST lie at -x. Otherwise you could not construct a rectangle for only g(x) = g(-x).
Have you noticed? We already know one side of the family of rectangles! The side parallel to AB (let's call it the "base") has length x - (-x) = 2x.
And we also know the other side ("height") of the rectangles! Its length is simply g(x), isn't that neat? Well, lengths are positive, so the absolute value |g(x)| actually. Instead of taking the absolute value, I like to reflect the parabola over the x-axis instead (well, numerically that's the same as taking the absolute value since |y| = -y if y is negative).
This is achieved by taking -g(x) as the new function. The "new" parabola is h(x) = -g(x) = -2x^2 + 2 which doesn't change the roots.
Now it's clear that the area of the family of rectangles is simply their base multiplied by their height. The base is 2x and the height is h(x) = -2x^2 + 2. So the area is
A(x) = 2x h(x) = -4x^3 + 4x, where -1 ≤ x ≤ 1
To find the rectangle with the largest area, just find the global maximum of this function A(x) on its domain [-1, 1].
These are the BORING steps:
Observe that A(x) is zero at the domain boundaries: A(-1) = A(1) = 0. Which is obvious since the corresponding rectangle would tend to be infinitely thin. So a global maximum, if one exists, must also be a local maximum. Furthermore A(x) is positive (as an area should be) on the open interval (0, 1). Any potential local maximum is thus restricted to that interval. To find (potential) local extrema/critical points, one may calculate the derivative of A(x) and determine its roots:
d/dx (A(x)) = -12x^2 + 4
Use your favourite method to find the roots of a quadratic, e.g.:
x = (1/(2 * (-12))) * (- 0 ± √(0 - 4 * (-12) * 4))
x = -(1/24) * (± 8√3)
x = -(±√3)/3
x = -(±1)/(√3)
So either x = -1/(√3) or x = +1/(√3) ≈ 0.57735. Since local maxima of A(x) can only occur in (0, 1) as established, the positive root corresponds to the local maximum of A(x) and is thus the solution for the largest such rectangle. Best practice would be to also check that the second derivative of A(x) is indeed negative at x = +1/(√3). I'll omit this step because the argument above makes it superfluous here.
Either way we find the rectangle with base (2√3)/3 and height 4/3 to be the largest rectangle possible given the above constraints.
The area of that rectangle is max(A(x)) = (8√3)/9 ≈ 1.5396.
Here's a nice visualisation (DO NOT click this link if you want to solve it yourself!):
https://www.desmos.com/calculator/y2ial8h2ao?lang=en
That (meaning #476) is a beautiful problem!
How do people come up with such problems? They just like to play around with maths. It can be a lot of fun! There are some hobby mathematicians and there always have been (e.g. Pierre de Fermat). Play around with parabolas and inscribed shapes enough and you too will come up with such a problem! Also, parabolas are pretty common. From your TV antenna to bathroom mirrors, telescopes, some archways. Kinetic energy at non-relativistic velocities is given by KE = (m/2)v^2, a parabola in the velocity v. The parabola is also a conic section and as such the trajectory of some objects visiting the solar system. There are many more examples from chemistry, physics, astronomy, economics, etc.
It's relatively easy to solve problem 476 using calculus (and some symmetry arguments). A visualisation of the solution can be found below.
But please give the problem a try before you look at my solution that's the only way you'll develop the necessary intuition! If you are having trouble, look at the hints below, but not yet at the actual solution. Disclaimer: There might be an easier solution.
HINTS:
First observe that the sought after size/area of the largest such rectangle cannot depend on the y-position (height) of its centre. The area would be the same on Mount Everest as it is at sea level.
You may shift the graph of f(x) = 2x^2 + 2 and the line segment AB up and down (or alternatively shift the x-axis down and up) by the same constant amount (any amount you like) and you won't change the problem. So let's do that:
000000000000000000000000000000000000000000000000000000000000000000000000000000
Actual SOLUTION (over-explained):
First shift the parabola and the line segment AB down by 4 units such that AB now lies on the x-axis:
A = (-1, 0)
B = (+1, 0)
Observe that line segment AB is perpendicular to the y-axis. This will be important later.
The "new" parabola is given by
g(x) = f(x) - 4 = 2x^2 - 2
which obviously has roots at x = -1 and x = +1 because A and B are still points on the parabola.
Now suppose one vertex of the family of rectangles lies between point A and point B at a position x which we don't yet pretend to know. We know that -1 ≤ x ≤ 1 however. And we know due to the parabola's axial symmetry about the y-axis that if one vertex of the rectangle lies at x, the other vertex (on the line segment AB) MUST lie at -x. Otherwise you could not construct a rectangle for only g(x) = g(-x).
Have you noticed? We already know one side of the family of rectangles! The side parallel to AB (let's call it the "base") has length x - (-x) = 2x.
And we also know the other side ("height") of the rectangles! Its length is simply g(x), isn't that neat? Well, lengths are positive, so the absolute value |g(x)| actually. Instead of taking the absolute value, I like to reflect the parabola over the x-axis instead (well, numerically that's the same as taking the absolute value since |y| = -y if y is negative).
This is achieved by taking -g(x) as the new function. The "new" parabola is h(x) = -g(x) = -2x^2 + 2 which doesn't change the roots.
Now it's clear that the area of the family of rectangles is simply their base multiplied by their height. The base is 2x and the height is h(x) = -2x^2 + 2. So the area is
A(x) = 2x h(x) = -4x^3 + 4x, where -1 ≤ x ≤ 1
To find the rectangle with the largest area, just find the global maximum of this function A(x) on its domain [-1, 1].
These are the BORING steps:
Observe that A(x) is zero at the domain boundaries: A(-1) = A(1) = 0. Which is obvious since the corresponding rectangle would tend to be infinitely thin. So a global maximum, if one exists, must also be a local maximum. Furthermore A(x) is positive (as an area should be) on the open interval (0, 1). Any potential local maximum is thus restricted to that interval. To find (potential) local extrema/critical points, one may calculate the derivative of A(x) and determine its roots:
d/dx (A(x)) = -12x^2 + 4
Use your favourite method to find the roots of a quadratic, e.g.:
x = (1/(2 * (-12))) * (- 0 ± √(0 - 4 * (-12) * 4))
x = -(1/24) * (± 8√3)
x = -(±√3)/3
x = -(±1)/(√3)
So either x = -1/(√3) or x = +1/(√3) ≈ 0.57735. Since local maxima of A(x) can only occur in (0, 1) as established, the positive root corresponds to the local maximum of A(x) and is thus the solution for the largest such rectangle. Best practice would be to also check that the second derivative of A(x) is indeed negative at x = +1/(√3). I'll omit this step because the argument above makes it superfluous here.
Either way we find the rectangle with base (2√3)/3 and height 4/3 to be the largest rectangle possible given the above constraints.
The area of that rectangle is max(A(x)) = (8√3)/9 ≈ 1.5396.
Here's a nice visualisation (DO NOT click this link if you want to solve it yourself!):
https://www.desmos.com/calculator/y2ial8h2ao?lang=en