solve each system of equations algebraically:

x^2+y^2=18
x+y=4

Hey, did this all out below.

To solve the given system of equations algebraically, we'll use the method of substitution:

Step 1: Solve one equation for one variable (x or y) in terms of the other variable.
From the second equation, we can solve for x in terms of y:
x = 4 - y

Step 2: Substitute the expression found in step 1 into the other equation.
Substituting 4 - y for x in the first equation, we have:
(4 - y)^2 + y^2 = 18

Step 3: Simplify and solve the resulting equation.
Expanding and simplifying the left side of the equation:
(4 - y)(4 - y) + y^2 = 18
16 - 4y - 4y + y^2 + y^2 = 18
16 - 8y + 2y^2 = 18
2y^2 - 8y - 2 = 0

Step 4: Solve the quadratic equation.
To solve this quadratic equation, we can factor or use the quadratic formula. Let's use the quadratic formula:
y = (-b ± √(b^2 - 4ac))/(2a)

Applying the values from the quadratic equation into the formula:
y = (-(-8) ± √((-8)^2 - 4(2)(-2)))/(2(2))
y = (8 ± √(64 + 16))/4
y = (8 ± √80)/4
y = (8 ± 4√5)/4
y = 2 ± √5

Therefore, we have two possible values for y: y = 2 + √5 and y = 2 - √5.

Step 5: Substitute the values of y found in step 4 back into one of the original equations to solve for x.
If y = 2 + √5, substituting this value into x + y = 4, we get:
x + (2 + √5) = 4
x + 2 + √5 = 4
x = 4 - 2 - √5
x = 2 - √5

If y = 2 - √5, substituting this value into x + y = 4, we get:
x + (2 - √5) = 4
x + 2 - √5 = 4
x = 4 - 2 + √5
x = 2 + √5

So the two solutions to the given system of equations are: (x, y) = (2 - √5, 2 + √5) and (x, y) = (2 + √5, 2 - √5).