# First Differences and Running Sums

If you are a current student, please Log In for full access to the web site.

Note that this link will take you to an external site (

`https://shimmer.csail.mit.edu`) to authenticate, and then you will be redirected back to this page.

## 1) Derivatives

A crude approximation to differentiation on a discrete signal is a *first
difference*:

While there may be better means of approximating derivatives, this method is easy to implement and can work reasonably well in some scenarios.

### 1.1) In Time

### 1.2) In Frequency

You should do this computation **without** converting back to the time domain.

## 2) Integrals

A crude approximation to integration on a discrete signal is a *running sum*:

Note that this signal is only finite-valued and periodic if X[0] = 0, i.e., if the original signal has no DC offset. We will make that assumption moving forward.

### 2.1) In Time

*Hint:* If X[0]=0, what can be said about the sum of the signal over a period?

### 2.2) In Frequency

You should do this computation **without** converting back to the time domain.

Note that the value of Y[k] is not well defined for k=0; you should use 0 for that value (so that the output of the running sum has 0 DC offset).