# Reasoning by Equivalence

Sometimes STACK allows you to work line by line to solve an equation or inequality. You must work in such a way that adjacent lines are equivalent to each other.

Start by typing in the equation in the question. Then work line by line in the text area until you have solved the problem. Normally some feedback will be available as you type.

For example, to solve the quadratic equation you might reason in the following way.

```
x^2-4*x-5=0
(x+1)*(x-5)=0
x=-1 or x=5
```

You can copy and paste from one line to the next and modify the line if this helps.

This might be displayed as follows

Whether this feedback is available to you or not immediately depends on your question. This feedback indicates that STACK considers that each line is equivalent to the previous line. The last line of working is your final answer, although the whole argument is considered as well.

- You should use the normal syntax for answer input in STACK, including brackets and
`*`

symbols for multiplication. - Sets, lists and matrices are not permitted when reasoning by equivalence.
- Do not enter your answer as a list or set of numbers, use logical notation such as
`x=-1 or x=5`

.

You can also work line by line with expressions, not equations. For example, to expand out you might reason in the following way.

```
(x-1)*(x+4)
=x^2-x+4*x-4
=x^2+3*x-4
```

This might be displayed as follows

Here, each new line must start with an equals sign `=`

.

## What is "equivalence"?

Two *equations* are equivalent if they have the same solutions with the same multiplicities.

Two *expressions* are equivalent if they have the same value when the variables are evaluated.

Some general advice for solving equations when reasoning by equivalence is

- Factorise expressions, then use .
- Use the difference of two squares, .
- Complete the square: e.g. .

## Avoid taking roots.

Do not take the square root of both sides of an equation. However, So, if you take the square root of both sides of an equation to transform into you might miss a root!

To avoid this problem use the *difference of two squares* in the following way.

```
a^2=b^2
a^2-b^2=0
(a-b)*(a+b)=0
a=b or a=-b
```

## Edge cases

Sometimes you will have an equation with no solutions. You can express the fact there are no solutions in the following ways

`false`

. This is because sometimes you end up with a contradiction such as , since this equation is false you can type that as the final line in your argument.`none`

. The special keyword`none`

is used to signify that any values of the variables satisfy the equation.`{}`

. The empty set indicates there are no solutions.

Sometimes you will have an equation in which every number is a solution, such as . You can express the fact every number is a solution in the following ways

`true`

. This is because sometimes you end up with an equation such as , and since this equation is true you can type that as the final line in your argument.`all`

. The special keyword`all`

is used to signify that any values of the variables satisfy the equation.