Counting the number of $\mathbb{F}_q$ points on a homogeneous polynomial This is an area of number theory that I am not too familiar with and I would appreciate any assistance! Let $\mathbb{F}_q$ be a finite field of $q$ elements with characteristic not 2 or 3. I have the following polynomial
$$
F(x,y,z) = 2(x^2 + y^2 + xy - axz - ayz) + (a^2- b)z^2,
$$
where $b \not = a^2/3$ and $F$ is irreducible over $\overline{\mathbb{F}_q}$. I was able to show that 
the only point in $(\mathbb{F}_q)^3$ that simultaneously satisfy $F_x, F_y$ and $F_z$
is $(x,y,z) = (0,0,0)$.
I am interested in the estimate of number of points in $(\mathbb{F}_q)^3$ that satisfies
$F(x,y,z) = 0$. Could someone please tell me what the number of such points (with error term) are? Thank you!
 A: One can get some information with basic geometry, using the fact that this equation corresponds to a conic plane curve. There are only two possible answers, and they are exact (no error terms); deciding which answer is correct seems harder. 
Let me write my thoughts in case they are helpful to you.
Your $F$ is a homogeneous polynomial of degree 2, irreducible over the algebraic closure, so it defines a smooth conic $C$ in $\mathbf P^2(\mathbf F_q)$. The number of solutions of the equation will be $1+(q-1)\cdot |C(\mathbf F_q)|$, where $|C(\mathbf F_q)|$ is the number of points of $\mathbf P^2(\mathbf F_q)$ that lie on the curve. (The extra 1 is the trivial solution $(0,0,0)$.)
Now: a smooth conic $C$ over any field $k$ is $k$-isomorphic to $\mathbf P^1_k$ iff it has a rational point over $k$. (Proof: stereographic projection.) And we certainly know how many points $\mathbf P^1$ has over $\mathbf F_q$, namely $q+1$. So 
$$|C(\mathbf F_q)|=\cases{0 \quad \text{ if $C$ has no $\mathbf F_q$-point}\\ q+1 \quad\text{ otherwise}}$$
So your equation either has 1 solution (the trivial one) or $1+(q-1)(q+1)=q^2$ solutions.
Deciding which is the case seems a little trickier. If $a^2=b$ it is trivial to find a solution, so assume that isn't the case. Then for fixed $x$ and $y$, the quadratic equation $F(x,y,z)=0$ has discriminant
$$\Delta(x,y) = 4a^2(x+y)^2-8(a^2-b)(x^2+y^2+xy)$$
and one has to decide whether there exist $x, y \in \mathbf F_q$ such that $\Delta(x,y)$ is a square in $\mathbf F_q$. I can't see a good way to do this at the moment — I am making my answer community wiki so that someone else can fill in the details.
A: $2$ and $3$ are invertible, so we can look at 
$6F(x,y,z) = 3(2x+y-az)^2  +  (3y-az)^2 + 2(a^2-3b^2)z^2$.
After an invertible change of basis, the equation $F(x,y,z) = 0$ has the same number of solutions as $3X^2+Y^2 + 2(a^2-3b^2)Z^2 = 0$.
According to wether $3$ and $2(a^2-3b^2)$ (which are nonzero) are squares or not, we can again simplify the equation (up to linear change of variable, and multiplication by a nonsquare if necessary) to get $X^2 + Y^2 + cZ^2 = 0$ for some nonzero $c$.
Now, as Asal Beag Dubh points out, these curves can have either $1$ or $q^2$ points. (and actually it can only depend on wether $c$ is a square or not)
But let's add up the total number of solutions for all the curves with nonzero $c$.
If $x^2+y^2 \neq 0$ then for every $z \neq 0$ there is a unique $c$ for which $(x,y,z)$ is on the curve ; and $(x,y,0)$ is on no curve.
If $x^2+y^2 = 0$ then $(x,y,0)$ is on every curve and $(x,y,z)$ is on no curve for any $z \neq 0$.
If we let $r$ be the number of solutions to $x^2+y^2 = 0$ we get a total number of $(q^2-r)(q-1) + r(q-1) = q^2(q-1)$ points, so each of the $q-1$ curves $X^2+Y^2+cZ^2 = 0$ has exactly $q^2$ points.
A: I want to add a tool into the mix which might simplify the situation for future computations. This comes from the theory of Frobenius splittings. Define a near splitting of $\mathbb{F}_q[x_1,..,x_n]$ by the map called $Tr(*)$ (the trace map) defined on monomials $m$ (and extended linearly) by: 
$$Tr(m)=\begin{cases} 
     \frac{\sqrt[q]{m\prod_i x_i}}{ \prod_i x_i}& \text{if $m\prod_i x_i$  is a $q^{th}$ power}\\
      0 & \text{otherwise}\\
   \end{cases}$$
Now let $f\in\mathbb{F}_q[x_1,...,x_n]$ be a polynomial of degree at most $n>0$. Then the number of points $v\in\mathbb{F}_q^n$ in the affine hypersurface defined by $f=0$ is congruent to $(-1)^{n-1}Tr(f^{q-1})$. The reference can be found in Allen Knutson's paper on page 3: http://arxiv.org/pdf/0911.4941v1.pdf
Using the answers above, you can reduce to the case that there are either $1$ or $q^2$ solutions. By degree considerations, we can see that for the $f$ you defined, $f^{q-1}$ will not have any monomials of the form $(xyz)^{q-1}$, so that $Tr(f^{q-1}) = 0$. The splitting method shows that the answer has to be congruent to $0$, so the answer has to be $q^2$.
