solve_polynomial
Solve polynomial equations of degree 1–4 by providing coefficients; get real or complex roots.
Instructions
When: roots of a polynomial a0+…+an x^n (degree 1–4), not general f(x). Params: coefficients=[a0,...,an]; allow_complex=bool (default true). Example: coefficients=[-2,0,1] for x^2-2=0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coefficients | Yes | ||
| allow_complex | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |