# What values make the function continuous

Im asked the question: What of $c,d$ make the function continuous at $x=1$ $$f(x) = \begin{cases} x^2 & x\le1 \\ cx+d & x\gt1 \end{cases}$$ I think the function will only be continous if the limit exists at $x=1$. For the limit to exist this must be true: $$\lim_{x\to1^{+}}f(x) = \lim_{x\to1^{-}}f(x)$$ Now here is where I get confused. I think the only way the proposed can be true is if $cx+d$ has the same slope and hits the point $(1,1)$ like $x^2$ does. But im not really quite sure about the slope thing. $h(x)=|x|$ at $x=0$ is a pretty obvious example in which the limits from positive and negative are not the same which means the limit does not exist and in turn is not continuous at $x=0$.So applying this get me here: $$f^{'}(x)=2x\:\:\:x\le1 \\f^{'}(1)=2$$ Also the given case for $x\gt1$ is linear, assuming $c,d$ are just coeffecients. So that the graph will just be a line that must go through $(1,1)$ with a slope of 2. $$f(x)=cx+d\\ f(1)=2+d=1\\ d=-1$$ So that.. $$f(x) = \begin{cases} x^2 & x\le1 \\ 2x-1 & x\gt1 \end{cases}$$ makes the function continuous at $x=1$. I've been doing this course and really having a hard time in it, my prof is very unhelpful and rude so I avoid asking him. Any attempt to try the homework in my own way leads me to fail each assignment. I guess he wants to do it exactly his way. And I know I will get this question completely wrong as it seems likes its lacking rigor. Is there any way I can make this more rigorous? Any thoughts very much appreciated!

• the slope doesn't need to be the same, it only has to take on the same value at the point where they "meet" – Zelos Malum Oct 29 '15 at 21:06
• You're only talking about continuity. Slope doesn't matter in the least. – fleablood Oct 29 '15 at 21:07
• $f$ is continuous at 1 iff $lim_{x\to 1^-} f(x)=lim_{x\to 1^+} f(x)= f(1)$ – joefu Oct 29 '15 at 21:19
• OP: joefu brings up a point that is not directly a concern for this problem, but may come up later on: Not only must the limit exist at that point, but it must be equal to the value of the function at that point. Otherwise, a function like $f(1) = 1, f(x) = 0$ for $x \not= 1$ has a limit at $x = 1$, but that limiting value is $0$, which does not equal $f(1) = 1$. That function is not continuous at $x = 1$ (although, because the limit does exist, the discontinuity there is "removable"). – Brian Tung Oct 29 '15 at 21:22
• P.S. Do make sure that your homework does not also expect the function $f(x)$ to be differentiable as well as continuous. – Brian Tung Oct 29 '15 at 21:24

$\lim_{x\to1^{+}}f(x) = \lim_{x\to1^{-}}f(x)$ is all you need.

$\lim_{x\to1^{-}}f(x) = f(1) = 1$ so we need

$\lim_{x\to1}(cx + d) = 1$.

Okay... let's not get involved...

$\lim_{x\to1}(cx + d) = d + c \lim x = d + c$.

So d+c = 1. Any such pairs of number will make a continuous function.

• c = 2 and d = -1 is nice solution because it does keep the slope so the derivative is continuous. – fleablood Oct 29 '15 at 21:23
• Yes was just about to post that thank you, got confused with differentiable=>continuity – user3258845 Oct 29 '15 at 21:25

You only need to get a continuous function and not a differentiable function. You do not even have to look on the derivative. And $h(x) = |x|$ is continuous.