# Continuity of this function at $x=0$

The following function is not defined at $x=0$:

$$f(x) = \frac{\log(1+ax) - \log(1-bx)}{x} .$$

What would be the value of $f(0)$ so that it is continuous at $x=0$?

-

As Chandru has pointed out, this is the $\ln(\cos\,x)/x$ problem all over again. So, being unimaginative at this time of the night, I will solve it in the same way all over again. Please note that most of the time in this post, $f$ does not refer to your $f$. So let's call your function $g$. The value we need to assign to it at $0$ in order to end up with a continuous function is $$\lim_{x\to 0}\frac{g(x)}{x}$$ if this limit exists. (If the limit does not exist, no assignment of value to $g$ at $0$ will make the resulting function continuous.)

Using the notation of Did's answer, let's find $$\lim_{x \to 0} \frac{\ln(1+cx) -\ln(1)}{x-0}.$$ We have done nothing here, since $\ln 1=0$, and $x-0=x$, but we have done nothing in what will turn out to be a useful way.

We recognize the above expression as the definition of $f'(0)$, where $f(x)=\ln(1+cx)$.

For our particular function $f$, we have $$f'(x)=\frac{c}{1+cx}$$ and therefore $f'(0)=c$.

Thus the required answer is $a-(-b)$, which is $a+b$.

Comment: The limit is also easily arrived at by considering the power series expansion of $\ln(1+u)$.

We sort of took a chance in the above calculation (well, not really, sine the answer is obvious from the power series). In principle, it would have been better to do exactly the same thing, but with $f(x)=\ln(1+ax) -\ln(1-bx)$. We would then have $$f'(x)=\frac{a}{1+ax}-\frac{-b}{1-bx}$$ and again we would obtain $f'(0)=a+b$.

The method is available for any limit of the kind $$\lim_{x\to a} \frac{f(x)-f(a)}{x-a}$$ once we know how to differentiate $f$.

It can be thought of as a hypersimple version of L'Hospital's Rule. Or else, more ambitiously but less accurately, as the beginnings of an explanation of why the L'Hospital's Rule works.

-
I corrected a parenthesis typo in the first line, I hope you don't mind. – Asaf Karagila Jul 17 '11 at 11:09
@Asaf Karagila: Thank you. I am probably overfond of parentheses, not a good thing for someone who can't count. And thank you for the spacing correction, I keep forgetting that MathJax's spacing can be off. – André Nicolas Jul 17 '11 at 11:40
What spacing? I only changed one parenthesis :-) – Asaf Karagila Jul 17 '11 at 11:54
Yes, and ya missed another one @Asaf. ;) (No worries, I fixed it; check edit history...) – J. M. Jul 17 '11 at 11:55

Do you want to evaluate the limit at $0$. Then you can see that

\begin{align*} f(x) = \lim_{x \to 0} \biggl(\frac{1+ax}{1-bx}\biggr)^{1/x} &=\lim_{x \to 0} \biggl(1+ \frac{(b+a)x}{1-bx}\biggr)^{1/x} \\ &=\lim_{x \to 0} \biggl(1+ \frac{(b+a)x}{1+bx}\biggr)^{\small \frac{1+bx}{(b+a)x} \cdot \frac{(b+a)x}{x \cdot (1+bx)}} \\ &=e^{\small\displaystyle\tiny\lim_{x \to 0} \frac{(b+a)x}{x\cdot (1+bx)}} = e^{b+a} \qquad \qquad \Bigl[ \because \small \lim_{x \to 0} (1+x)^{1/x} =e \Bigr] \end{align*}

Therefore as $x \to 0$, $\log(f(x)) \to (b+a)$

Please see this post: Solving $\lim\limits_{x \to 0^+} \frac{\ln[\cos(x)]}{x}$ as a similar kind of methodology is used to solve this problem.

-
I only hope that I haven't gone wrong with my calculations. – user9413 Jul 17 '11 at 8:53
You have, twice: your function $f$ is not the right one and the limit of your function $f$ is not correct. Sorry but you asked... :-) – Did Jul 17 '11 at 9:12
You switched $1+bx$ to $1-bx$ in the first line. I don't even know what wizardry you performed in the second line's exponent. – anon Jul 17 '11 at 11:54
@anon: Yes, I have rectified my answer. – user9413 Jul 17 '11 at 12:05
@Didier: Thanks, I got confused somewhere. Hope it's fine now. – user9413 Jul 17 '11 at 12:06

Hint: for every real number $c$, show that $g_c(x)=\log(1+cx)/x$ has a limit $\ell(c)$ when $x\to0$ and compute $\ell(c)$. Then apply this partial result to your question.

Here is an alternative solution. First, $$f(x)=\int_{\,-b}^{\,\,a}\,\frac{\mathrm{d}z}{1+zx}.$$ Second, for small enough values of $|x|$, $|1/(1+zx)|\le1/(1-c)$ with $c=|x|\max\{|a|,|b|\}$ and $c<1$. Hence dominated convergence applies when $x\to0$, which means that $f(x)$ converges to the integral of the limit of the function. The latter is $1$ for every $z$ hence its integral is $a+b$.

-
There are various ways of thinking about this, but consider L'Hôpital's rule if you know it. – Mark Bennet Jul 17 '11 at 9:08
@Mark: I assume you are talking to the OP here. And yes there are several ways to do this. – Did Jul 17 '11 at 9:10
@Didier Piau may I have some details please. – TheVillageIdiot Jul 17 '11 at 9:21
@Didier: yes to OP. I mentioned L'Hôpital because it can be a handy way of computing such limits under pressure (eg in exams) when it is rather easy to do something silly like getting the series expansion wrong. – Mark Bennet Jul 17 '11 at 9:22
@TheVillageIdiot: Were you able to compute $\ell(c)$? If not, what is the trouble? If yes, do you see how to apply this to your question? – Did Jul 17 '11 at 11:47