Câu hỏi: Có bao nhiêu giá trị nguyên của tham số $m$ để $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|\le 4?$
A. 5.
B. 6.
C. 4.
D. Vô số.
A. 5.
B. 6.
C. 4.
D. Vô số.
Xét hàm số $f\left( x \right)={{x}^{3}}-3{{x}^{2}}+m$ trên đoạn $\left[ 1;3 \right],$ ta có
$f'\left( x \right)=3{{x}^{2}}-6x=0\Leftrightarrow \left[ \begin{aligned}
& x=0 \\
& x=2\in \left[ 1;3 \right] \\
\end{aligned} \right.. $Khi đó $ f\left( 1 \right)=m-2;f\left( 2 \right)=m-4;f\left( 3 \right)=m.$
Suy ra $\underset{\left[ 1;3 \right]}{\mathop{\max }} f\left( x \right)=m;\underset{\left[ 1;3 \right]}{\mathop{\min }} f\left( x \right)=m-4.$
TH1: Nếu $m\left( m-4 \right)\le 0\Leftrightarrow 0\le m\le 4$ thì $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|=\max \left\{ \left| m \right|;\left| m-4 \right| \right\}.$
Để $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|\le 4\Leftrightarrow \left[ \begin{aligned}
& \left| m \right|\le 4 \\
& \left| m-4 \right|\le 4 \\
\end{aligned} \right.\Leftrightarrow \left[ \begin{aligned}
& -4\le m\le 4 \\
& 0\le m\le 8 \\
\end{aligned} \right.$
So sánh điều kiện suy ra $0\le m\le 4.$ Trường hợp này có 5 giá trị $m=\left\{ 0;1;2;3;4 \right\}$ thỏa mãn yêu cầu bài toán.
TH2: Nếu $m<0$ thì $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|=\left| m-4 \right|\le 4\Leftrightarrow 0\le m\le 8.$ So sánh điều kiện thấy không thỏa mãn.
TH3: Nếu $m-4>0\Leftrightarrow m>4$ thì $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|=\left| m \right|\le 4\Leftrightarrow -4\le m\le 4.$ So sánh điều kiện thấy không thỏa mãn.
Vậy có 5 giá trị của $m$ thỏa mãn bài toán.
$f'\left( x \right)=3{{x}^{2}}-6x=0\Leftrightarrow \left[ \begin{aligned}
& x=0 \\
& x=2\in \left[ 1;3 \right] \\
\end{aligned} \right.. $Khi đó $ f\left( 1 \right)=m-2;f\left( 2 \right)=m-4;f\left( 3 \right)=m.$
Suy ra $\underset{\left[ 1;3 \right]}{\mathop{\max }} f\left( x \right)=m;\underset{\left[ 1;3 \right]}{\mathop{\min }} f\left( x \right)=m-4.$
TH1: Nếu $m\left( m-4 \right)\le 0\Leftrightarrow 0\le m\le 4$ thì $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|=\max \left\{ \left| m \right|;\left| m-4 \right| \right\}.$
Để $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|\le 4\Leftrightarrow \left[ \begin{aligned}
& \left| m \right|\le 4 \\
& \left| m-4 \right|\le 4 \\
\end{aligned} \right.\Leftrightarrow \left[ \begin{aligned}
& -4\le m\le 4 \\
& 0\le m\le 8 \\
\end{aligned} \right.$
So sánh điều kiện suy ra $0\le m\le 4.$ Trường hợp này có 5 giá trị $m=\left\{ 0;1;2;3;4 \right\}$ thỏa mãn yêu cầu bài toán.
TH2: Nếu $m<0$ thì $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|=\left| m-4 \right|\le 4\Leftrightarrow 0\le m\le 8.$ So sánh điều kiện thấy không thỏa mãn.
TH3: Nếu $m-4>0\Leftrightarrow m>4$ thì $\underset{\left[ 1;3 \right]}{\mathop{\max }} \left| {{x}^{3}}-3{{x}^{2}}+m \right|=\left| m \right|\le 4\Leftrightarrow -4\le m\le 4.$ So sánh điều kiện thấy không thỏa mãn.
Vậy có 5 giá trị của $m$ thỏa mãn bài toán.
Đáp án A.