# Is there a conventional function notation that takes a polynomial and order and yields the coefficient corresponding to the order?

I am writing a book and for the sake of simplicity I want to do something as follows.

Coef((-3x^2 +5x -1)(x^2 +1), 2) = -3 -1 = -4


where the first argument represents polynomial expression and the second one represents order of coefficient we want to output.

Is there a conventional function notation that takes a polynomial and order and yields the coefficient corresponding to the order? In other words, is there Coef-like notation defined by mathematicians?

• I am not sure about a built-in function to do this, but you could write one up that first evaluates at $0$, then takes derivatives and re-evaluates at $0$, making sure the loop stopped based on the degree of the polynomial (surely there is a built-in function that returns degree of the polynomial, though that could be easily programmed too...). E.g., $f(x) = 4x^3 - 9x + 2$; then $f(0) = 2$; $f'(0) = -9$; $f''(0) = 2! \cdot 0$; and $f'''(0) = 3!\cdot 4$. Not sure if this answers your question - also not sure if your question is on topic for MESE... – Benjamin Dickman Jun 22 '14 at 22:50
• I have seen f[x^n] to mean the coefficient on the x^n term in the polynomial f. See, for instance, this link (which uses [x^n]f, but it's the same idea, and from the context I've always seen, generating functions): cut-the-knot.org/blue/GeneratingFunctions.shtml – Brendan W. Sullivan Jun 22 '14 at 22:53
• I think this is basically on topic for MESE, especially if he is using this notation in a book designed to teach students about polynomials. – Steven Gubkin Jun 23 '14 at 1:29
• @StevenGubkin Could be; in any event, it seems a satisfactory answer was provided! Just to be more precise about my own comment above: Let $f^{n}(x)$ denote the $n$th derivative of $f(x)$ where $f^{0}(x) := f(x)$; then $\displaystyle \frac{f^{n}(0)}{n!}$ returns the coefficient of $x^n$. – Benjamin Dickman Jun 23 '14 at 1:36
• I imagined that the asker is writing a beginning algebra text. Would be useful to have more context. – Steven Gubkin Jun 23 '14 at 2:38

A notation common when dealing with generating functions (where this operation is crucial) is to write $$[z^n] A(z) = a_n$$ When $A(z) = \sum_{k \ge 0} a_k z^k$.