Câu hỏi: Có bao nhiêu số nguyên $a$ thuộc đoạn $\left[ -20 ; 20 \right]$ sao cho hàm số $y=-2x+2+a\sqrt{{{x}^{2}}-4x+5}$ có cực đại?
A. 35.
B. 17.
C. 36.
D. 18.
A. 35.
B. 17.
C. 36.
D. 18.
Ta có ${y}'=-2+\dfrac{a\left( x-2 \right)}{\sqrt{{{x}^{2}}-4x+5}}, \forall x$ ; ${{y}'}'=\dfrac{a}{{{\left( \sqrt{{{x}^{2}}-4x+5} \right)}^{3}}}, \forall x$.
• Xét $a=0$ : $y=-2x+2$. Suy ra hàm số không có cực trị.
• Xét $a\ne 0$ :
Hàm số có cực đại $\Leftrightarrow $ $\left\{ \begin{aligned}
& {y}'=0 \\
& {{y}'}'<0 \\
\end{aligned} \right. $ có nghiệm $ \Leftrightarrow a<0 $ và phương trình $ {y}'=0$ có nghiệm.
${y}'=0$ $\Leftrightarrow \dfrac{a\left( x-2 \right)}{\sqrt{{{x}^{2}}-4x+5}}=2$ $\Leftrightarrow f\left( x \right)=\dfrac{x-2}{\sqrt{{{x}^{2}}-4x+5}}=\dfrac{2}{a}$.
Ta có: ${f}'\left( x \right)=\dfrac{1}{{{\left( \sqrt{{{x}^{2}}-4x+5} \right)}^{3}}}>0, \forall x$ ; $\underset{x\to -\infty }{\mathop{\lim }} f\left( x \right)=-1$ ; $\underset{x\to +\infty }{\mathop{\lim }} f\left( x \right)=1$.
Vậy hàm số có cực đại $\Leftrightarrow $ $\left\{ \begin{aligned}
& a<0 \\
& -1<\dfrac{2}{a}<1 \\
\end{aligned} \right. $ $ \Leftrightarrow a<-2$.
Suy ra có 18 số nguyên $a$ thuộc đoạn $\left[ -20 ; 20 \right]$ thỏa mãn.
• Xét $a=0$ : $y=-2x+2$. Suy ra hàm số không có cực trị.
• Xét $a\ne 0$ :
Hàm số có cực đại $\Leftrightarrow $ $\left\{ \begin{aligned}
& {y}'=0 \\
& {{y}'}'<0 \\
\end{aligned} \right. $ có nghiệm $ \Leftrightarrow a<0 $ và phương trình $ {y}'=0$ có nghiệm.
${y}'=0$ $\Leftrightarrow \dfrac{a\left( x-2 \right)}{\sqrt{{{x}^{2}}-4x+5}}=2$ $\Leftrightarrow f\left( x \right)=\dfrac{x-2}{\sqrt{{{x}^{2}}-4x+5}}=\dfrac{2}{a}$.
Ta có: ${f}'\left( x \right)=\dfrac{1}{{{\left( \sqrt{{{x}^{2}}-4x+5} \right)}^{3}}}>0, \forall x$ ; $\underset{x\to -\infty }{\mathop{\lim }} f\left( x \right)=-1$ ; $\underset{x\to +\infty }{\mathop{\lim }} f\left( x \right)=1$.
& a<0 \\
& -1<\dfrac{2}{a}<1 \\
\end{aligned} \right. $ $ \Leftrightarrow a<-2$.
Suy ra có 18 số nguyên $a$ thuộc đoạn $\left[ -20 ; 20 \right]$ thỏa mãn.
Đáp án D.