MTH 480 LAB 5

In this lab you will explore the connection between scalar functions on plane and planar systems of ODEs. (Check the end of this lab sheet for some universal truths :-)

Turning your work is not mandatory. However, use these exercises to practice on various examples.

Instructions follow below. Please note approximate timing of the steps and demonstrations.
Set-up phase: (14:00-14:05)
  1. Log in to the computer using your ONID account and start MATLAB. You can also start pplane. (But, beware: see demonstration).

Plotting contours and surfaces in MATLAB: DEMONSTRATION 14:05-14:15
  1. how to plot contour plots and surface plots
    % preparing the grid
    xy = linspace(-2,2);[XX,YY]=meshgrid(xy,xy);
    E = @(x,y)(x.^2+y.^2);
    surfc(XX,YY,E(XX,YY));
    contour(XX,YY,E(XX,YY));

    Now we derive the gradient system of ODEs corresponding to E(x,y). Use pplane to confirm the connection between the contours of E(x,y) and trajectories of the system.


  2. Repeat this exercise for the functions below
    1. E(x,y) = -x.*sin(y)
    2. E(x,y) = exp(x).*sin(y)
    3. E(x,y) = x.^2 - y.^2

    For each of these functions, count A) the number of equilibria and B) the number of closed orbits. What is A) ? B) ?



  3. Now consider conservative systems. For each, find the conserved quantity E(x,y) or, if it is given, confirm that it is indeed conserved. Plot the contours of the conserved quantity and the phase plot of the ODE.
    Count the number C) of attractors. What should it be ?
    1. Harmonic oscillator known from class x''+x=0 has E(x,y)=x^2+y^2
    2. Nonlinear oscillator (pendulum) x''+sin(x)=0 has E(x,y)=
    3. Double well oscillator: x''=x-x^3 has E(x,y)=
    4. Contradiction to theory ? x' = x*y, y'= -x.^2 has E(x,y)=x.^2+y.^2


  4. (Outside class material) Explore Liapunov systems
    1. Harmonic oscillator with damping known from class x''+bx'+x=0 has E(x,y)=x^2+y^2 as its Liapunov function.

      Plot contours of the Liapunov function and calculate using an ODE solver from LAB4 solutions to the problem. Plot trajectory next to the contours.

    2. Do the above for x''+(x')^3+x=0
    3. Ditto for x'=y-x^3,y'=-x-y^3

  5. Explore cycles and earn extra credit: find the conserved quantity, plot its contours. Confirm the qualitative behavior by looking at the trajectories
    1. Lotka-Volterra (PREDATOR-PREY) x'=x*(1-y),y'=y*(x-1)
    2. Epidemics model x'=x*y, y'=-x^2
  6. Extra credit on a system proposed by JVW. x'=x^2-y^(16), y'=x^8-y. Can you find a different system of similar dynamics ? (There are some unstable equilibria which are limits of all solutions from a small neighborhood).

    "CONNECT THE DOTS"

    TYPE A) B) C)
    GRADIENT SYSTEMS
    CONSERVATIVE SYSTEMS
    LIAPUNOV SYSTEMS
    HAMILTONIAN SYSTEMS


    To get my attention, please raise your hand.