<s>[INST] Let $f(x)=(x+1)(x+2)(x+3)(x+4)+5$ where $x\in[-6,6]$. If the range of the function is [a,b] where $a,b\in N$, then find the value of (a+b) Let $f(x)=(x+1)(x+2)(x+3)(x+4)+5$ where $x\in[-6,6]$. If the range of the function is [a,b] where $a,b\in N$, then find the value of (a+b)
My attempt is as follows:-
Rewrite $f(x)=g(x)+5$ where $g(x)=(x+1)(x+2)(x+3)(x+4)$
Let's find the maximum value of g(x)
It can be clearly seen that from $x=-6$ to $x=6$, maximum value of $g(x)$ is at $x=6$.
$$g(6)=5040$$
Let's find the minimum value of $g(x)$
From the sign scheme one can see that negative value of $g(x)$ occurs in the interval $(-4,-3)$ and $(-2,-1)$
Hence intuitively it feels that the minimum value of g(x) would be at $x=-\dfrac{3}{2}$ or at $x=-\dfrac{7}{2}$ as in case of parabola also, minimum value is at average of both the roots.
So $g\left(-\dfrac{3}{2}\right)=-\dfrac{1}{2}\cdot\dfrac{1}{2}\cdot\dfrac{3}{2}\cdot\dfrac{5}{2}=-\dfrac{15}{8}$
At $x=-\dfrac{7}{2}$, $g\left(-\dfrac{7}{2}\right)=-\dfrac{5}{2}\cdot\dfrac{3}{2}\cdot\dfrac{1}{2}\cdot\dfrac{1}{2}=-\dfrac{15}{8}$
So range of $g(x)$ would be $[\dfrac{-15}{8},5040]$
Hence range of $f(x)$=$\left[\dfrac{25}{8},5045\right]$
But it is given that the range is $[a,b]$ where $a,b\in N$
I am stuck here.  I am also not able to prove mathematically that at $x=-\dfrac{3}{2}$ or $x=-\dfrac{7}{2}$, minimum value of $g(x)$ will occur.
Please help me in this.
 [/INST] The function is symmetric about the line $x = -2.5$
We could write
$f(x) = ((x+2.5) + 1.5)((x+2.5)+0.5)((x+2.5)-0.5)((x+2.5) - 1.5) + 5$
Which equals
$f(x) = ((x+2.5)^2 - 1.5^2)((x+2.5)^2-0.5^2) + 5$
Now lets do the substituion $u = (x+2.5)^2$
$(u - 2.25)(u-0.25) + 5$
Which has its minimum when $u = \frac {5}{4}$
$(\frac {5}{4} - 2.25)(\frac {5}{4}-0.25) + 5 = 4$
</s>