# Calculus: Solving Piece wise function for constants a and b

• April 21st 2013, 12:00 AM
meggzie7
Calculus: Solving Piece wise function for constants a and b
Hi (Smile)
I have been working on this problem for days and i think im just missing a concept or something. the question is;
Let f(x)={cos (pi*x/2) +a if x<-2
{100 if x=-2
{2x^2 +b if -2<x<0
{2^x +1 if x>0 where a and b are constants. Find a and b for which both lim x-->0 f(x) and lim x-->-2f(x) exist.
So far i work it out and i can get either a=11 and b=2 or a=101 and b=92 but with these answers f(x) isnt continuous.
Help meh pleaaasseee!! (with working would be great (Smile))
THANK YOU!!!
• April 21st 2013, 12:26 AM
MarkFL
Re: Calculus: Solving Piece wise function for constants a and b
In order for $\lim_{x\to-2}f(x)$ to exist, we require:

$\lim_{x\to-2^{-}}f(x)=\lim_{x\to-2^{+}}f(x)$

Now, using the definition of $f(x)$, we find this means:

$\lim_{x\to-2^{-}}\left(\cos\left(\frac{\pi x}{2} \right)+a \right)=\lim_{x\to-2^{+}}\left(2x^2+b \right)$

$\cos\left(\frac{\pi\cdot2}{2} \right)+a=2(2)^2+b$

$-1+a=8+b$

$a=9+b$

In order for $\lim_{x\to0}f(x)$ to exist, we require:

$\lim_{x\to0^{-}}f(x)=\lim_{x\to0^{+}}f(x)$

Now, using the definition of $f(x)$, we find this means:

$\lim_{x\to0^{-}}\left(2x^2+b \right)=\lim_{x\to0^{+}}\left(2^x+1 \right)$

$2(0)^2+b=2^0+1$

$b=2\,\therefore\,a=11$

This ensures the limits exist, and while there is a discontinuity at $x=-2$, this is allowed as the function need not have the value of the limits at that point.
• April 21st 2013, 01:07 AM
meggzie7
Re: Calculus: Solving Piece wise function for constants a and b
Thank you MarkFL :) that was the answer that i has but i didnt know that discontinuity would allow the limits to still exist :) thanks again