let x = the number
let d = the difference.
the formula for the arithmetic sequence is An = A1 + (n-1) * d
let x = A1
let d = d
let n start at 1 for the first member in the sequence.
your arithmetic sequence formula becomes:
A1 = x + (1-1) * d = x
A2 = x + (2-1) * d = x + d
A3 = x + (3-1) * d = x + 2d
the first 3 numbers in your sequence are:
x
x + d
x + 2d
the sum of these first 3 numbers is 18.
you get:
3x + 3d = 18
when you square these numbers, you get:
x^2 = x^2
(x + d)^2 = x^2 + 2dx + d^2
(x + 2d)^2 = x^2 + 4dx + 4d^2
the sum of the squared numbers is equal to:
3x^2 + 6dx + 5d^2
this sum is equal to 126, so you get:
3x^2 + 6dx + 5d^2 = 126
subtract 126 from both sides of this equation and you get:
3x^2 + 6dx + 5d^2 - 126 = 0
that quadratic equation is now in standard form and can be factored.
you have 2 equations that need to be solved simultaneously.
they are:
3x + 3d = 18
3x^2 + 6dx + 5d^2 - 126 = 0
solve for d in the first equation and then substitute that value for d in the second equation.
3x + 3d = 18 is your first equation.
solve for d to get:
d = 6 - x
3x^2 + 6dx + 5d^2 - 126 = 0 is your second equation
replace d with (6-x) in that equation to get:
3x^2 + 6*(6-x)*x + 5*((6-x)^2) - 126 = 0
simplify that equation to get:
3x^2 + 36x - 6x^2 + 5*(36 - 12x + x^2) - 126 = 0
simplify that equation further by distributing the multiplication to get:
3x^2 + 36x - 6x^2 + 180 - 60x + 5x^2 - 126 = 0
simplify that equation further by combining like terms to get:
2x^2 - 24x + 54 = 0
divide both sides of this equation by 2 to get:
x^2 - 12x + 27 = 0
factor this equation to get:
(x-3) * (x-9) = 0
your solutions are either x = 3 or x = 9.
use the first equation of d = 6 - x to get:
when x = 3, d = 3
when x = 9, d = -3
those are your potential solutions.
you need to confirm them by replacing x and d in the original equations with them to see if the equations hold true.
when x = 3, d = 3
3x + 3d = 18 becomes 9 + 9 = 18 which is true.
when x = 9, d = -3 and you get 3x + 3d = 27 - 9 = 18 which is also true.
the sum of the arithmetic sequence is true.
let's look at the individual sequence and then square the numbers to see if the squared sequence is also true.
when x = 3 and d = 3, your sequence is:
3
6
9
when x = 9 and d = -3, your sequence is:
9
6
3
since they are the same numbers only in reverse order, the sum of their squares will be the same.
3^3 = 9
6^2 = 36
9^2 = 81
9 + 36 + 81 = 126
the sum of the first 3 number in the sequence is equal to 18.
the sum of their squares is equal to 126.
looks like both solutions work.
your solutions are:
x = 3 and d = 3
or:
x = 9 and d = -3