Câu hỏi: Cho hàm số $y=\dfrac{2x-m}{x+2}$ với $m$ là tham số, $m\ne -4.$ Biết $\underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)+\underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=-8.$ Giá trị của tham số $m$ bằng
A. 9.
B. 12.
C. 10.
D. 8.
A. 9.
B. 12.
C. 10.
D. 8.
Ta có $y'=\dfrac{4+m}{{{\left( x+2 \right)}^{2}}}.$
TH1. Nếu $4+m>0\Leftrightarrow m>-4$ thì $y'>0,\forall x\in \mathbb{R}\backslash \left\{ -2 \right\}.$
Khi đó $\left\{ \begin{aligned}
& \underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)=f\left( 0 \right)=-\dfrac{m}{2} \\
& \underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=f\left( 2 \right)=\dfrac{4-m}{4} \\
\end{aligned} \right.$
Mà $\underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)+\underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=-8\Leftrightarrow -\dfrac{m}{2}+\dfrac{4-m}{4}=-8\Leftrightarrow m=12$ (nhận).
TH2. Nếu $4+m<0\Leftrightarrow m<-4$ thì $y'<0,\forall x\in \mathbb{R}\backslash \left\{ -2 \right\}.$
Khi đó $\left\{ \begin{aligned}
& \underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)=f\left( 0 \right)=-\dfrac{m}{2} \\
& \underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=f\left( 2 \right)=\dfrac{4-m}{4} \\
\end{aligned} \right.$
Mà $\underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)+\underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=-8\Leftrightarrow -\dfrac{m}{2}+\dfrac{4-m}{4}=-8\Leftrightarrow m=12$ (loại).
Vậy $m=12$ thỏa yêu cầu bài toán.
TH1. Nếu $4+m>0\Leftrightarrow m>-4$ thì $y'>0,\forall x\in \mathbb{R}\backslash \left\{ -2 \right\}.$
Khi đó $\left\{ \begin{aligned}
& \underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)=f\left( 0 \right)=-\dfrac{m}{2} \\
& \underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=f\left( 2 \right)=\dfrac{4-m}{4} \\
\end{aligned} \right.$
Mà $\underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)+\underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=-8\Leftrightarrow -\dfrac{m}{2}+\dfrac{4-m}{4}=-8\Leftrightarrow m=12$ (nhận).
TH2. Nếu $4+m<0\Leftrightarrow m<-4$ thì $y'<0,\forall x\in \mathbb{R}\backslash \left\{ -2 \right\}.$
Khi đó $\left\{ \begin{aligned}
& \underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)=f\left( 0 \right)=-\dfrac{m}{2} \\
& \underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=f\left( 2 \right)=\dfrac{4-m}{4} \\
\end{aligned} \right.$
Mà $\underset{x\in \left[ 0;2 \right]}{\mathop{\min }} f\left( x \right)+\underset{x\in \left[ 0;2 \right]}{\mathop{\max }} f\left( x \right)=-8\Leftrightarrow -\dfrac{m}{2}+\dfrac{4-m}{4}=-8\Leftrightarrow m=12$ (loại).
Vậy $m=12$ thỏa yêu cầu bài toán.
Đáp án B.