Numbers Finder by Sum and Sum of Squares

Input the sum and sum of squares, and instantly find the two numbers.

Calculate Two Numbers Using Their Sum and Sum of Squares

Result

How to Calculate Two Numbers Using Their Sum and Sum of Squares

Given:

  • \( S \): the sum of the two numbers (\( x + y \))
  • \( P \): the sum of their squares (\( x^2 + y^2 \))

Steps:

  1. Set up relationships: \( x + y = S, \quad x^2 + y^2 = P \)
  2. Express the square of the sum: \( (x + y)^2 = x^2 + y^2 + 2xy \)
  3. Substitute known values: \( S^2 = P + 2xy \)
  4. Solve for \( xy \) (the product of the two numbers): \( xy = \frac{S^2 - P}{2} \)
  5. Use the quadratic formula based on sum and product to find the numbers: \( t^2 - St + xy = 0 \)
  6. Solve for \( x \) and \( y \): \( x, y = \frac{S \pm \sqrt{S^2 - 4 \cdot xy}}{2} \)

Examples

Example 1: The sum of two numbers is 20, and their sum of squares is 208. What are the numbers?

Solution:

1. Compute \( xy \):

\( xy = \frac{20^2 - 208}{2} = \frac{400 - 208}{2} = \frac{192}{2} = 96 \)

2. Solve the quadratic equation:

\( t^2 - 20t + 96 = 0 \)

3. Calculate the discriminant:

\( \sqrt{20^2 - 4 \cdot 96} = \sqrt{400 - 384} = \sqrt{16} = 4 \)

4. Find the roots:

\( x, y = \frac{20 \pm 4}{2} = 12 \text{ and } 8\)

Result: The numbers are 12 and 8.

Example 2: The sum of two numbers is 25, and their sum of squares is 325. What are the numbers?

Solution:

1. Compute \( xy \):

\( xy = \frac{25^2 - 325}{2} = \frac{625 - 325}{2} = \frac{300}{2} = 150 \)

2. Solve the quadratic equation:

\( t^2 - 25t + 150 = 0 \)

3. Calculate the discriminant:

\( \sqrt{25^2 - 4 \cdot 150} = \sqrt{625 - 600} = \sqrt{25} = 5 \)

4. Find the roots:

\( x, y = \frac{25 \pm 5}{2} = 15 \text{ and } 10 \)

Result: The numbers are 15 and 10.

Example 3: The sum of two numbers is 34, and their sum of squares is 610. What are the numbers?

Solution:

1. Compute \( xy \):

\( xy = \frac{34^2 - 610}{2} = \frac{1156 - 610}{2} = \frac{546}{2} = 273 \)

2. Solve the quadratic equation:

\( t^2 - 34t + 273 = 0 \)

3. Calculate the discriminant:

\( \sqrt{34^2 - 4 \cdot 273} = \sqrt{1156 - 1092} = \sqrt{64} = 8 \)

4. Find the roots:

\( x, y = \frac{34 \pm 8}{2} = 21 \text{ and } 13 \)

Result: The numbers are 21 and 13.