# Ensuring continuity and differentiability of a function

I'm totally stuck with this function of which I have to prove its continuity and differentiability: $$f(x)=\begin{cases} a+\sqrt{x^2+3},& x\le 1,\\ b\ln x+(2a+1)x,& x>1.\end{cases}$$

I know that it is continuous for $a=1$ but when try to differentiate the function I can't go on, I'm stuck here, but it is here that I can find the value of $b$. Please help me (I can use only the definition of derivative, by finding limit of the difference quotient).

Sorry I don't use math formatting but soon I will be able to use it...

• I took the liberty to edit your post to typeset formulas using MathJax. Please, check that this is indeed the function you want to study. – TZakrevskiy Dec 16 '13 at 19:20
• I changed "derivability", which does not mean what you want, with "differentiability", which is the correct term. – Andrés E. Caicedo Dec 16 '13 at 19:22
• How do you know that the question is continuous for $a=1$? In fact, it is not. Perhaps you mean that $f$ must be continuous at $x=1$? This gives you enough information to find $a$. Why don't you start with that. – Andrés E. Caicedo Dec 16 '13 at 19:24
• I found that a=1 by calculating the left and right side of the limit of this function as x approaches to 1. From this I find that for the first part of function the limit is a+2 and for the second is 2a+1. From this situation we know that the function is continuous if the left and the right side have the same limit so 2a+1=a+2 -----> a=1 – Dipok Dec 16 '13 at 19:45

For continuity at $x=1$ we need to satify the equality

$$f(1)=a+2\stackrel{!}{=}\lim_{x\rightarrow 1^+} b\ln x+(2a+1)x$$

i.e. $a+2=2a+1\Leftrightarrow a=1$. Let us differentiate both branches of $f$, arriving at $$f'(x)=\begin{cases} \frac{x}{\sqrt{x^2+3}},& x\le 1,\\ \frac{b}{x}+2a+1,& x>1.\end{cases}$$

We need to check differentiability at $x=1$, then. Note that the term $\frac{b}{x}$ gives no singularity, because it appears in the branch of $f$ defined for all $x>1$.

We need to solve

$$f'(1)=\frac{1}{2}\stackrel{!}{=}\lim_{x\rightarrow 1^+} \frac{b}{x}+2a+1,$$

i.e. $\frac{1}{2}=b+2a+1$. We already know that $a=1$, so we arrive at $b=-\frac{5}{2}$. In summary, the pair

$$(a,b)=(1,-\frac{5}{2})$$

ensures continuity and differentiability of $f$ on $\mathbb R$.

• Just solved in this way! However thanks for your answer :-) – Dipok Dec 17 '13 at 18:38
• Well done!Keep going :) – Avitus Dec 17 '13 at 20:47