Minimize the sum of the squares

In summary, two positive numbers have a sum of n. The smallest possible value for the sum of their squares is n^2/2.
  • #1
star321
7
0
Hello
i need help with a question, other people tried to help me, i just cannot get it! its driving me crazy:grumpy:

Two positive numbers have sum n. What is the smallest value possible for the sum of their squares?

so i have n=x+y
x>0 y>0

y=n-x

we want to minimize S S=x^2+y^2
S=x^2+(n-x)^2
S'=2x-2(n-x)
S'=2x-2n+2x
S'=4x-2n


now ? The above is what I have been shown to do... the red part doesn't make much sense to me... Can someone please help me to continue on...
 
Physics news on Phys.org
  • #2
What class is this problem in? If it is a calculus problem, then you should know how to take the derivative of x^2 and (n-x)^2 (using the chain rule for the latter). Since the derivative measrures how fast a function is increasing, if S' is positive, for a specific x, the function is increasing- choosing x smaller will make S smaller so that value is not the minimum. If S' is negative, the function is decreasing- choosing x larger will make S smaller so that value is not the minimum. The minimum must occur where the derivative S' is 0. S'= 4x- 2n= 0 give 4x= 2n or x= n/2. Then y= n- n/2= n/2. The minimum occurs when x= y= n/2. The smallest possible value of x^2+ y^2 is n^2/4+ n^2/4= n^2/2.

If this is NOT for a calculus class and you do not know how to take the derivative, you can still do the problem by completing the square:
S= x^2+ (n-x)^2= x^2+ n^2- 2nx+ x^2= 2x^2- 2nx+ n^2= 2(x^2- nx)+ n^2. We complete the square by adding (and subtracting) (-n/2)^2= n^2/4. 2(x^2- nx+ n^2/4- n^2/4)+ n^2= 2(x^2- nx+ n^2/4)- n^2/2+ n^2= 2(x- n/2)^2+ n^2/2. Since a square is never negative, S is n^2/2 plus something unless x= n/2 in which case it is n^2/2+ 0= n^2/2.
 
  • #3
leave answer with variables?

Hi

So this problem is for first year university calculus.

I got confused about the derivative... i do know how to do derivates... too much calculus in one day:yuck: i guess.

So from the steps shown, I followed them and they seem pretty clear.
So do I not calculate an actual number then... just leave answers with variables?
Thanks again for the help :smile:
 
  • #4
So do I not calculate an actual number then... just leave answers with variables?
n is the only variable.The answer should be in terms of n :smile:
 
  • #5
star321 said:
we want to minimize S S=x^2+y^2
S=x^2+(n-x)^2
S'=2x-2(n-x)
S'=2x-2n+2x
S'=4x-2n
Yes, this is good. :)
Ok, you should notice that 0 <= x <= n, right?
If the derivative of a function at some point, say x0, is positive, then the function is increasing at that point. Otherwise, if it's negative, then the function is decreasing.
So for 0 <= x < n / 2, S' < 0, right? So the function S is decreasing in that interval.
For n / 2 < x < n, S' > 0, the function S is increasing.
So for x = n / 2, S takes the smallest value. Can you find that value?
Is everything clear now? :)
 

1. What is the objective of "Minimize the sum of the squares"?

The objective of "Minimize the sum of the squares" is to find the values of a set of variables that minimize the sum of the squared differences between a given set of data points and a predicted line or curve.

2. How is "Minimize the sum of the squares" used in statistics?

"Minimize the sum of the squares" is a commonly used method in statistics to find the best-fit line or curve for a set of data points. It is often used in regression analysis to estimate the relationship between variables and make predictions based on the data.

3. What is the difference between "Minimize the sum of the squares" and "Minimize the sum of the absolute values"?

The main difference between these two methods is the way they measure the errors between the predicted values and the actual data points. "Minimize the sum of the squares" uses the squared differences, while "Minimize the sum of the absolute values" uses the absolute differences. The method of minimizing the sum of the squares is more commonly used as it is more sensitive to large errors and can provide a better fit for the data.

4. What are the advantages of using "Minimize the sum of the squares"?

One of the main advantages of using "Minimize the sum of the squares" is that it is a well-established and widely used method for finding the best-fit line or curve for a given set of data. It also has a closed-form solution, meaning that the optimal values of the variables can be calculated directly without the need for complex calculations or iterations. Additionally, it is more sensitive to outliers and can provide a better fit for non-linear relationships between variables.

5. Are there any limitations to using "Minimize the sum of the squares"?

While "Minimize the sum of the squares" is a useful method, it does have some limitations. It assumes that the errors in the data are normally distributed and that the relationship between variables is linear. If these assumptions are not met, the results may not accurately reflect the true relationship between the variables. Additionally, it is important to carefully consider the interpretation of the results and not rely solely on the statistical significance of the obtained values.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
480
  • Calculus and Beyond Homework Help
Replies
4
Views
126
  • Calculus and Beyond Homework Help
Replies
6
Views
695
  • Calculus and Beyond Homework Help
Replies
3
Views
467
  • Calculus and Beyond Homework Help
Replies
5
Views
490
  • Calculus and Beyond Homework Help
Replies
10
Views
289
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
358
  • Calculus and Beyond Homework Help
Replies
6
Views
794
  • Calculus and Beyond Homework Help
Replies
14
Views
432
Back
Top