# Separation of variables: split

### 5.12.9 Separation of variables: split

The split command tries to factor an expression involving two variables into the product of two expressions, each of which depends on only one of the variables.

- split takes two arguments:
  - expr, an expression depending on two variables x and y.
  - [x,y], the list of these two variables.
- split(expr,[x,y]) returns a list [factor1,factor2], if such a list exists, where expr=factor1·factor2, factor1 only depends on x and factor2 only depends on y. If such a factorization doesn’t exist, the list [0] is returned.

#### Examples.

- Input:
  split((x+1)*(y-2),[x,y])
  or:
  split(x*y-2*x+y-2,[x,y])
  Output:

  | ⎡ ⎣ | x+1,y−2 | ⎤ ⎦

- Input:
  split((x^2*y^2-1,[x,y])
  Output:

  | ⎡ ⎣ | 0 | ⎤ ⎦