Đáp án đúng: A
Để hàm số liên tục tại x = -2, ta cần có:
\[\mathop {\lim }\limits_{x \to - {2^ - }} f(x) = \mathop {\lim }\limits_{x \to - {2^ + }} f(x) = f(-2)\]
\[\mathop {\lim }\limits_{x \to - {2^ - }} f(x) = \mathop {\lim }\limits_{x \to - {2^ - }} (a{x^2} + 4x) = 4a - 8\]
\[\mathop {\lim }\limits_{x \to - {2^ + }} f(x) = \mathop {\lim }\limits_{x \to - {2^ + }} (\sin (x + 2) + 2bx) = \sin (0) - 4b = - 4b\]
\[f(-2) = 4a - 8\]
Suy ra:
\[4a - 8 = - 4b \Leftrightarrow a + b = 2 \Leftrightarrow a = 2 - b\]
Để hàm số khả vi tại x = -2, ta cần có:
\[\mathop {\lim }\limits_{x \to - {2^ - }} \frac{{f(x) - f( - 2)}}{{x + 2}} = \mathop {\lim }\limits_{x \to - {2^ + }} \frac{{f(x) - f( - 2)}}{{x + 2}}\]
Tính đạo hàm:
\[f'(x) = \left\{ {\begin{array}{*{20}{c}}{2ax + 4,x < - 2}\\{\cos (x + 2) + 2b,x > - 2}\end{array}} \right.\]
Để hàm số khả vi tại x = -2, ta cần có:
\[\mathop {\lim }\limits_{x \to - {2^ - }} f'(x) = \mathop {\lim }\limits_{x \to - {2^ + }} f'(x)\]
\[ - 4a + 4 = \cos (0) + 2b \Leftrightarrow - 4a + 4 = 1 + 2b \Leftrightarrow - 4a - 2b = - 3\]
Thay a = 2 - b vào, ta được:
\[ - 4(2 - b) - 2b = - 3 \Leftrightarrow - 8 + 4b - 2b = - 3 \Leftrightarrow 2b = 5 \Leftrightarrow b = \frac{5}{2}\]
Suy ra:
\[a = 2 - \frac{5}{2} = - \frac{1}{2}\]
Vậy \[a = - \frac{1}{2},b = \frac{5}{2}\]