2
$\begingroup$

I am looking for a Mathematica code that finds the coefficients from an equation. So for example, when I have the equation $ax^2+bx+c$ I want to the code to spit out: {a,b,c}. Is there a quick way to do that? Thanks for any advice and help.

$\endgroup$
4
$\begingroup$

Try:

CoefficientList[a*x^2 + b*x + c, x] // Reverse
(* {a, b, c} *)
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.