Off[General::spell];
Off[General::spell1]; Clear["Global`*"]

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

    \(precgoal = 15;\)

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


    	\(nper = 100;\)

    \(tmax = nper*per;\)

    	\(aa = 
        NDSolve[{\(x'\)[t] == 
              p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*Sin[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; om = 2; per = 2*Pi/om;


    	\(nper = 5;\)

    \(tmax = nper*per;\)

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

NIntegrate[(2*(-1/2 + Cos[x]))^(-1/2), {x, 0, 
        Pi/3}]

om = 
      2*Pi/(4*
              Abs[NIntegrate[(2*(-1/2 + Cos[x]))^(-1/
                        2), {x, 0, Pi/3}]]); acgoal = 12;
precgoal = 15;
epsi = 0.8; per = 2*Pi/om;

\(	\(nper = 110;\)\)
tmax = nper*per;
\(	aa = 
      NDSolve[{\(x'\)[t] == 
            p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*Sin[x[t]], 
          x[0] == 0, p[0] == 1}, {x, p}, 
	{t, 0, tmax}, 
        MaxSteps -> 100000, 
	AccuracyGoal -> acgoal, 
        PrecisionGoal -> precgoal]; 
    pl1 = ParametricPlot[{\(-Pi\) + 
            Mod[Pi + \((x[t] /. aa)\)[\([1]\)], 
              2*Pi], \((p[t] /. aa)\)[\([1]\)]}, {t, 0, tmax}, 
        PlotPoints -> 2000, AxesLabel -> {x, p}, PlotRange -> All];\)
\(	ListPlot[
      Table[{\(-Pi\) + 
            Mod[Pi + \((x[ll*per] /. aa)\)[\([1]\)], 
              2*Pi], \((p[ll*per] /. aa)\)[\([1]\)]}, 
			{ll, 1, nper}], 
      PlotStyle -> PointSize[0.02]]\)

.

om = 
      2*Pi/(4*
              Abs[NIntegrate[(2*(-1/2 + Cos[x]))^(-1/
                        2), {x, 0, Pi/3}]]); acgoal = 12;
precgoal = 15;
\(epsi = 0.6; per = 2*Pi/om;
\)
\(	\(nper = 30;\)\)
tmax = nper*per;
\(	aa = 
      NDSolve[{\(x'\)[t] == 
            p[t], \(p'\)[t] == \(-\((1 + epsi*Cos[om*t])\)\)*Sin[x[t]], 
          x[0] == 0, p[0] == 1}, {x, p}, 
	{t, 0, tmax}, 
        MaxSteps -> 100000, 
	AccuracyGoal -> acgoal, 
        PrecisionGoal -> precgoal]; 
    pl1 = ParametricPlot[{\(-Pi\) + 
            Mod[Pi + \((x[t] /. aa)\)[\([1]\)], 
              2*Pi], \((p[t] /. aa)\)[\([1]\)]}, {t, 0, tmax}, 
        PlotPoints -> 2000, PlotRange -> All];\)
\(	ListPlot[
      Table[{\(-Pi\) + 
            Mod[Pi + \((x[ll*per] /. aa)\)[\([1]\)], 
              2*Pi], \((p[ll*per] /. aa)\)[\([1]\)]}, 
			{ll, 1, nper}], 
      PlotStyle -> PointSize[0.02]]\)

popad = 
      Show[pl1, Frame -> True, 
        TextStyle -> {FontSize -> 
              14}, 
FrameLabel -> {"X", "P", "\
X0=0,P0=1", "EPSI=0.6"}, 
        PlotRange -> {{-1.7, 1.7}, {-1.2, 1.7}}]

SetDirectory["c:/courses/compu/notebooks"];

Display["plot.eps", popad, "EPS", 
        ImageSize -> 
          500, 
ImageOffset -> {0, 0}];