I have the following function:
$$f(x)=\prod_{m=0}^{n}(x-x_m)^{m+1}\tan(x), x_m=m\pi, M>0$$
I would like to calulate the numeric root of: $n\pi, n\ge0.$
In order to do that, I want to use Newton-Rapshon technique. And for that I would like to know what's the derivation of the function above, My guess would be that i need to do derivate: $(x-x_m)^{m+1}\tan(x)$.
But i saw that the correct answer is:
$$ f'(x)= 1/\cos^2x\cdot\prod_{m=0}^{n}(x-m\pi)^{m+1}+\tan x\cdot\sum_{m=0}^M (m+1)(x-m \pi )^m\cdot \prod_{n=0,n \ne m}^M(x-n\pi)^{n+1}$$
My question is - Why?
You have to use product rule:
$$(f_1 f_2 ...f_n)'=f_1' f_2 ... f_n +f_1 f_2' f_3...f_n +f_1 f_2 f_3' f_4...f_n +...+f_1 f_2 ...f_{n-1} f_n'$$
Also in your function, derivative of $\tan{x}$ is $\sec^2{x}$, which is the same as $\frac{1}{\cos^2{x}}$.