Question 4 - Blow-up Example
We investigate the blow-up behaviour of the following ODE:
Contents
4(a) - Direction field
We first plot the direction field of the ODE over and
:
dirfield(@blowupex, -1, 1, -2, 2);

4(b) - Simulation over various time periods
We first simulate the ODE over the time period (which stops before the blowup will occur)
[t,x] = ode23(@blowupex, [0, 0.99], 1); figure; plot(t, x); xlabel('t'); ylabel('x');

We now simulate the ODE over the time period
[t,x] = ode23(@blowupex, [0, 1], 1); figure; plot(t, x); xlabel('t'); ylabel('x');

We now simulate the ODE over the time period (which hits the blowup behaviour), we note that an error occurs when trying to solve
[t,x] = ode23(@blowupex, [0, 2], 1); figure; plot(t, x); xlabel('t'); ylabel('x');
Warning: Failure at t=1.001616e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (3.552714e-15) at time t.
