Finding constants in a piecewise function

2.4k Views Asked by At

The piecewise function is $$f(x)= \begin{cases} 2, & x \leq -1\\ ax+b, & -1 < x < 3\\ -2, & x\geq 3 \end{cases} $$

So I first find the limit of the first piece which is $$\lim_{x\to -1}f(x)=2 $$

Then I find the limit of the 2nd piece at -1 from the right $$\lim_{x\to-1+}f(x)=-a+b $$

Then I repeat this for the 2nd and 3rd piece at 3 $$\lim_{x\to 3}f(x)=-2$$ $$\lim_{x\to 3-}f(x)=3a+b$$ Now I set the limits that approached the same number equal to each other
$$ \begin{split} 2 &= -a &+ b\\ -2 &= 3a &+b \end{split} $$ but this is where I get stuck because my prof. said to added them normally but when I do this I get $$ 0=2a+2b$$

2

There are 2 best solutions below

0
On BEST ANSWER

your last equation implies $a+b=0 \iff a = -b$ and the first one says $2 = b-a = b-(-b) = 2b \iff b = 1, a = -1$.

0
On

You have to solve the linear system given by the two equations $2=-a+b$ and $-2=3a+b$. If you add the two equations and keep one of the two you obtain an equivalent system, hence you can solve $2=-a+b$ and $0=2a+2b$. But $0=2a+2b$ implies $b=-a$, hence substituting in the first equation we get $2=-a-a$, i.e. $2=-2a$m thus $a=-1$, It follows that $b=-a=-(-1)=1$.