How to rectify the error occurred in solving differential equation? Such as Indeterminate expression 0.` Complex Infinity encountered and also want to use rangakutta method to solve this issue?
g1 = 1;
g = 1;
K1 = .5;
\[Omega]1 = .5; \[Alpha] = \[Pi]/3; T = 1; x0 = 1;
sol1x1xx =
NDSolve[{x1'[t] ==
g1*Sqrt[10 x1[t]] Sin[
x2[t]] (-0.5*Abs[x4[t]]^2*Cos[\[Alpha]] +
0.5*Conjugate[x3[t]]*x4[t]*Sin[\[Alpha]] +
0.5*Abs[x3[t]]^2*Cos[\[Alpha]] +
0.5*Conjugate[x4[t]]*x3[t]*Sin[\[Alpha]]) -
K1 Sin[x2[t]]*
Sum[Sin[(1000 + 0.5)*(t - n)]/((2 Pi) Sin[(t - n x0)/2]), {n,
1, 10}],
x2'[t] == (-g1/Sqrt[0.4*x1[t]]) Cos[
x2[t]] (-0.5*Abs[x4[t]]^2*Cos[\[Alpha]] +
0.5*Conjugate[x3[t]]*x4[t]*Sin[\[Alpha]] +
0.5*Abs[x3[t]]^2*Cos[\[Alpha]] +
0.5*Conjugate[x4[t]]*x3[t]*Sin[\[Alpha]]) + x1[t],
x3'[t] == ((-I*(x3[
t] (0.5 \[Omega]1 +
0.5 g Sqrt[10 x1[t]] Cos[x2[t]]*Cos[\[Alpha]]) +
0.5 x4[t] g Sqrt[10 x1[t]] Cos[x2[t]]*Sin[\[Alpha]]))/
Sqrt[(Abs[x3[t]]^2 + Abs[x4[t]]^2)]),
x4'[t] == ((-I*(x4[
t] (-0.5 \[Omega]1 -
0.5 g Sqrt[10 x1[t]] Cos[x2[t]]*Cos[\[Alpha]]) +
0.5 x3[t] g Sqrt[10 x1[t]] Cos[x2[t]]*Sin[\[Alpha]]))/
Sqrt[(Abs[x3[t]]^2 + Abs[x4[t]]^2)]), x1[0] == N[\[Pi]/20],
x2[0] == 0, x3[0] == 0, x4[0] == 1}, {x1, x2, x3, x4}, {t, 0,
2 Pi}, Method -> "ExplicitEuler", StartingStepSize -> 0.0002,
MaxSteps -> 10^6];
Plot[Evaluate[Abs[{x1[t], x2[t], x3[t], x4[t]}] /. sol1x1xx[[1]]], {t,
0.1, 2 Pi}, PlotLegends -> {x1, x2, x3, x4}, PlotRange -> All,
PlotLabel -> Row[{"K1 = ", K1, "g1 = ", g1}], AxesLabel -> Automatic,
PlotRange -> All]