How to Graphically Determine the Minimum of a Function Under a Constraint?

In summary, the problem asks for the minimum value of the sum of the squares of two real numbers, given that their sum is 1. This can be graphically approached by finding the minimum radius of a circle that intersects the line y=1-x and the origin (0,0). By setting the discriminant of the equation of the circle equal to zero, the minimum radius is found to be 0.5, and the point of intersection between the circle and the line is (0.5, 0.5). This is the minimum value of the sum of squares, which is also the minimum value of the sum of the two real numbers.
  • #1
SweatingBear
119
0
Problem:
The sum of two real numbers is \(\displaystyle 1\). What is the minimum value of the sum of the squares of the two numbers?

I have already managed to solve the problem algebraically (by substitution and completing-the-square we arrive at a minimum value of \(\displaystyle 0.5\)), but what I am interested in is a graphical approach.

We have \(\displaystyle x +y = 1\) and wish to find the minimum of \(\displaystyle x^2 + y^2\), which we can call \(\displaystyle f(x,y)\). So we have

\(\displaystyle \begin{cases}
x +y = 1 \\
x^2 + y^2 = f(x,y) \, .
\end{cases}\)

In a (cartesian) coordinate system these two equations represent a line and a circle respectively. Therefore the problem boils down to figuring out what the minimum radius of the circle is \(\displaystyle x^2 + y^2 = f(x,y)\), but this is where I am unable to continue. How can one graphically find the minimum radius of the circle?
 
Mathematics news on Phys.org
  • #2
sweatingbear said:
Problem:
The sum of two real numbers is \(\displaystyle 1\). What is the minimum value of the sum of the squares of the two numbers?

I have already managed to solve the problem algebraically (by substitution and completing-the-square we arrive at a minimum value of \(\displaystyle 0.5\)), but what I am interested in is a graphical approach.

We have \(\displaystyle x +y = 1\) and wish to find the minimum of \(\displaystyle x^2 + y^2\), which we can call \(\displaystyle f(x,y)\). So we have

\(\displaystyle \begin{cases}
x +y = 1 \\
x^2 + y^2 = f(x,y) \, .
\end{cases}\)

In a (cartesian) coordinate system these two equations represent a line and a circle respectively. Therefore the problem boils down to figuring out what the minimum radius of the circle is \(\displaystyle x^2 + y^2 = f(x,y)\), but this is where I am unable to continue. How can one graphically find the minimum radius of the circle?

Hi sweatingbear! :)

Consider all concentric circles around zero.
You're interested in the smallest one, which would just touch the line y=1-x.
Due to the symmetry of the problem in the line y=x, the point where the circle would touch the line y=1-x will be at the point where y=x.
This is x=y=1/2.

Here's a picture to clarify.
View attachment 991
 

Attachments

  • concentric_circles.png
    concentric_circles.png
    4.6 KB · Views: 95
Last edited:
  • #3
One way, is to let $y=1-x$ in the equation of the circle:

\(\displaystyle x^2+(1-x)^2=r^2\)

\(\displaystyle 2x^2-2x+1-r^2=0\)

Now, the minimum possible radius requires the discriminant to be zero (do you see why?), and so we get:

\(\displaystyle (-2)^2-4(2)(1-r^2)=0\)

\(\displaystyle r^2=\frac{1}{2}\)

and we find:

\(\displaystyle 4x^2-4x+1=0\)

Hence:

\(\displaystyle (x,y)=\left(\frac{1}{2},\frac{1}{2} \right)\)
 
  • #4
I like Serena said:
Hi sweatingbear! :)

Consider all concentric circles around zero.
You're interested in the smallest one, which would just touch the line y=1-x.
Due to the symmetry of the problem in the line y=x, the point where the circle would touch the line y=1-x will be at the point where y=x.
This is x=y=1/2.

Here's a picture to clarify.
https://www.physicsforums.com/attachments/991

Let me see if I got it straight: In the coordinate system the sum of the squares can be visualized as the squared value of the radius of the circle. Should we wish to minimize the squared value of the radius then that is equivalent to the task of minimizing the radius of the circle. Moreover the only points of interest are those where the circle intercepts the line because those are the only one points where the sum of \(\displaystyle x\) and \(\displaystyle y\) is \(\displaystyle 1\).

So the task at hand is to find a point (or points) where the circle intersects the line and where the distance between the point in question and (0,0) is as small as possible. We can trivially conclude that this point must be where the circle tangentially intersects the line because otherwise the points will be at an arbitrarily large distance away from (0,0).

Any thoughts on that, I Like Serena?

MarkFL said:
One way, is to let $y=1-x$ in the equation of the circle:

\(\displaystyle x^2+(1-x)^2=r^2\)

\(\displaystyle 2x^2-2x+1-r^2=0\)

Now, the minimum possible radius requires the discriminant to be zero (do you see why?), and so we get:

\(\displaystyle (-2)^2-4(2)(1-r^2)=0\)

\(\displaystyle r^2=\frac{1}{2}\)

and we find:

\(\displaystyle 4x^2-4x+1=0\)

Hence:

\(\displaystyle (x,y)=\left(\frac{1}{2},\frac{1}{2} \right)\)

Continuing on from the discourse above: Since we were able to conclude that the circle ought to tangentially intercept the line, this means that it intersects the line at one and only one point. Thus we will have to require that the discriminant is equal to zero (otherwise the circle will not tangentially intercept the line; either not at all or at two distinct points) which finally yields \(\displaystyle r = 0.5\). Is that a sufficient answer for "why" or were you thinking of a different answer, MarkFL?
 
  • #5
sweatingbear said:
Let me see if I got it straight: In the coordinate system the sum of the squares can be visualized as the squared value of the radius of the circle. Should we wish to minimize the squared value of the radius then that is equivalent to the task of minimizing the radius of the circle. Moreover the only points of interest are those where the circle intercepts the line because those are the only one points where the sum of \(\displaystyle x\) and \(\displaystyle y\) is \(\displaystyle 1\).

So the task at hand is to find a point (or points) where the circle intersects the line and where the distance between the point in question and (0,0) is as small as possible. We can trivially conclude that this point must be where the circle tangentially intersects the line because otherwise the points will be at an arbitrarily large distance away from (0,0).

Any thoughts on that, I Like Serena?

Yep. That's right.
 
  • #6
sweatingbear said:
...
Continuing on from the discourse above: Since we were able to conclude that the circle ought to tangentially intercept the line, this means that it intersects the line at one and only one point. Thus we will have to require that the discriminant is equal to zero (otherwise the circle will not tangentially intercept the line; either not at all or at two distinct points) which finally yields \(\displaystyle r = 0.5\). Is that a sufficient answer for "why" or were you thinking of a different answer, MarkFL?

Yes, that is correct. (Yes)
 
  • #7
Thanks, both of you!
 
  • #8
MarkFL said:
One way, is to let $y=1-x$ in the equation of the circle:

\(\displaystyle x^2+(1-x)^2=r^2\)

\(\displaystyle 2x^2-2x+1-r^2=0\)

Since this is a minimisation problem, I expect that calculus is required.

If we call the sum of squares \(\displaystyle \displaystyle \begin{align*} S = x^2 + y^2 = x^2 + \left( 1 - x \right) ^2 = 2x^2 - 2x + 1 \end{align*}\) then the minimum is where the derivative is 0 and the second derivative is positive.

\(\displaystyle \displaystyle \begin{align*} \frac{dS}{dx} &= 4x - 2 \\ 0 &= 4x - 2 \\ 2 &= 4x \\ \frac{1}{2} &= x \\ \\ \frac{d^2S}{dx^2} &= 4 \\ &> 0 \end{align*}\)

So there is a minimum where \(\displaystyle \displaystyle \begin{align*} x = \frac{1}{2} \end{align*}\), and so \(\displaystyle \displaystyle \begin{align*} y = 1 - \frac{1}{2} = \frac{1}{2} \end{align*}\). So the minimum sum of squares is when the two numbers are both \(\displaystyle \displaystyle \begin{align*} \frac{1}{2} \end{align*}\), and this sum is \(\displaystyle \displaystyle \begin{align*} \left( \frac{1}{2} \right) ^2 + \left( \frac{1}{2} \right) ^2 = \frac{1}{4} + \frac{1}{4} = \frac{1}{2} \end{align*}\).
 
  • #9
With a quadratic function, optimization can be accomplished simply by locating the axis of symmetry. Given:

\(\displaystyle 2x^2-2x+1-r^2=0\)

We find the axis of symmetry at:

\(\displaystyle x=-\frac{-2}{2\cdot2}=\frac{1}{2}\)

Knowing the parabolic function has a positive coefficient on its squared term, we can then conclude it has a minimum at $x=\dfrac{1}{2}$.
 
  • #10
Hi sweatingbear,
I'm responding to your original question about a graphical approach. Given:
An object function f(x,y)
A constraint equation g(x,y)=0
The problem is to find the minimum value of f(x0,y0) for all points (x0,y0) on the curve g(x,y)=0.
Assume all curves involved are "nice and smooth"; however they need not be connected.

1. If you can solve g(x,y)=0 for y, say y=h(x), graph the function f(x,h(x)). Find the lowest point on this graph. In your example y=h(x)=1-x, so graph x2+(1-x)2 and find the lowest point to be (1/2,1/2). The desired minimum is then 1/4. "Usually" you can't solve the constraint equation for y.
2. Graph the constraint curve g(x,y)=0 and for different values of m, graph the curve f(x,y)=m. If the two curves don't intersect, no point (x,y) of the constraint can have value f(x,y)=m. Otherwise, graphically try and find the smallest m where the curves intersect. (You need a good graphing calculator or graphing software with a slider for m to do this.) It turns out for "smooth" curves, this minimum occurs at a point (x0,y0) with the tangent lines to the two curves at this point the same! If you go on to calculus, this is the basis for the "Lagrange multiplier method".

I've attached a graph which shows the situation in 2. To really appreciate how this works, you need to do it yourself.
 

Attachments

  • MHBgraphicoptimization.png
    MHBgraphicoptimization.png
    16.6 KB · Views: 64

FAQ: How to Graphically Determine the Minimum of a Function Under a Constraint?

What is the concept of "minimum of sum of squares"?

The minimum of sum of squares is a statistical method used to find the best-fitting line or curve for a set of data points. It aims to minimize the sum of the squared distances between each data point and the line or curve. This method is commonly used in regression analysis to determine the relationship between variables.

Why is "minimum of sum of squares" important?

The minimum of sum of squares is important because it allows us to find the most accurate representation of a relationship between variables, which can then be used for prediction or analysis. It also provides a quantitative measure of how well the line or curve fits the data, making it easier to compare different models.

How is "minimum of sum of squares" calculated?

The calculation of the minimum of sum of squares involves finding the sum of the squared differences between the observed data points and the predicted values from the line or curve. This sum is then minimized by adjusting the parameters of the line or curve until the best fit is achieved.

What is the difference between "minimum of sum of squares" and "least squares"?

Minimum of sum of squares and least squares are closely related, but not the same. While minimum of sum of squares focuses on minimizing the sum of the squared distances between data points and the line or curve, least squares minimizes the sum of the squared errors between the actual data and the predicted values. In other words, least squares takes into account the errors or residuals of the data points, while minimum of sum of squares does not.

What are the limitations of "minimum of sum of squares"?

One limitation of minimum of sum of squares is that it assumes a linear relationship between the variables being analyzed. If the relationship is non-linear, the method may not provide an accurate representation of the data. Additionally, the results can be affected by outliers in the data, as they can heavily influence the calculation of the sum of squares. It is important to consider these limitations when using this method for data analysis.

Similar threads

Replies
1
Views
869
Replies
7
Views
2K
Replies
2
Views
995
Replies
2
Views
1K
Replies
4
Views
1K
Replies
3
Views
1K
Replies
1
Views
1K
Back
Top