Find four numbers in AP whose sum is 20 and sum of whose squares is 120.

there is a trick to this. Let the difference be 2d, and the numbers be

x-3d, x-d, x+d, x+3d
https://www.youtube.com/watch?v=y77ULGlzZxQ

To find four numbers in an arithmetic progression (AP) whose sum is 20 and the sum of their squares is 120, you can follow these steps:

Step 1: Define the general formula for an arithmetic progression:
The general formula for an arithmetic progression is:
an = a1 + (n-1)d,
where:
- an is the nth term,
- a1 is the first term,
- d is the common difference between terms, and
- n is the number of terms.

Step 2: Set up equations using the given information:
Let's assume the four numbers in the arithmetic progression are a-d, a, a+d, and a+2d. Here, 'a' represents the second term (because the sum of the four numbers is given as 20) and 'd' represents the common difference.

Based on the assumption, we can form the following equations:

(a-d) + a + (a+d) + (a+2d) = 20, (equation 1) (since the sum is 20)

(a-d)^2 + a^2 + (a+d)^2 + (a+2d)^2 = 120, (equation 2) (since the sum of their squares is 120)

Step 3: Solve the equations simultaneously:
Simplify equation 1:
4a + 2d = 20,

Simplify equation 2:
6a^2 + 10ad + 6d^2 = 120.

Step 4: Solve the simultaneous equations.
From equation 1, rearrange it to solve for d:
d = (20 - 4a) / 2,

Substitute the value of d in equation 2:
6a^2 + 10a((20 - 4a) / 2) + 6((20 - 4a) / 2)^2 = 120,

Expand and simplify equation 2 further:
3a^2 - 5a^2 + 10a^2 - 20a + 3(20 - 4a)^2 = 240,

Combine like terms and expand further:
30a^2 - 40a + 3(400 - 160a + 16a^2) = 240,

Combine like terms and simplify:
30a^2 - 40a + 1200 - 480a + 48a^2 = 240,

Combine like terms again:
78a^2 - 520a + 960 = 0.

Step 5: Solve the quadratic equation:
Using the quadratic formula, where a = 78, b = -520, and c = 960:

a = (-b ± √(b^2 - 4ac)) / 2a

Substituting the values:

a = (-(-520) ± √((-520)^2 - 4 * 78 * 960)) / 2 * 78,

Simplifying even further:

a = (520 ± √(270400 - 299520)) / 156,

a = (520 ± √(-2920)) / 156

Since we have a negative value under the square root, there are no real solutions. Therefore, we cannot find four numbers in an arithmetic progression that satisfy the given conditions.