# Prove using first principle

Using first principle, prove that if$$g(x) = x\cdot f(x)$$ then $$g'(x)= x \cdot f'(x) + f(x)$$

I tried this:

$$g'(x) = \lim_{h\to 0} \frac{[(x+h)\cdot f(x+h) - (x\cdot f(x))]}{h}$$

• Can you elaborate on what you mean by "first principle"? Where did you use it in your attempt? – Thibaut Dumont Mar 7 '17 at 22:36
• First principle is $f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}$ – lakada Mar 7 '17 at 22:36
• so far so good. Now collect the terms $\frac {x(f(x+h) - f(x)) + h(f(x+h)}{h}$ and evaluate the limit – Doug M Mar 7 '17 at 22:36

You almost got it! Just readjust the terms like that

$$g'(x)=\lim_{h\to 0} \frac{[(x+h)f(x+h)-xf(x)]}{h}=x\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}+\lim_{h\to 0}\frac{hf(x+h)}{h}=xf'(x)+f(x)$$

• Nice answer and way simpler and more direct than mine. +1 – DonAntonio Mar 7 '17 at 23:00
• $g'(x)=\lim_{h\to 0} \frac{[\color{green}{(x+h)f(x+h)}-xf(x)]}{h} = x\lim_{h\to 0}\frac{\color{green}{f(x+h)}-f(x)}{h}+\lim_{h\to 0}\frac{hf(x+h)}{h}$ How does $(x+h)$ separate from $f(x+h)$ – lakada Mar 7 '17 at 23:17
• @lakada $(x+h)\cdot f(x+h) = x \cdot f(x+h) + h \cdot f(x+h)$ – dxiv Mar 8 '17 at 0:10
• @dvix thanks makes sense now – lakada Mar 8 '17 at 0:21
• $g'(x) = \lim_{h\to 0} \frac{g(x+h)- g(x)}{h} =\lim_{h\to 0} \frac{[(x+h)f(x+h)-xf(x)]}{h} = \lim_{h\to 0} \frac{[x\cdot f(x+h) + h\cdot f(x+h)-xf(x)]}{h} = \lim_{h\to 0} \frac{[x\cdot f(x+h)-xf(x)]}{h} + \frac{h\cdot f(x+h)}{h} = \lim_{h\to 0} \frac{x\cdot[ f(x+h)-f(x)]}{h} + \lim_{h\to 0} \frac{h\cdot f(x+h)}{h} = x \cdot f'(x) + f(x)$ – lakada Mar 8 '17 at 0:43

$$\lim_{h\to0}\frac{g(x+h)-g(x)}h=\lim_{h\to0}\frac{(x+h)f(x+h)-xf(x)}h=$$

$$=\lim_{h\to0}\frac{(\color{green}x+\color{red}h)f(x+h)-\color{red}{hf(x)}+hf(x)-\color{green}{xf(x)}}h=$$

$$=\lim_{h\to0}\frac{\color{red}{h\left[f(x+h)-f(x)\right]}+\color{green}{x\left[f(x+h)-f(x)\right]}}h+\overbrace{f(x)}^{=\frac{hf(x)}h}=$$

$$=\lim_{h\to0}\require{cancel}\frac{\cancel h\left[f(x+h)-f(x)\right]}{\cancel h}+\lim_{h\to0}x\frac{\left[f(x+h)-f(x)\right]}h+f(x)=$$

$$=0+xf'(x)+f(x)=xf'(x)+f(x)$$

Observe that first zero is due to continuity of $\;f\;$ at each $\;x\;$ where it is differentiable

• how do you get $hf(x)$ in the 2nd line? – lakada Mar 7 '17 at 22:43
• @lakada Old trick: I added and substracted $\;hf(x)\;$ in the numerator. This works in several cases. – DonAntonio Mar 7 '17 at 22:44
• In the 3rd line how did you create those factors? – lakada Mar 7 '17 at 22:49
• @lakada Grouping from the second line...Perhaps I'll add some colours to make it clearer. – DonAntonio Mar 7 '17 at 22:50
• Is there another way to solve this question without grouping? – lakada Mar 7 '17 at 22:58