The issue of Domain, etc. is pretty interesting for the formulation of the function being discussed in this thread.
The function, ## f ~ , ## is only given indirectly, and that's only by its composition with another function, let's call it ## g ~ , ## where ##\ g(x) = x + \dfrac{1}{x} \, .##
Thanks to
@Math_QED we see that ##\ f(g(x)) = \left( g(x) \right)^2 -2 \, . \ ## Furthermore, to use this idea to determine the value ## f(1)\,, \ ## all that seems to be required is to set ## g(x) ## to be 1. However, there is no real number, ##x##, for which ## g(x)=1 ~ .##
If we consider ## g ## to be a real function, then the domain of ## g ## cannot include zero. (By the way: This has nothing to with the issue of 0 being in the domain of ## f ~. ## ) The natural domain (a.k.a. implicit domain) of ## g ## as a real function is ℝ\{0} . The image of ## g ## for this domain is ##( -\infty,\, -2] ~\cup ~ [ 2, \, \infty) ##, (often referred to as the Range of ## g ##).
The Problem Statement asked for the value of ## f(1) ##, so I assume we need to extend the domain of ##g##. Let's see if that's possible while keeping ## f ## as being a real function, and Ideally have ## f ## continue to be defined by ## f(u) = u^2 - 2 ~ .##
Let's use ## G ## to denote the extension of ## g ##. Furthermore, consider ## x ## to now be complex with real part, ## a ~ ,## and imaginary part, ##b~.## I.e. let ## x = a + bi ~. ## Finally, find the domain, D
G ⊂ ℂ, such that the Range of ## G ## is real. ##( G(D_G) \subset \mathbb{R} )\ ##
I agree with you, but I would believe functions would at least be assumed continuous ( of course, where defined, which is all one can do). Otherwise, I think it is difficult if not impossible to narrow things down enough.
##G(a + bi) = a + bi +\dfrac{1}{a + bi}##
##= a + bi +\dfrac{a - bi}{a^2+b^2}##
##= \dfrac{a(a^2+b^2+1)}{a^2+b^2}+\dfrac{b(a^2+b^2-1)}{a^2+b^2}i##
.
Thus, if ## a^2 + b^2 =1 ~ ##, then ## G(a + bi) ## is real and in fact ## G(a + bi) = 2a ~.##
Of course, if ## b = 0~ ,## then ##x## is purely real and ##G(x) = x + \dfrac{1}{x} \, ,\ ## as desired.
With this extension of ##g##, the function, ## f ## is given by ## f(u) = u^2 - 2 ~, \ ## with a domain of ## \mathbb{R} \,.##
Oh, by the way: If ## x = \pm i,## ##G(x) = 0~,## giving ##f(0) = -2 ~.##