# [SOLVED]Maximum and minimum of a function

#### anemone

##### MHB POTW Director
Staff member
Let $a$ be an integer. Consider the function $y=\dfrac{12x^2-12ax}{x^2+36}$. For what integral values of $a$ the maximum and the minimum of the function $y=f(x)$ are integers?

• topsquark

#### anemone

##### MHB POTW Director
Staff member
We have $(y-12)x^2+12ax+36y=0$.

This quadratic equation in $x$ has a solution in real numbers if and only if the discriminant $D=12^2a^2-4\cdot 36y(y-12)=12^2(a^2-y^2+12y)\ge 0$.

This happens if and only if $y^2-12y-a^2\le 0$ and this holds if and only if

$6-\sqrt{36+a^2}\le y\le 6+\sqrt{36+a^2}$

The end points of the above interval are the minimum and maximum of $y$. If we want them to be integers then $36+a^2=b^2$ must be a perfect square. This gives $36=(b+a)(b-a)$. If we take $36=mn$ as any factorization of 36 into positive integers, then $a=\dfrac{m-n}{2}$ and $b=\dfrac{m+n}{2}$. Now, $a,\,b$ are integers implies that $m,\,n$ are both odd or they are even. This gives two possibilities

$36=6\times 6$ or $36=2\times 18$

Now, $m=6=n$ gives $a=0$ and this forces $x^2=-\dfrac{36}{y-12}$ and this has a solution if and only if $0\le y \le 12$. As we are interested in the maximum and minimum $a\ne 0$ and we have the corresponding factorization $36=2\times 18$ which gives $a=\pm 8$ and $b=10$. So there are two integers $a=8$ and $a=-8$ with the required properties.

• topsquark