`
Question:
If ' $R$ ' is the least value of 'a' such that the function $f(x)=x^{2}+a x+1$ is increasing on $[1,2]$ and 'S' is the greatest value of 'a' such that the function $f(x)=x^{2}+a x+1$ is decreasing on $[1,2]$, then the value of $|R-S|$ is______.
Solution:
$f(x)=x^{2}+a x+1$
$f^{\prime}(x)=2 x+a$
when $f(\mathrm{x})$ is increasing on $[1,2]$
$2 \mathrm{x}+\mathrm{a} \geq 0 \quad \forall \mathrm{x} \in[1,2]$
$a \geq-2 x \forall x \in[1,2]$
$R=-4$
when $f(\mathrm{x})$ is decreasing on $[1,2]$
$2 x+a \leq 0 \forall x \in[1,2]$
$a \leq-2 \quad \forall x \in[1,2]$
$S=-2$
$|\mathrm{R}-\mathrm{S}|=|-4+2|=2$