I am trying to prove the following "well-known" identity. (I cannot seem to find a proof! Possibly the proofs are written in a more sophisticated way (involving Jacobi sums I think)-so I am not able to work out what is happening!
Assume that ${\bf F}_q$ is a finite field of odd characteristic, and assume that $\chi$ is the quadratic character on ${\bf F}_q$. Then, if $f(x) = ax^2 + bx + c$ is a quadratic polynomial in ${{\bf F}_q}[x]$, the following identity holds : $$ {S_{f}}={{\sum}_{x\in {\bf F}_q}}{\chi (ax^2 +bx + c)} = \begin{cases} -{\chi}(a) & \text{if $b^2 - 4ac \neq 0$} \\ {\chi}(a)(q-1) & \text{if $b^2 - 4ac = 0$} \end{cases} $$ I completed the square, and rewrote $${a^{-1}}f(x)=x^2+{\frac{b}{a}}x+{\frac{c}{a}}={\frac{(2ax+b)^2}{4a^2}}-{\frac{b^2 - 4ac}{4a^2}}.$$ Thus, $${S_{f}}={{\sum}_{x\in{\bf F}_q}}{\chi (ax^2 +bx + c)}\\\\ = {\chi}(a){{\sum}_{x\in {\bf F}_q}}{\chi}((2ax+b)^2- (b^2 - 4ac)).$$ Now if $b^2 - 4ac =0$, then in evaluating $S_{f}$ we are just adding up $\chi (a)$ to itself $(q-1)$ times (the character is defined to take value $0$ at $0$), so that part of the identity is clear. Unless I am mistaken, if I prove that for $D\neq 0$, with $D\in {\bf F}_q$ $${{\sum}_{x\in {\bf F}_q}}{\chi (x^2 - D)} =-1.$$ This seems to give me the result I have to prove. Any help would be appreciated!
One way (rather standard, I think):
Consider the equation $$x^2-D=y^2\qquad(*)$$ with $D$ as in your post and $x,y$ ranging over $\mathbf{F}_q$. Denote by $N(D)$ the number of solutions $(x,y)$ of $(*)$.
A key ingredient is that $(*)$ is equivalent to $$(x-y)(x+y)=D.$$ Because we are in odd characteristic, the linear transformation $(x,y)\mapsto (x+y,x-y)$ is bijective. Denoting $u=x+y$, $v=x-y$ we see that $N(D)$ is equal to the number of solutions of $$uv=D\qquad(**)$$ with $u,v\in\Bbb{F}_q$. But, to a given non-zero choice of $u$, $(**)$ determines $v$ uniquely, so we can conclude that $N(D)=q-1$.
On the other hand, to a fixed $x$ the number of solutions $y$ of $(*)$ is equal to $1+\chi(x^2-D)$. This is because there is a single $y$, when $x^2-D=0$, two solutions when $x^2-D$ is a non-zero square, and no solutions when $x^2-D$ is a non-square. Summing over $x$ we arrive at the alternative answer $$ N(D)=\sum_x(1+\chi(x^2-D))=q+\sum_x\chi(x^2-D). $$ The claim follows from the earlier result $N(D)=q-1$.