###
Example: a catalytic oscillator

For this example the following system (a catalytic oscillator) is used

|  |  | (60)

where and the parameters are introduced in that order in the odefile `cataloscill` in the MATCONT directory `Testruns/TestSystems.`

The starting vector `x0` and its tangent vector `v0` are calculated from the following equilibrium curve continuation ( is free).

    p=[2.5;2.204678;10;0.0675;1;0.1;0.4];
    ap1=[2];
    [x0,v0]=init_EP_EP(@cataloscill,[0.001137;0.891483;0.062345],p,ap1);
    opt=contset;
    opt=contset(opt,'MaxStepSize',0.025);
    opt=contset(opt,'MaxNumPoints',78);
    opt=contset(opt,'Singularities',1);
    [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
    cpl(x,v,s,[4,1]);

This set of commands is run by executing the file `testequilcataloscill` in the MATCONT directory `Testruns.` The command line output is the following:

    >> testequilcataloscill
    first point found
    tangent vector to first point found
    label = H , x = ( 0.016357 0.523973 0.328336 1.051558 )
    First Lyapunov coefficient = 1.070259e+01
    label = LP, x = ( 0.024717 0.450257 0.375018 1.042049 )
    a=-1.166509e-01
    label = LP, x = ( 0.054030 0.302241 0.459807 1.052200 )
    a=1.346534e-01
    label = H , x = ( 0.077929 0.233063 0.492149 1.040991 )
    First Lyapunov coefficient = 4.332247e+00

    elapsed time  = 1.2 secs
    npoints curve = 78

The results are plotted using the plot function `cpl` where the fourth argument selects the fourth and first components of the solution which are the parameter and the coordinate . The results can be seen in Figure 16

Figure 16: Computed equilibrium curve in the catalytic oscillar system (60)

where the axes labels are added manually.

We now add a forward and a backward fold continuation from the first LP detected on the previous equilibrium curve; and are free in both runs.

    p=[2.5;2.204678;10;0.0675;1;0.1;0.4];
    ap1=[2];
    [x0,v0]=init_EP_EP(@cataloscill,[0.001137;0.891483;0.062345],p,ap1);
    opt=contset;
    opt=contset(opt,'MaxStepSize',0.025);
    opt=contset(opt,'MaxNumPoints',78);
    opt=contset(opt,'Singularities',1);
    [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
    cpl(x,v,s,[4,1]);
    'press any key'
    pause
    x1=x(1:3,s(3).index);
    p(ap1)=x(end,s(3).index);
    [x0,v0]=init_LP_LP(@cataloscill,x1,p,[2,7]);
    [x2,v2,s2,h2,f2]=cont(@limitpoint,x0,v0,opt);
    hold on;
    cpl(x2,v2,s2,[4,1]);
    'press any key'
    pause
    opt=contset(opt,'Backward',1);
    [x3,v3,s3,h3,f3]=cont(@limitpoint,x0,v0,opt);
    hold on
    cpl(x3,v3,s3,[4,1]);

This set of commands is run by executing the file `testLPcataloscill` in the MATCONT directory `Testruns.` The command line output is the following:

    >> testLPcataloscill
    first point found
    tangent vector to first point found
    label = H , x = ( 0.016357 0.523973 0.328336 1.051558 )
    First Lyapunov coefficient = 1.070259e+01
    label = LP, x = ( 0.024717 0.450257 0.375018 1.042049 )
    a=-1.166509e-01
    label = LP, x = ( 0.054030 0.302241 0.459807 1.052200 )
    a=1.346534e-01
    label = H , x = ( 0.077929 0.233063 0.492149 1.040991 )
    First Lyapunov coefficient = 4.332247e+00

    elapsed time  = 0.4 secs
    npoints curve = 78

    ans =

        'press any key'

    first point found
    tangent vector to first point found
    label = CP , x = ( 0.035941 0.352004 0.451371 1.006408 0.355991 )
    c=3.627908e-01
    label = BT , x = ( 0.115909 0.315467 0.288437 1.417627 0.971397 )
    (a,b)=(8.378438e-02, 2.136279e+00)

    elapsed time  = 0.9 secs
    npoints curve = 78

    ans =

        'press any key'

    first point found
    tangent vector to first point found
    label = BT , x = ( 0.016337 0.638410 0.200456 1.161199 0.722340 )
    (a,b)=(-4.822577e-02, -1.937637e+00)

    elapsed time  = 0.5 secs
    npoints curve = 78

The results are plotted in Figure 17, where, as usual, the axis labels are added manually.

Figure 17: Computed equilibrium and fold curves in the catalytic oscillator system (60)