Home
Detonation
Fluid Mechanics
Traffic Flow
Teaching
The rest

# Teaching

• 18.303 - Linear PDE
• 18.085 - CSE
• 18.06 - Linear Algebra
• 18.03 - ODE

# Recitation schedule

Section R06:   TR 12-1, 2-147
Section R09:   TR 1-2, 2-147

# Office hours, Room 2-339

W 1-2, R 2:30-3:30

harvest.m
The code illustrates the use of the simple Euler and RK4 methods to solve the harvesting equation y'=y(1-y)-c, where y(t) is the population density and c is the constant harvesting rate. Download the code and run it in Matlab by typing harvest(tend,npts,c), where tend is the time up to which you want to integrate the equation starting from t=0, npts is the number of points you want to use on the integration interval [0, tend] and c is the constant in the equation. The equation will be integrated with 20 different initial conditions. Note that different types of solution are found depending on c: if c<1/4, then there are two equilibrium positions, stable at y(1)=0.5[1+sqrt(1-4c)] and unstable at y(2)=0.5[1-sqrt(1-4c)]. If c=1/4, then the two critical points become one and if c>1/4, there is no equilibrium solution.
Solution by Euler and RK4 using npts=50 on t=[0 30], c=0.15:

One of previous solutions together with the accurate solution found by Matlab's built-in ode45 solver:

Solution by Euler and RK4 using npts=5 on t=[0 5], c=0.15 together with the accurate solution, c=0.15:

RLCfourier.m. Plots the solution of the damped and forced oscillator equation that describes the RLC circuit with the voltage source f(t) that alternates between 2 and 0 every time interval of about 355/113=3.14159292.

The videos below may not play well on your computer. If that is the case, just run the above Matlab script to generate your very own movies.
Solution at lambda=0.01 and variable omega (mpg, 4.1Mb)
Solution at lambda=0.1 and variable omega (mpg, 5Mb)
Solution at lambda=1 and variable omega (mpg, 1.8Mb)

3beads.pdf. Solution of the problem of three beads oscillating on a ring.

Short Matlab tutorial.
Matlab at MIT.
"Matlab Guide" by D. Higham and N. Higham is a great book to have.