the sum of four terms of an a.p. is 4 and the sum of product of first and last term and product of middle terms in -38, then find the numbes.

terms are

a, a+d, a+2d, a+3d

4a + 6d = 4
2a + 3d = 2 ---> a = (2-3d)/2

a(a+3d) + (a+d)(a+2d) = -38
a^2 + 3ad + a^2 + 3ad + 2d^2 = 38
2a^2 + 6ad + 2d^2 = -38
2(4 - 12d + 9d^2)/4 + 6d(2-3d)/2 + 2d^2 = -38
(4 - 12d + 9d^2)/2 + 6d(2-3d)/2 + 2d^2 = -38
times 2
4 - 12d + 9d^2 + 12d - 18d^2 + 4d^2 + 76 = 0

solve for d, it comes out as a nice number
d = ± ...
sub back into a = ....

To find the numbers in the arithmetic progression (AP), we can start by setting up the equations given in the problem.

Let's assume the first term of the AP is 'a', and the common difference is 'd'.

The sum of the four terms can be found using the formula for the sum of an AP:
Sum = (n/2) * (2a + (n-1)d)

In this case, the sum is given as 4, so we have the equation:
4 = (4/2) * (2a + (4-1)d)
= 2 * (2a + 3d)
= 4a + 6d

Next, we are given another equation involving the products of the terms.

The sum of the product of the first and last term (a and a+3d) and the product of the middle terms (a+d and a+2d) is -38. So, we have the equation:
-38 = (a*(a+3d)) + ((a+d)*(a+2d))

Expanding and simplifying, we get:
-38 = (a^2 + 3ad) + (a^2 + 3ad + 2ad + 2d^2)
= 2a^2 + 8ad + 2d^2

Now we have two equations:
4a + 6d = 4 ...(Equation 1)
2a^2 + 8ad + 2d^2 = -38 ...(Equation 2)

We can solve this system of equations to find the values of 'a' and 'd'.

To solve the equations, let's multiply Equation 1 by 2, which gives us:
8a + 12d = 8 ...(Equation 3)

Now let's subtract Equation 3 from Equation 2:
(2a^2 + 8ad + 2d^2) - (8a + 12d) = -38 - 8

This simplifies to:
2a^2 - 8a + 2d^2 - 12d = -46

Dividing both sides by 2 gives us:
a^2 - 4a + d^2 - 6d = -23 ...(Equation 4)

Now we have two equations:
a^2 - 4a + d^2 - 6d = -23 ...(Equation 4)
4a + 6d = 4 ...(Equation 1)

We can solve these equations simultaneously to find the values of 'a' and 'd'.

Once we find the values of 'a' and 'd', we can easily calculate the terms of the arithmetic progression.