equal
deleted
inserted
replaced
349 \begin{lstlisting} |
349 \begin{lstlisting} |
350 >>> from scipy import interpolate |
350 >>> from scipy import interpolate |
351 >>> interpolate.interp1d? |
351 >>> interpolate.interp1d? |
352 >>> x = np.arange(0,2*np.pi,np.pi/4) |
352 >>> x = np.arange(0,2*np.pi,np.pi/4) |
353 >>> y = np.sin(x) |
353 >>> y = np.sin(x) |
354 >>> fl = interpolate.interp1d(x,y,kind='linear') |
354 >>> fl = interpolate.interp1d( |
355 >>> fc = interpolate.interp1d(x,y,kind='cubic') |
355 x,y,kind='linear') |
|
356 >>> fc = interpolate.interp1d( |
|
357 x,y,kind='cubic') |
356 >>> fl(np.pi/3) |
358 >>> fl(np.pi/3) |
357 >>> fc(np.pi/3) |
359 >>> fc(np.pi/3) |
358 \end{lstlisting} |
360 \end{lstlisting} |
359 \end{frame} |
361 \end{frame} |
360 |
362 |
411 \frametitle{Problems} |
413 \frametitle{Problems} |
412 The Van der Pol oscillator is a type of nonconservative oscillator with nonlinear damping. It evolves in time according to the second order differential equation: |
414 The Van der Pol oscillator is a type of nonconservative oscillator with nonlinear damping. It evolves in time according to the second order differential equation: |
413 \begin{equation*} |
415 \begin{equation*} |
414 \frac{d^2x}{dt^2}+\mu(x^2-1)\frac{dx}{dt}+x= 0 |
416 \frac{d^2x}{dt^2}+\mu(x^2-1)\frac{dx}{dt}+x= 0 |
415 \end{equation*} |
417 \end{equation*} |
416 \inctime{25} |
418 Make a plot of $\frac{dx}{dt}$ vs. $x$. |
|
419 \inctime{30} |
417 \end{frame} |
420 \end{frame} |
418 |
421 |
419 |
422 |
420 \end{document} |
423 \end{document} |
421 |
424 |