Suppose $A \in \mathbb{R}^{n\times n}$ is symmetric and $x,b,c \in \mathbb{R}^n$. I would like to compute $\nabla f$ where $$f = \frac{1}{2}x^T A x - x^Tb + c.$$ Now my issue is in how the derivative is calculated. I have seen $$\frac{\partial}{\partial x} x^TAx = x^T(A+A^T)$$ and also $$\frac{\partial}{\partial x} x^TAx = (A+A^T)x$$ which one is correct? In my readings I more frequently see this derivative as $x^T(A+A^T)$ however I also see that $\nabla f = Ax - b$ (for example, on Wikipedia), but the first definition does not imply the expression for $\nabla f$ (shouldn't we have $\nabla f = x^TA - b$)?
Thanks.