Skip to content
Nemenman Lab
Menu ☰

Archive · Physics 380, 2011

Homework 9

Archived from the old lab wiki. Some external links may no longer work.

  1. We have discussed in class that functions x(t)x(t) can be represented by their Fourier transforms xωx_\omega. Transformation from a function to its transform and back is as easy as taking one integral. For functions that are periodic, so that x(t+2π)=x(t)x(t+2\pi)=x(t) for any tt, the result is even simpler, and the functions can be represented often by their Fourier series x(t)=a02+∑n=1∞ [ancos⁡(nt)+bnsin⁡(nt)]x(t)=\frac{a_0}{2} + \sum_{n=1}^\infty \, [a_n \cos(nt) + b_n \sin(nt)], where an=1π∫−ππx(t)cos⁡(nt) dt,n≥0a_n = \frac{1}{\pi}\int_{-\pi}^\pi x(t) \cos(nt)\, dt, \quad n \ge 0, and bn=1π∫−ππx(t)sin⁡(nt) dt,n≥1b_n = \frac{1}{\pi}\int_{-\pi}^\pi x(t) \sin(nt)\, dt, \quad n \ge 1 are called the Fourier coefficients of xx. Let’s explore how good such representations are. Let’s study the partial sums of the Fourier series for xx, denoted by SN[x(t)]=a02+∑n=1N [ancos⁡(nt)+bnsin⁡(nt)],N≥0.S_N[x(t)] = \frac{a_0}{2} + \sum_{n=1}^N \, [a_n \cos(nt) + b_n \sin(nt)], \quad N \ge 0.. Calculate (analytically) the Fourier coefficients for the following three functions defined for −π≤t≤π-\pi\le t\le \pi. (a) x(t)={−1,t<00,t=0+1,t>0x(t)=\left\{\begin{array}{ll}-1,&t<0\\0,&t=0\\+1,&t>0\end{array} \right.; (b) x(t)={t/π+1,t<01,t=01−t/π,t>0x(t)=\left\{\begin{array}{ll}t/\pi+1,&t<0\\1,&t=0\\1-t/\pi,&t>0\end{array} \right.; (c)x(t)=(t/π−1)2(t/π+1)2x(t)=(t/\pi-1)^2(t/\pi+1)^2. Plot the first ten partial sums of the Fourier series for all of these functions to observe how the sums converge. Use one figure per function (that is, plot the ten sums on the same figure). Note that the Fourier coefficients decrease the slowest for the function that is discontinuous, (a), and the fastest for the function that is smooth, (c).
  2. Consider the following Langevin differential equation that we discussed in class: dxdt=−kx+cη\frac{dx}{dt}=-kx+c\eta, where η\eta is a Wiener process, that is, it is a Gaussian variable with ⟨η⟩=0\langle\eta\rangle=0, ⟨η(t)η(t′)⟩=δ(t−t′)\langle\eta(t)\eta(t')\rangle=\delta(t-t').
    • Write simple program that would solve this equation using Euler stepping. That is, following our discussion in one of the previous homeworks, for a given kk, cc and the temporal step size Δt\Delta t, we can define xn≡x(nΔt)x_n\equiv x(n\Delta t), and then xn+1−xnΔt=−kxn+cΔtν\frac{x_{n+1}-x_{n}}{\Delta t}= -kx_n+\frac{c}{\sqrt{\Delta t}}\nu, where ν\nu is a Gaussian random variable with zero mean and unit variance. This then gives xn+1=xn−kxnΔt+cΔtνx_{n+1}=x_{n} -kx_n\Delta t+c\sqrt{\Delta t}\nu, which can be turned into a simple for-loop code for simulating a sequence of x’s.
    • Simulate N=1e5N=1e5 steps of this dynamics of xx. Plot xx. Describe what you see.
    • Take a Fourier transform of this xx using the Matlab build-in fftfft function.
    • Plot (in log-log scale) the power spectrum (that is ∣xω∣2≡xωx−ω\left|x_\omega\right|^2\equiv x_\omega x_{-\omega}.
    • Using the expressions we derived in class, show that the power spectrum for this xx should look like ⟨xωx−ω⟩=c2k2+ω2\langle x_\omega x_{-\omega}\rangle=\frac{c^2}{k^2+\omega^2}. Compare this to your plot. Do they look similar? Think about why or why not. (Hint — they will be similar for about half of your plot).
  3. Another common signaling element in cells is the so called Incoherent Feedforward Loop: xx is a signal, which activates the response rrand the intermediate memory node mm. The intermediate node then suppressed the output: drdt=−krrr+krss−krmmdmdt=−kmmm+kmss\begin{array}{l}\frac{dr}{dt}=-k_{rr}r+k_{rs}s-k_{rm}m\\\frac{dm}{dt}=-k_{mm}m+k_{ms}s\end{array}. Repeat the procedures we’ve done in class to calculate the frequency dependent gain gωg_\omega for this system. Plot the curve for kmm≪krrk_{mm}\ll k_{rr} and kmm≫krrk_{mm}\gg k_{rr}. Explain the differences. Graduate students: Incorporate Langevin noise into the system and calculate the SNR for it.