Understanding the logic behind particular derivative I have 
$\frac{\partial (f(x) g(x))}{\partial x}$=$g(x) f'(x)+f(x) g'(x)$,
I need to differentate this function with respect to x. 
$f(x)=(x+1) (x+2)^2 (x+3)^3 (x+4)^4$
However I do not see the logic using the product rule.
 A: For this example, it will be useful to use logarithmic differentiation. Let $y$ be our function. Then
$$\ln y=\ln(x+1)+2\ln(x+2)+3\ln(x+3)+4\ln(x+4).$$
Differentiate. We get 
$$\frac{1}{y}\frac{dy}{dx}=\frac{1}{x+1}+\frac{2}{x+2}+\frac{3}{x+3}+\frac{4}{x+4}.$$
A: The product rule states that: $(f_1(x)f_2(x))' = f_1'(x)f_2(x) + f_1(x)f_2'(x)$. This works in general for $n$ functions: $$(f_1(x) \cdots f_n(x))' = f_1'(x)f_2(x)\cdots f_n(x) + f_1(x)f_2'(x)\cdots f_n(x) + \cdots + f_1(x)\cdots f_n'(x)$$
The prime $'$ runs through all of the functions. Writing in a more compact way, we can say that: $$\left(\prod_{i=1}^n f_i(x)\right)' = \sum_{i = 1}^n \left(f_i'(x) \prod_{j = 1, j \neq i}^n f_j(x)\right)$$
You can prove this easily by induction on $n$. Now, applying this on your specific problem, we have: $$f'(x) = (x+1)'(x+2)^2(x+3)^3(x+4)^4 + (x+1)\left((x+2)^2\right)'(x+3)^3(x+4)^4 + \cdots+(x+1)(x+2)^2(x+3)^3\left((x+4)^4\right)'$$
In each factor, you use the chain rule.
A: HINT
You must do that step by step.
$f(x)=(x+1) (x+2)^2 (x+3)^3 (x+4)^4$
$$f'(x)=((x+1))' ((x+2)^2 (x+3)^3 (x+4)^4)+((x+1)) ((x+2)^2 (x+3)^3 (x+4)^4)'$$
$$((x+2)^2 (x+3)^3 (x+4)^4)'=((x+2)^2)' ((x+3)^3(x+4)^4)+((x+2)^2) ((x+3)^3(x+4)^4)'$$
$$((x+3)^3(x+4)^4)'=((x+3)^3)'((x+4)^4)+((x+3)^3)((x+4)^4)'$$
now you go from the last to the first.
