WLJS LogoWLJS Notebook

Coefficient

Coefficient[expr, form] gives the coefficient of form in the polynomial expr. Coefficient[expr, form, n] gives the coefficient of form^n in expr.

Examples

Get coefficient of x^2:

Coefficient[3x^3 + 5x^2 + 2x + 1, x, 2]
(* 5 *)

Coefficient of a linear term:

Coefficient[a*x + b*y + c, x]
(* a *)

Please visit the official Wolfram Language Reference for more details.

On this page