# Math Help - Continuity

1. ## Continuity

Hey everyone, I can't figure this problem out:

Find the constants a and b that will make the following function continuous everywhere.

f(x)=
• $a cosx$ if x<0
• sin $\left(\frac{pi}{2}x+3)$ if 0<=x<=2
• $x^2-x+b$ if x>2

2. Originally Posted by bodel
Hey everyone, I can't figure this problem out:

Find the constants a and b that will make the following function continuous everywhere.

f(x)=
• $a cosx$ if x<0
• sin $\left(\frac{pi}{2}x+3)$ if 0<=x<=2
• $x^2-x+b$ if x>2
I assume you are aware of the definition of continuity at a point ...

$\displaystyle \lim_{x \to 0^+} f(x) = \sin(3)
$

$f(0) = \sin(3)$

therefore $\displaystyle \lim_{x \to 0^-} f(x) = \sin(3) = a\cos(0)$

$a = ?$

$\displaystyle \lim_{x \to 2^-} f(x) = \sin(\pi+3) = -\sin(3)$

$f(2) = -\sin(3)$

therefore, $\displaystyle \lim_{x \to 2^+} f(x) = 2^2 - 2 + b = -\sin(3)$

$b = ?$

3. Thanks skeeter!! I actually got the same answers for both sides of the limit of x=0 and x=2. I was getting confused because I knew they had to equal each other, but I didn't actually set the answers equal and solve for the constant.

Would a = sin(3) and b = -sin(3)-2

4. Originally Posted by bodel
I actually got the same answers for both sides of the limit of x=0 and x=2. Would a = sin(3) and b = -sin(3)-2
The the value of a is correct.

$b=-\sin(3)-2.$ WHY?

5. $\displaystyle \lim_{x \to 2^+} f(x) = 2^2 - 2 + b = -\sin(3)$

$b = ?$

1. 4-2+b = -sin(3)
2. 2+b = -sin(3)
3. b = -sin(3) - 2?

I'm prone to dumb mistakes so please point them out if you find some.
Originally Posted by Plato
The the value of a is correct.

$b=-\sin(3)-2.$ WHY?

6. $b = -\sin(3) - 2$

works for me.