find the constants a and b so the function is continuous on a real line

piecewise function:
f(x)={5, if x<= -2; ax+b, if -2<x<3; -5, if x>=3

I know the limit x-->2- is 5 and limit x-->3+ is -5. I don't know how to find the constants

i have a=-2 and b=1

Forget about limits for a while and just consider the simple facts:

f(x) = 5 starts at -2 and goes to the left
then
f(x) = -5 starts at 3 and goes to the right.
Those two lines are "linked" by a straight line
from (-2,5) to (3,-5)
Let's just find that line .....
slope = -10/5 = -2
so (y-5) = -2(x+2)
y-5 = -2x - 4
y = -2x + 1
comparing with y = ax + b
a = -2 , b = 1

you had that, good job

To find the constants a and b such that the function f(x) is continuous on the real line, we need to ensure that the value of f(x) at x = -2 matches the value of f(x) as x approaches -2 from the left, and the value of f(x) at x = 3 matches the value of f(x) as x approaches 3 from the right.

First, let's consider the left side of x = -2. We have f(x) = 5 for x <= -2, so this is already satisfied.

Next, let's consider the right side of x = 3. We have f(x) = -5 for x >= 3, so this is also already satisfied.

Now, let's focus on the interval -2 < x < 3. We know that for this interval, f(x) = ax + b.

To find the constants a and b, we need to match the value of f(x) as x approaches -2 from the right to the value of f(x) as x approaches -2 from the left. In other words, we need to make f(-2) equal to the limit of f(x) as x approaches -2.

For the left side, we have f(-2) = 5.

For the right side, we need to find the limit as x approaches -2 of ax + b. Since we know that f(-2) = 5, we can set up the equation:

lim (x->-2) ax + b = 5

Plug in x = -2:

a(-2) + b = 5
-2a + b = 5

Now let's consider the interval 3 > x > -2. We also need to match the value of f(x) as x approaches 3 from the left to the value of f(x) as x approaches 3 from the right. In other words, we need to make the limit of f(x) as x approaches 3 equal to f(3).

For the left side, we need to find the limit as x approaches 3 of ax + b. Since we know that f(3) = -5, we can set up the equation:

lim (x->3) ax + b = -5

Plug in x = 3:

a(3) + b = -5
3a + b = -5

Now we have a system of two equations:

-2a + b = 5
3a + b = -5

We can solve this system of equations to find the values of a and b. Subtract the first equation from the second equation:

(3a + b) - (-2a + b) = -5 - 5
5a = -10
a = -2

Substitute a = -2 back into one of the original equations (let's use the first equation) to find b:

-2(-2) + b = 5
4 + b = 5
b = 5 - 4
b = 1

Therefore, the values of the constants a and b that make the function f(x) continuous on the real line are a = -2 and b = 1.

To find the constants a and b that make the function continuous, we need to ensure that the value of the function at x = -2 matches the value of the function as x approaches -2 from the left, and the value of the function at x = 3 matches the value of the function as x approaches 3 from the right.

First, let's check the limit as x approaches -2 from the left:

lim(x→-2-) (ax + b) = 5

Since x approaches -2 from the left, we use the expression ax + b with -2 substituted for x, giving us:

a(-2) + b = 5
-2a + b = 5 (Equation 1)

Next, let's check the limit as x approaches 3 from the right:

lim(x→3+) (ax + b) = -5

Again, using the expression ax + b, we substitute 3 for x:

a(3) + b = -5
3a + b = -5 (Equation 2)

To solve these two equations simultaneously, we can either use substitution or elimination method.

Let's solve the equations using the elimination method:

Multiply Equation 1 by 3 and Equation 2 by -2 to eliminate the b term:

(-2a + b) * 3 = 5 * 3
(3a + b) * (-2) = -5 * (-2)

This simplifies to:

-6a + 3b = 15
-6a - 2b = 10

Now, subtract Equation 2 from Equation 1:

(-6a + 3b) - (-6a - 2b) = 15 - 10
-6a + 3b + 6a + 2b = 5
5b = 5

Divide both sides by 5:

b = 1

Now, substitute b = 1 into Equation 1 to solve for a:

-2a + 1 = 5
-2a = 4
a = -2

Therefore, the constants a = -2 and b = 1 make the function continuous on the real line.