# Anomaly in differentiation.

I was just playing around with the product rule of differentiation, and I followed some steps, which I think are authentic, but I am not able to explain the result.

Let $f:\mathbb{R}\to\mathbb{R}$ and $g:\mathbb{R}\to\mathbb{R}$ be two differentiable functions at every $x$. And let us suppose that we want to differentiate the function $p(x)=f(x)g(x)$ at some $x$. So, \begin{align}p'(x)&=\lim_{h\to0}\frac{p(x+h)-p(x)}{h}\\ &=\lim_{h\to0}\frac{f(x+h)g(x+h)-f(x)g(x)}{h}\\ \end{align}

For this particular case, lets assume that $f(x)\in\mathbb{R}/\{0\}$. So, factoring $f(x)$, we get: \begin{align} &=\lim_{h\to0}f(x)\left\{\frac{f(x+h)g(x+h)}{f(x)\dot{}h}-\frac{g(x)}{h}\right\} \end{align} Now, all I am doing is using limit properties(addition, subtraction, multiplication): \begin{align} &=f(x)\lim_{h\to0}\left\{\frac{f(x+h)g(x+h)}{f(x)\dot{}h}-\frac{g(x)}{h}\right\}\\ &=f(x)\left\{\lim_{h\to0}\frac{f(x+h)g(x+h)}{f(x)\dot{}h}-\lim_{h\to0}\frac{g(x)}{h}\right\}\\ &= f(x)g'(x) \end{align} To desribe as to how I computed the limits in the braces, I split the first limit as two functions, and used the fact that $\lim_{h\to0}\frac{f(x+h)}{f(x)}=1$. And for the rest, I combined the two limits, giving the derivative of $g$ at $x$. What is the problem in these steps? Initially, I assumed $f(x)\ne0$, so undefined is out of the view.

• Using the same logics, you can even conclude $\lim f(x)g(x)\{f(x+h)g(x+h)/f(x)g(x)h-1/h\}=0$. – Yves Daoust Dec 7 '16 at 14:22

First, the splitting of the limit $$\lim_{h\to0}\{\frac{f(x+h)g(x+h)}{f(x)\dot{}h}-\frac{g(x)}{h}\} = \{\lim_{h\to0}\frac{f(x+h)g(x+h)}{f(x)\dot{}h}-\lim_{h\to0}\frac{g(x)}{h}\}$$

is incorrect, as both limits on the right side do not exist generally (if $g(x) \neq 0$). That's easy to see, the enumerator of $\frac{f(x+h)g(x+h)}{f(x)\dot{}h}$ goes to $f(x)g(x)$, while the denominator goes to $0$. Similiarly, the enumarator of the second term is a constant $g(x)$, while the denominator goes to $0$.

What you did is similar to the following:

$$2 = \lim_{x \to 0} 2 = \lim_{x \to 0} \{(2+\frac{1}{x}) - \frac{1}{x} \} = \lim_{x \to 0} (2+\frac{1}{x}) - \lim_{x \to 0}\frac{1}{x} = \lim_{x \to 0} \frac{1+2x}{x} - \lim_{x \to 0}\frac{1}{x} = \lim_{x \to 0} \frac{1+2x}{1+x} \frac{1+x}{x}- \lim_{x \to 0}\frac{1}{x} = \lim_{x \to 0} \frac{1+x}{x} - \lim_{x \to 0}\frac{1}{x} = \lim_{x \to 0} (1+\frac{1}{x}) - \lim_{x \to 0}\frac{1}{x} = \lim_{x \to 0} \{(1+\frac{1}{x}) - \frac{1}{x} \} = 1$$

using the correct fact that $\lim_{x \to 0} \frac{1+2x}{1+x} = 1$

All those terms $\lim_{x \to 0}\frac{1}{x}$ are meaningless, as they are equal to $\infty$ and you cannot meaningfully subtract two infinities. As my equations shows, you can transform any finite term like 2 into another finite term like 1.

That's what happened to you when you rewrote the formula for differentiation of a product: You had some infinite terms in between, and "adjusted" one of them with a factor ($\frac{f(x+h)}{f(x)}$) that goes to 1 under the limit (just as I did with the factor $\frac{1+2x}{1+x}$). But since that factor applied to a term that went to $\infty$ under the limit, you got the incorrect conclusion.

You can't split up the limit $\lim \limits_{h \to 0} \left\{\frac{f(x + h)g(x + h)}{f(x) h} - \frac{g(x)}{h}\right\}$ into two limits, since the two limits in general won't converge. The rule $$\lim \limits_{x \to x_0} (f(x) + g(x)) = \lim \limits_{x \to x_0} f(x) + \lim \limits_{x \to x_0} g(x)$$ can only be applied, if both the limits on the right-hand side exist.

The step where you split the limit in two is invalid. The second limit does not exist (goes to infinity for h to zero). So splitting the limit is not allowed to begin with.

$$\frac{f(x+h)}{f(x)}$$ does tend to $1$, and

$$\frac{f(x+h)}{f(x)}-1$$ does tend to $0$.

But this doesn't mean that

$$\frac1h\left(\frac{f(x+h)}{f(x)}-1\right)$$ tends to $0$. On the opposite, it tends to

$$\frac{f'(x)}{f(x)}.$$

When you subtract two terms having a constant and a variable part (the limit and a discrepancywhich is a function of $h$), if the constant parts cancel out, the variable part becomes the main contribution.