Piecewise function with $\sqrt{2 + \sqrt{n}}$ and $\sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}}$

algebra-precalculuscomplex numbersfunctionsnested-radicalsradicals

Problem

Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that
$$
f(z) = \begin{cases}
\sqrt{2 + \sqrt{n}} & \text{if } z \in \mathbb{R} \setminus \lbrace 0 \rbrace \\
\sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}}
& \text{if } z \in \mathbb{C} \setminus \mathbb{R}
\end{cases}
$$

for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$.

  • This problem is from the team round of a local high school math competition that has ended.

My Work

Interpretation 1: $z$ is a variable:

We know that $z^8$ is a real number, because the function keeps real numbers real and complex numbers complex.

So we have $f(z^8) = z^8 + \frac{1}{z^8}$ which is equal to the first part of the piecewise which is $\sqrt{2 + \sqrt{n}}$.

We know that $2023 = z^8 + \frac{1}{z^8} = \sqrt{2 + \sqrt{n}}$.

This does not make any sense. I think that $z$ is actually just a constant and that $f(z) = z + \frac{1}{z}$ is not the definition for a function, but instead just an equation.

Interpretation 2: $z$ is a constant or a complex constant

If $z$ was a real number, there would only be equation that we could use, $f(z) = \sqrt{2 + \sqrt{n}}$. There is no way we can get anywhere with one equation. Therefore, $z$ is probably a complex number, so we are able to use three different equations.

Looking at the second part of the piecewise function, the only value of $n$ that could possible turn a complex number into a real number is $4$. So lets try investigating $n=4$.

If $n=4$, we know that $f(z) = \sqrt{2}$, so $z + \frac{1}{z}$ also equals $\sqrt{2}$. If we solve for z, we get two solutions, $z = \frac{\sqrt{2}}{2} + i\frac{\sqrt{2}}{2}, \frac{\sqrt{2}}{2} – i\frac{\sqrt{2}}{2}$.

After this, I am not sure how to continue. Nothing makes sense. I am not even sure if all of my previous steps are correct.

I would appreciate some help. Thank you!

Best Answer

If $z \in \mathbb{R} \setminus \lbrace 0 \rbrace$, then $$\begin{align}&z+\frac 1z=\sqrt{2+\sqrt n} \\\\&\implies z^2+\frac{1}{z^2}=\sqrt n \\\\&\implies z^4+\frac{1}{z^4}=n-2 \\\\&\implies 2023=z^8+\frac{1}{z^8}=(n-2)^2-2 \\\\&\implies n-2=\pm 45 \\\\&\implies n=47\end{align}$$

If $z \in \mathbb{C} \setminus \mathbb{R}$, then $$\begin{align}&z+\frac 1z=\sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}} \\\\&\implies z^2+\frac{1}{z^2}=2i\sqrt{\frac{n}{4}-1} \\\\&\implies z^4+\frac{1}{z^4}=-n+2 \\\\&\implies 2023=z^8+\frac{1}{z^8}=(-n+2)^2-2 \\\\&\implies -n+2=\pm 45 \\\\&\implies n=47\end{align}$$

So, it is necessary that $n=47$.

Since $n=47$ is sufficient, the answer is $\color{red}{47}$.