How do I take the discrete derivative of Cosine, and show that it still equals -Sine?

290 Views Asked by At

This is really stumping me. I have a signal that is being modulated at frequency $f$, and is sampled every $\Delta t$ seconds for $N$ samples. I'll index these samples with $k$.

The signal is $S(k\Delta t) = -A \cos(2 \pi f k \Delta t)$

The derivative of this is approximately: $S'(k \Delta t) = \frac{S((k+1) \Delta t) - S(k \Delta t)}{\Delta t} = -\frac{A}{\Delta t}(\cos(2 \pi f (k+1) \Delta t)-\cos(2 \pi f k \Delta t))$

By writing these out in complex exponential form, I can rewrite this as:

$S'(k \Delta t) = -\frac{A}{2 \Delta t}(e^{2\pi i f \Delta t}+1)\cos(2 \pi f k \Delta t)$.

However, I know that the derivative of a cosine should be a negative sine! Probably:

$S'(k \Delta t) = 2\pi f \Delta t A \sin(2 \pi f k \Delta t)$.

How on earth do I show that these last two lines are approximately equal? Thank you very much for your help!

1

There are 1 best solutions below

1
On BEST ANSWER

Just copy the proof of the derivative for cosine, and replace the limits with approximations. I assume $f$ and $A$ are constant frequency/amplitude.

$$-\frac{A}{\Delta t}(\cos(2 \pi f (k+1) \Delta t)-\cos(2 \pi f k \Delta t))$$

Since $\cos(\alpha+\beta) = \cos \alpha \cos \beta – \sin \alpha \sin \beta$, that becomes ($\alpha = 2 \pi f k \Delta t, \beta = 2 \pi f \Delta t$):

$$-\frac{A}{\Delta t}(\cos(2 \pi f k \Delta t)\cos(2 \pi f \Delta t) - \sin(2 \pi f k \Delta t)\sin(2 \pi f \Delta t)-\cos(2 \pi f k \Delta t)) = -A\left(\cos(2 \pi f k \Delta t)\frac{\cos(2 \pi f \Delta t) - 1}{\Delta t} - \sin(2 \pi f k \Delta t)\frac{\sin(2 \pi f \Delta t)}{\Delta t}\right)$$

As of yet, we've only used algebra on the discrete derivative. At this point, we use the following approximations, based on well-known limits that can be found in the same trig identity wiki article:

$$\frac{\cos(2 \pi f \Delta t) - 1}{2 \pi f\Delta t} \approx 0 \qquad \frac{\sin(2 \pi f \Delta t)}{2 \pi f\Delta t} \approx 1$$

Therefore, the above equation can be approximated as:

$$A2 \pi f \sin(2 \pi f k \Delta t)$$

As required.