### 9.1.11 Zeros of an expression

The zeros command finds the zeros of an expression.

- zeros takes one mandatory argument and one optional argument:
  - expr, an expression.
  - Optionally, x, a variable name to use (which by default will be x).
- zeros(expr⟨,x⟩) returns a list of values of the variable where the expression vanishes. The list may be incomplete in exact mode if the expression is not a polynomial or if intermediate factorizations have irreducible factors of order strictly greater than 2.

  In real mode, (which means the complex box is unchecked in the CAS configuration (see Section 2.5.7) or with complex_mode:=0), only reals zeros are returned. With (complex_mode:=1), real and complex zeros are returned. cZeros behaves like zeros, except that it returns complex zeros whether in real or complex mode.

#### Examples

Input in real mode:

zeros(x^2+4)

| ⎡ ⎣ | ⎤ ⎦

Input in complex mode:

zeros(x^2+4)

| ⎡ ⎣ | −2 i,2 i | ⎤ ⎦

Input in real or complex mode:

cZeros(x^2+4)

| ⎡ ⎣ | −2 i,2 i | ⎤ ⎦

Input in real mode:

zeros(ln(x)^2-2)

⎡
⎢
⎣

e

√

2

,e

−

√

2

⎤
⎥
⎦

Input in real mode:

zeros(ln(y)^2-2,y)

⎡
⎢
⎣

e

√

2

,e

−

√

2

⎤
⎥
⎦

Input in real mode:

zeros(x*(exp(x))^2-2*x-2*(exp(x))^2+4)

⎡
⎢
⎢
⎣

ln | ⎛ ⎝ | 2 | ⎞ ⎠

2

,2

⎤
⎥
⎥
⎦