Domain of a Function; Is my Textbook wrong or am I?

So, I'm learning how to describe rational functions, and of course the domain of a function is part of that. I've finished an extensive exercice on the topic, however, one of my answers is deemed incorrect by my textbook. In this specific case, I really doubt the accuracy of my textbook, and since I'm through self-study and don't really have anyone to help me with this, I'd like to hear your opinions about the matter.

So, first of all, the question: "Write down the domain of $f$: $$f(x) = \dfrac{2}{(x+2)^2}$$

My answer was "all rational numbers" (of course, written down correctly)), but my textbook said it was "all rational numbers besides $-2$." This has been my first response as well, because you can't divide by zero, however, it just doesn't seem to add up: when you square a number, any number, it becomes positive, right? So even if $x$ were $-2$, it would turn into positive four, which would make $x + 2$ positive six.
Please tell me, is my textbook wrong or am I?
Any answers truly appreciated
Lila

• Welcome to stackexchange. If you have a next question, please use mathjax: math.meta.stackexchange.com/questions/5020/… . It's possible that in this case the answer is "all real numbers other than $2$". The fact that it's a rational function doesn't mean you can't evaluate it at all numbers. – Ethan Bolker Mar 10 '18 at 16:06

It appears that you are computing $x^2+2$ which, when $x=-2$, is indeed $(-2)^2+2 = 4+2=6$. However, the denominator in the exercise is $(x+2)^2$ which, when $x=-2$, becomes $(-2+2)^2 = 0^2 = 0$.
$(-2+2)^2=0^2=0$, and since we cannot divide by zero, we cannot allow $-2$ to be in the domain.
Since you cannot divide by zero, you must be sure that the denominator is not zero, so $(x+2)^2\neq 0$, that is $x$ cannot be $-2$.