find the value of "a" and "b" for which the limit exists both as x approaches 1 and as x approaches 2:

Answer:
a = 4
b = -2
Step-by-step explanation:
If the given function is continuous at x = 1
[tex]\lim_{x \to 1^{-}} f(x)=(x+1)[/tex]
[tex]=2[/tex]
[tex]\lim_{x \to 1^{+}} f(x)=ax+b[/tex]
[tex]=a+b[/tex]
[tex]\lim_{x \to 1} f(x)=ax+b[/tex]
[tex]=a+b[/tex]
And for the continuity of the function at x = 1,
[tex]\lim_{x \to 1^{-}} f(x)=\lim_{x \to 1^{+}} f(x)=\lim_{x \to 1} f(x)[/tex]
Therefore, (a + b) = 2 -------(1)
If the function 'f' is continuous at x = 2,
[tex]\lim_{x \to 2^{-}} f(x)=ax+b[/tex]
[tex]=2a+b[/tex]
[tex]\lim_{x \to 2^{+}} f(x)=3x[/tex]
[tex]=6[/tex]
[tex]\lim_{x \to 2} f(x)=3x[/tex]
[tex]=6[/tex]
Therefore, [tex]\lim_{x \to 2^{-}} f(x)=\lim_{x \to 2^{+}} f(x)=\lim_{x \to 2} f(x)[/tex]
2a + b = 6 -----(2)
Subtract equation (1) from (2),
(2a + b) - (a + b) = 6 - 2
a = 4
From equation (1),
4 + b = 2
b = -2