4. For which whole numbers a is the maximum and minimum of the function

$$
y=\frac{12 x^{2}-12 a x}{x^{2}+36}
$$

a whole number?
SOLUTION. We will determine the range of values of the given function, i.e., for which $s$ there exists at least one $x$ such that

$$
y=\frac{12 x^{2}-12 a x}{x^{2}+36}=s .
$$

By a simple rearrangement, we obtain the equation

$$
(s-12) x^{2}+12 a x+36 s=0
$$

which is quadratic if $s \neq 12$. From the equation, it follows that $s=12$ belongs to the range of values only if $a x=36$, i.e., only if $a \neq 0$. For $a=0$, we get the equation for $x$: $x^{2}=\frac{36 s}{s-12}$, from which we derive the inequality for $s$: $0 \leqq s<12$, so the range of values has no maximum.

Assume therefore that $a \neq 0$. In this case, equation (1) is quadratic, and a real number $s$ belongs to the range of the function $y$ if and only if its discriminant

$$
D=12^{2} a^{2}-4 \cdot 36 s(s-12)=12^{2}\left(a^{2}-s^{2}+12 s\right)
$$

is non-negative, i.e., if and only if

$$
6-\sqrt{36+a^{2}} \leqq s \leqq 6+\sqrt{36+a^{2}}
$$

This determines the maximum and minimum of the given function. If these are to be integers, then for a suitable natural number $b$ it must hold that $36+a^{2}=b^{2}$, i.e., $(b-a)(b+a)=36$. From each factorization of the number 36 into a product of two natural factors $36=m n$, we get $a=\frac{1}{2}(m-n), b=\frac{1}{2}(m+n)$, which are integers only if $m$ and $n$ have the same parity $(m \equiv n(\bmod 2)$ ), and since $a \neq 0$, only $36=2 \cdot 18$ satisfies, from which $b=10, a= \pm 8$.