<s>[INST] Solve the function equation $g^2(x)-g(x+1)-\dfrac{x^2+2x-6}{4}=0$ let $g(x)\in \Bbb R$ and for any $x\in \Bbb R$ such that
$$g^2(x)-g(x+1)-\dfrac{x^2+2x-6}{4}=0,   g(0)=0$$ 
find $g(x)$
my idea
let $x\longrightarrow x+1$, then we have
$$g^2(x+1)-g(x+2)-\dfrac{(x+1)^2+2(x+1)-6}{4}=0$$
$$g^2(x+2)-g(x+3)-\dfrac{(x+2)^2+2(x+2)-6}{4}=0$$
$$\cdots\cdots $$
$$g^2(x+n)-g(x+n+1)-\dfrac{(x+n)^2+2(x+n)-6}{4}=0$$
following  I can't work,Thank you 
 [/INST] HINT:
Let $g(x)=\sum_{n\ge i\ge 0} a_ix^i$
So, $\displaystyle \frac{x^2+2x-6}4= g^2(x)-g(x+1)=(\sum_{n\ge i\ge 0} a_ix^i)^2-\sum_{n\ge i\ge 0} a_i(x+1)^i=a^2_nx^{2n}+\cdots$
So comparing the coefficients of the highest power of $x$, $n=1$ and $a_1=\frac12$
$\implies g(x)=\frac x2+a_0$
As $g(0)=0$ and $g(0)=a_0\implies \displaystyle  a_0=0\implies g(x)=\frac x2$
So, $\displaystyle g^2(x)-g(x+1)=\left(\frac x2\right)^2-\frac{x+1}2=\frac{x^2-2x-2}4$
can this be equal to $\displaystyle\frac{x^2+2x-6}4$ 
</s>