### Video Transcript

Given that the function π of π₯, which is equal to π₯ squared plus ππ₯ plus π all divided by π₯ squared minus five π₯ plus six if π₯ is less than two and π of π₯ is equal to six π₯ if π₯ is greater than two, has a limit when π₯ is equal to two. Determine the values of π and π.

Weβre told that the limit of the function π of π₯ as π₯ approaches two exists. And so we are asked to find the values of π and π, which allow this to be true. We can start by asking the question. What does it mean for the limit of our function π of π₯ to exist as π₯ approaches two? The limit of a function as π₯ approaches π exists if both the left-hand and right-hand limit of the function exist. And if these two limits are equal. This means there are three parts to checking that the limit in our question exists. We must have that the limit of π of π₯ as π₯ approaches two from the left exists. We must also have that the limit of π of π₯ as π₯ approaches two from the right exists. And finally, we should also have that both of these limits are equal.

Letβs start with the limit of π of π₯ as π₯ approaches two from the right. Since the values of π₯ are approaching two from the right, we must have that π₯ is greater than two. From the question, we can see that our function π of π₯ is equal to six π₯ when π₯ is greater than two. Since our function π of π₯ is equal to six π₯ for all π₯ is greater than two, we can just replace the π of π₯ in our right-hand limit with six π₯. We also know that we can evaluate the limit of any polynomial by using direct substitution. We substitute the value of two into our function six π₯ to get six multiplied by two. Which we can then evaluate to give us 12. So we have shown that the limit of π of π₯ as π₯ approaches two from the right is equal to 12.

Now, since the question tells us that the limit of π of π₯ as π₯ approaches two exists, we must have that all three parts of our limit definition are true. In particular, this means that the left-hand and right-hand limit of π of π₯ as π₯ approaches two must be equal. And we have just shown that the limit of π of π₯ as π₯ approaches two from the right is equal to 12. This means that the limit of π of π₯ as π₯ approaches two from the left must be equal to 12. Now that we have that this limit is equal to 12, letβs try to evaluate this limit. Since our values of π₯ are approaching two from the left, we must have that π₯ is less than two. From the question, we can see that when π₯ is less than two, our function is equal to π₯ squared plus ππ₯ plus π all divided by π₯ squared minus five π₯ plus six. Since our function π of π₯ is exactly equal to this rational function, when π₯ is less than two, we can replace the function π of π₯ in our limit with this rational function.

We also know that we can evaluate the limit of a rational function by using direct substitution. We substitute the value of two into the rational function. Giving us two squared plus π multiplied by two plus π all divided by two squared minus five times two plus six. Which we can simplify to give us four plus two π plus π all divided by zero. This is an indeterminate form. However, weβre told in the question that this limit exists. And we know that this limit must be equal to 12. We know that if our constant numerator of four plus two π plus π was positive, then this limit would be equal to positive infinity. Similarly, if this numerator was negative, then our limit would be equal to negative infinity. Since we know that this limit must be equal to 12, the only option is that our direct substitution of π₯ equals two must have given us the indeterminate form zero divided by zero. So our numerator is equal to zero when we substitute in π₯ is equal to two. Therefore, we can use the factor theorem to see that the numerator has a factor of π₯ minus two.

By equating the coefficients of π₯ squared, we can see that π must be equal to one. Similarly, by equating the constants, we will have that π is equal to negative π divided by two. Finally, if we were to equate the coefficients of π₯, we would have that π is equal to negative π divided by two minus two. We can then rewrite the limit in our numerator with π₯ minus two multiplied by π₯ minus π over two. Similarly, we could also factorize the denominator of our limit to get π₯ minus two multiplied by π₯ minus three. We can then cancel this shared factor of π₯ minus two. Which gives us the limit of π₯ minus π over two all divided by π₯ minus three as π₯ approaches two from the left. Again, we can see that this is the limit of a rational function.

So we can solve this by using direct substitution. So we substitute two into our expression to give us two minus π over two all divided by two minus three. Which we can simplify to give us π over two minus two. Since our limit is equal to 12, we get an expression for π, which is 12 is equal to π over two minus two. Which we can solve to give us that π is equal to 28. We saw earlier that π was equal to negative π over two minus two. We can then substitute our value of π equals 28 into this expression. To see that π is equal to negative 28 over two minus two, which we can calculate to give us π is equal to negative 16.

Therefore, we can conclude that the limit of the function π of π₯ as π₯ approaches two will exist when π is equal to negative 16. And π is equal to 28.