I am doing homework and have been given this task:
You have the function $$g(x)=\frac{2x^2-8}{x^2+4}$$ and I am asked to find the zeros of the function. My teacher shows the solution as $f(x)=0$ and $2x^2-8=0$ and then solves for $x$, but how can you do this when you have a fraction function?
A rational function is zero when the numerator is zero, except when any such zero makes the denominator zero. $$f(x) = \frac{p(x)}{q(x)} = 0 \implies p(x) = 0 \text{ and } q(x) \neq 0$$
In this case, we need to solve $$2x^2 - 8 = 2(x^2 - 4) = 2(x-2)(x+2) = 0 \iff x = 2\text{ or } x= -2$$
Note that the denominator is not zero at either of those solutions. So both $-2$ and $2$ are zeros of the function.
(You can test each of those values to see that, indeed, the function is zero at each of those values.)