Integral of Dot product of a vector with a constant vector What does this integral equal to?
$$
\int( c^\top x  + q)\,\, dx = ?
$$
In the one dimensional case we know that the integral of a linear function is a quadratic function. Can I say the same and obtain a quadratic form?
All I could think of was this
$$
c^\top x  + q= \text{diag}(c) x  + q= \frac{1}{2} 2\text{diag}(c) x  + q= \nabla_x \left[\frac{1}{2}x^\top \text{diag}(c) x + q^\top x\right]
$$
So that
$$
\int( c^\top x  + q)\,\, dx  = \frac{1}{2}x^\top \text{diag}(c) x + q^\top x + const
$$
Is this true?
 A: Strictly speaking you have a 'type error' because $c^Tx$ and $q$ can't be simply added. So here's a guess at a proper interpretation of the question.
It seems you want something like a fundamental theorem of calculus to hold in higher dimensions. In contrast to your guess in comments to use the Lebesgue integral, I think you want a line integral instead. This gets you the fundamental theorem of line integrals:
$$ \int_{\gamma[a\to b]} \nabla F(r)\cdot dr=F(b)-F(a)$$
where $F$ is smooth and scalar valued, and $\gamma[a\to b]$ is any path starting from $a$ and ending at $b$. (I suppose you could define an 'indefinite line integral', but I will refrain from doing so.)
For this to work out, you need to identify appropriate gradients to integrate. Note that $$ \nabla(x^TMx)=Mx, \quad \nabla (q^Tx) = q$$
So one gets
$$\int_{\gamma[a\to b]} (Mr+q) \cdot dr = b^TMb +q^Tb - (a^TMa+q^Ta)$$
Note however that we are not integrating a scalar function like $c^Tx$.
If you must integrate $c^Tx$, its hard to guess what would be a good notion of 'indefinite lebesgue integral'. Note that e.g. $\int_{[0,x]^n} c dx = cx^n$; not a linear function.
