# Differentiating an exponent of a series

I am working on a small software project and math is certainly not my strong suit, hence this question. Probably this question might look very simple to you experts and apologies in advance if that's the case.

I have a function as below. (Fourier series is the power of the exp - just in case if its not clear due to small fonts)

$$V(\phi, \alpha) = 2 cos (\frac{\phi}{2}-\alpha) e^{-\sum_{m=0}^{\infty} a_m cos(m\phi) + b_m sin(m\phi)}$$

Could someone please show me how to get $$\frac{\partial V}{\partial \phi}$$ from the above?

EDIT:

As per Claude Leibovici's answer below:

$$\frac{V'}{V} = \frac{-tan(\frac{\phi}{2}-\alpha)}{2} - \sum_{m=0}^\infty m b_m cos(m\phi) - m a_m sin(m\phi)$$

$$V'(\phi) = \frac{V'}{V}(\phi) * V(\phi)$$

Is this correct ?

EDIT 2:
I verified above with numerical differentiation and it is way off. Can someone who understands this please show me the proper answer. To be clear my objective here is not to learn calculus but requesting your assistance to get this sorted so that I can move on with my project.

• Please tell l us where exactly you got stuck. Aug 23 at 7:20
• I just tried doing this with the product rule. f(x) = 2*cos(phi/2 - alpha) g(x) = e^-(sum). it came down to -sin(phi/2-alpha)*e^(-sum) - 2 cos(phi/2-alpha)*e^-(sum). I am not even sure if this is correct though. Thats why its been asked Aug 23 at 8:06
• Take $\log(V)$ and differentiate to get $\frac{V'}V$ which is simple. When done, just write $V'=V \times \frac{V'}V$ Aug 23 at 9:47
• Hi @ClaudeLeibovici I think what you say is correct because I see taking the natural log in the original formulation from which I took this equation as well. But I don't know how to do this. Could you please provide more elaborated answer ? (if it bothers you to type a lengthy reply even the final answer would do) Aug 23 at 18:22

$$V= 2 \cos \left(\frac{\phi }{2}-\alpha \right) \exp \Bigg[{-\sum_{m=0}^{\infty} a_m \cos(m\phi) + b_m \sin(m\phi)}\Bigg]$$ $$\log(V)=\log(2)+\log \left(\cos \left(\frac{\phi }{2}-\alpha\right)\right)-\sum_{m=0}^{\infty} a_m \cos(m\phi) -\sum_{m=0}^{\infty} b_m \sin(m\phi)$$
Differentiate both sides to get $$\frac {V'}V=\cdots\cdots\cdots$$ and then $$V'=V \times \frac {V'}V$$