The functions \(\mathrm{f}_1\) and \(\mathrm{F}_1\), each with domain \(\mathbb{Z}\), are defined by
\[ \mathrm{f}_1(n) = n^2 + 6n + 11, \]
\[ \mathrm{F}_1(n) = n^2 + 2. \]
Show that \(\mathrm{F}_1\) has the same range as \(\mathrm{f}_1\).
The function \(\mathrm{g}_1\), with domain \(\mathbb{Z}\), is defined by
\[ \mathrm{g}_1(n) = n^2 - 2n + 5. \]
Show that the ranges of \(\mathrm{f}_1\) and \(\mathrm{g}_1\) have empty intersection.
The functions \(\mathrm{f}_2\) and \(\mathrm{g}_2\), each with domain \(\mathbb{Z}\), are defined by
\[ \mathrm{f}_2(n) = n^2 - 2n - 6, \]
\[ \mathrm{g}_2(n) = n^2 - 4n + 2. \]
Find any integers that lie in the intersection of the ranges of the two functions.
Show that \(p^2 + pq + q^2 \geqslant 0\) for all real \(p\) and \(q\).
The functions \(\mathrm{f}_3\) and \(\mathrm{g}_3\), each with domain \(\mathbb{Z}\), are defined by
\[ \mathrm{f}_3(n) = n^3 - 3n^2 + 7n, \]
\[ \mathrm{g}_3(n) = n^3 + 4n - 6. \]
Find any integers that lie in the intersection of the ranges of the two functions.
Solution:
\(\,\) \begin{align*}
&& f_1(n) &= n^2 + 6n + 11 \\
&&&= (n+3)^2 + 2 \\
&&&=F_1(n+3)
\end{align*}
Since \(n \mapsto n+3\) is a bijection on \(\mathbb{Z}\) both functions must have exactly the same range.
\(g_1(n) = n^2-2n+5 = (n-1)^2 + 4\). Since squares are always \(0, 1 \pmod{4}\) it's impossible for \(f_1\) and \(g_1\) to take the same value therefore the ranges have empty intersection.
\(\,\) \begin{align*}
&& f_2(n) &= n^2-2n - 6 \\
&&&= (n-1)^2-7 \\
&& g_2(n) &= n^2-4n+2 \\
&&&= (n-2)^2 - 2
\end{align*} so suppose \(x^2 - 7 = y^2 - 2\) then
\begin{align*}
&& x^2 - 7 &= y^2 -2 \\
\Rightarrow && 5 &= y^2 - x^2 \\
&&&= (y-x)(y+x)
\end{align*}
So we have cases:
\(y-x = -5, y + x = -1 \Rightarrow y = -3\) and the output is \(7\)
\(y-x=-1, y+x = -5 \Rightarrow y = -3\) same output
\(y-x=1, y+x = 5 \Rightarrow y = 3\) same output
\(y-x=5, y-x = 1 \Rightarrow y = 3\) same ouput.
\begin{align*}
&& 0 &\leq \frac12(p^2+q^2)+\frac12(p+q)^2 \\
&&&= p^2 + q^2 + pq
\end{align*}
Looking at \(f_3\) we see
\begin{align*}
&& f_3(n) &= n^3 - 3n^2 + 7n \\
&&&= (n-1)^3 -3n + 7n +1 \\
&&&= (n-1)^3 +4(n-1) -3 \\
&&&= g_3(n-1) + 3
\end{align*} So suppose we have two values which are equal, ie
\begin{align*}
&& x^3 + 4x -3 &= y^3 +4y -6 \\
\Rightarrow && 3 &= y^3-x^3+4y-4x \\
&&&= (y-x)(y^2+xy+x^2+4)
\end{align*}
Since \(x^2+xy+y^2 \geq 0\) then the right hand factor is always a positive integer bigger than \(3\) and in particular there will be no solutions and hence no integers in the intersection of the ranges.