The sum of the first and fourth terms of an arithimetic sequences is 2 and the sum of their squares is 20

1. Find the common difference
2.find the sum of the first eight terms of the squence

a + a+3d = 2

a^2 + (a+3d)^2 = 20

you will get two solutions.

I need solution and answers

To find the common difference in an arithmetic sequence, we can use the formula for the nth term of an arithmetic sequence:

an = a1 + (n - 1)d

where:
an is the nth term,
a1 is the first term,
n is the position of the term in the sequence,
d is the common difference.

1. Find the common difference:
Let's use the given information to form two equations.
Given:
a1 + a4 = 2 ......(Equation 1)
a1^2 + a4^2 = 20 ......(Equation 2)

We know that a4 = a1 + 3d. Substituting this value in Equation 1, we get:
a1 + (a1 + 3d) = 2
2a1 + 3d = 2 ......(Equation 3)

Similarly, substituting a4 = a1 + 3d in Equation 2, we get:
a1^2 + (a1 + 3d)^2 = 20
a1^2 + a1^2 + 6ad + 9d^2 = 20
2a1^2 + 6ad + 9d^2 = 20 ......(Equation 4)

Now we can solve Equations 3 and 4 simultaneously to find the values of a1 and d. Once we find the value of d, it will be the common difference.

2. Find the sum of the first eight terms of the sequence:
The sum of the first n terms of an arithmetic sequence can be found using the formula:

Sn = n/2 * (2a1 + (n - 1)d)

where:
Sn is the sum of the first n terms,
a1 is the first term,
n is the number of terms,
d is the common difference.

In this case, we need to find the sum of the first eight terms (n = 8) of the sequence using the common difference we found in step 1. Substituting these values, we can find the answer.