### 15.6.3 Reducing a quadratic form

The gauss command uses Gauss’s algorithm to write a quadratic form as a sum or difference of squares.

- gauss takes two arguments:
  - q, a symbolic expression representing a quadratic form.
  - vars, a vector of variable names.
- gauss(q,vars) returns q written as sum or difference of squares.

#### Example

gauss(2*x*y,[x,y])

⎛ ⎝ | x+y | ⎞ ⎠ | 2
2
| − |
⎛ ⎝ | −x+y | ⎞ ⎠ | 2
2