# What technique is used for this simplification?

How/why does this equality hold? What technique is used here?

$\frac{f(a+h)g(a+h)−f(a)g(a)}{h} = g(a) \frac{f(a+h)−f(a)}{h} + f(a+h) \frac{g(a+h)−g(a)}{h}$

where f,g are real functions and a,h are real variables

-

This is an old trick: add and substract the same quantity. $$A\times B-C\times D=A\times B-A\times C+A\times C-C\times D=A\times(B-C)+C\times(A-D).$$ In your question \begin{align*} A&=f(a+h)\\ B&=g(a+h)\\ C&=f(a)\\ D&=g(a) \end{align*}

-

Well, let's try multipying out the right hand side:

$$g(a)\left( \frac{f(a+h)-f(a)}{h} \right) + f(a+h)\left( \frac{g(a+h)-g(a)}{h} \right) =$$

$$\frac{g(a)f(a+h)-g(a)f(a)}{h} + \frac{f(a+h)g(a+h)-f(a+h)g(a)}{h} =$$

$$\frac{g(a)f(a+h)-g(a)f(a)+f(a+h)g(a+h)-f(a+h)g(a)}{h} =$$

$$\frac{g(a)f(a+h)-f(a+h)g(a)-g(a)f(a)+f(a+h)g(a+h)}{h} =$$

$$\frac{-g(a)f(a)+f(a+h)g(a+h)}{h} =$$

$$\frac{f(a+h)g(a+h)-g(a)f(a)}{h} =$$

$$\frac{f(a+h)g(a+h)-f(a)g(a)}{h} \, .$$

-

Fly by Night has an excellent algebraic answer. To understand the idea behind what's going on, if you have a difference A - B, you sometimes can get it into a better form if you use the following "trick" and rewrite it as (A - C) + (C - B).

-