Off[General::spell];
\(\(\(Off[General::spell1]; 
    Clear["Global`*"]\)\(
\)\(
\)\( (*Matthieu\ equation*) \)\(
\)\(
\)
    \) (*\ 
      Integrating\ the\ differential\ equation\ *) \)
acgoal = 12;
precgoal = 15;
epsi = 0; om = 1; per = 2*Pi/om;
\(	\(nper = 65;\)\)
tmax = nper*per;
\(	\(aa = 
        NDSolve[{\(x'\)[t] == 
              p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*x[t], 
            x[0] == 1/100, p[0] == 1/100}, {x, p}, 
	{t, 0, 
            tmax}, MaxSteps -> 10000, 
	AccuracyGoal -> acgoal, 
          PrecisionGoal -> precgoal];\)\)
pl1 = 
        ParametricPlot[{(x[t] /. aa)[[1]], (p[t] /. 
                  aa)[[1]]}, {t, 0, tmax}, PlotPoints -> 2000, 
          AxesLabel -> {x, p}, PlotRange -> All];
\(	ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([1]\)], \((p[ll*per] /. 
                aa)\)[\([1]\)]}, 
			{ll, 1, nper}]]\)

\(\(\(	\)\(ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([1]\)], \((p[ll*per] /. 
                aa)\)[\([1]\)]}, 
			{ll, 1, nper}], 
      PlotRange -> {{\(-0.012\), 0.012}, {\(-0.012\), 
            0.012}}]\)\)\)

\(\(\(	\)\(
\)\(\(de = 
        10^\((\(-8\))\);\)

    ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([\)\(1\)\(]\)], \((p[ll*per] /. 
                aa)\)[\([\)\(1\)\(]\)]}, 
			{ll, 1, nper}], 
      PlotRange -> {{0.01 - de, 0.01 + de}, {0.01 - de, 0.01 + de}}, 
      PlotStyle -> PointSize[0.02]]\)\)\)

\(\(\( (*\ 
      Integrating\ the\ differential\ equation\ *) \)\(
\)\(\(acgoal = 14;\)

    \(precgoal = 15;\)

    epsi = 0; om = 1; per = 2*Pi/om;

    	\(nper = 65;\)

    \(tmax = nper*per;\)

    	\(aa = 
        NDSolve[{\(x'\)[t] == 
              p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*x[t], 
            x[0] == 1/100, p[0] == 1/100}, {x, p}, 
	{t, 0, 
            tmax}, MaxSteps -> 10000, 
	AccuracyGoal -> acgoal, 
          PrecisionGoal -> precgoal];\)

    \(pl1 = 
        ParametricPlot[{\((x[t] /. aa)\)[\([1]\)], \((p[t] /. 
                  aa)\)[\([1]\)]}, {t, 0, tmax}, PlotPoints -> 2000, 
          AxesLabel -> {x, p}, PlotRange -> All];\)

    \(de = 10^\((\(-8\))\);\)

    ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([\)\(1\)\(]\)], \((p[ll*per] /. 
                aa)\)[\([\)\(1\)\(]\)]}, 
			{ll, 1, nper}], 
      PlotRange -> {{0.01 - de, 0.01 + de}, {0.01 - de, 0.01 + de}}, 
      PlotStyle -> PointSize[0.02]]

    \)\)\)

\(\(\( (*\ 
      Integrating\ the\ differential\ equation\ *) \)\(
\)\(\(acgoal = 
        12;\)

    \(precgoal = 15;\)

    epsi = 0; om = 10; per = 2*Pi/om;


    	\(nper = 65;\)

    \(tmax = nper*per;\)

    	\(aa = 
        NDSolve[{\(x'\)[t] == 
              p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*x[t], 
            x[0] == 1/100, p[0] == 1/100}, {x, p}, 
	{t, 0, 
            tmax}, MaxSteps -> 10000, 
	AccuracyGoal -> acgoal, 
          PrecisionGoal -> precgoal];\)

    \(pl1 = 
        ParametricPlot[{\((x[t] /. aa)\)[\([1]\)], \((p[t] /. 
                  aa)\)[\([1]\)]}, {t, 0, tmax}, PlotPoints -> 2000, 
          AxesLabel -> {x, p}, PlotRange -> All];\)

    	ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([1]\)], \((p[ll*per] /. 
                aa)\)[\([1]\)]}, 
			{ll, 1, nper}]]

    \)\)\)

\(\(\( (*\ 
      Integrating\ the\ differential\ equation\ *) \)\(
\)\(\(acgoal = 
        12;\)

    \(precgoal = 15;\)

    epsi = 0.1; om = 2; per = 2*Pi/om;


    	\(nper = 65;\)

    \(tmax = nper*per;\)

    	\(aa = 
        NDSolve[{\(x'\)[t] == 
              p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*x[t], 
            x[0] == 1/100, p[0] == 1/100}, {x, p}, 
	{t, 0, 
            tmax}, MaxSteps -> 10000, 
	AccuracyGoal -> acgoal, 
          PrecisionGoal -> precgoal];\)

    \(pl1 = 
        ParametricPlot[{\((x[t] /. aa)\)[\([1]\)], \((p[t] /. 
                  aa)\)[\([1]\)]}, {t, 0, tmax}, PlotPoints -> 2000, 
          AxesLabel -> {x, p}, PlotRange -> All];\)

    	ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([1]\)], \((p[ll*per] /. 
                aa)\)[\([1]\)]}, 
			{ll, 1, nper}], 
      PlotStyle -> PointSize[0.02]]

    \)\)\)

\(\(\( (*\ 
      Integrating\ the\ differential\ equation\ *) \)\(
\)\(\(acgoal = 
        12;\)

    \(precgoal = 15;\)

    epsi = 0.1; om = 2.5; per = 2*Pi/om;


    	\(nper = 65;\)

    \(tmax = nper*per;\)

    	\(aa = 
        NDSolve[{\(x'\)[t] == 
              p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*x[t], 
            x[0] == 1/100, p[0] == 1/100}, {x, p}, 
	{t, 0, 
            tmax}, MaxSteps -> 10000, 
	AccuracyGoal -> acgoal, 
          PrecisionGoal -> precgoal];\)

    \(pl1 = 
        ParametricPlot[{\((x[t] /. aa)\)[\([1]\)], \((p[t] /. 
                  aa)\)[\([1]\)]}, {t, 0, tmax}, PlotPoints -> 2000, 
          AxesLabel -> {x, p}, PlotRange -> All];\)

    	ListPlot[
      Table[{\((x[ll*per] /. aa)\)[\([1]\)], \((p[ll*per] /. 
                aa)\)[\([1]\)]}, 
			{ll, 1, nper}], 
      PlotStyle -> PointSize[0.02]]

    \)\)\)