Given $f:\mathbb{R}\to \mathbb{R}$ an arbitrary function and $g:\mathbb{R}\to \mathbb{R}$ a function of the second degree, with the property: for any real numbers m and n equation $f\left( x \right)=mx+n$ has solutions if and only if the equation $g\left( x \right)=mx+n$ has solutions Show that the functions $f$ and $g$ are equal.