Τhe following code
Ay[ξ_] := A0*(1 - κ^2)^.5*Exp[-(δ ξ - φ)^2/2] Sin[ξ]
Az[ξ_] := A0*κ*Exp[-(δ ξ - φ)^2/2] Cos[ξ]
Ay1[ξ_] := D[Ay[ξ], ξ]
Az1[ξ_] := D[Az[ξ], ξ]
j1 = DSolve[{y''[ξ] + r^2 y[ξ] == r/Δ (α2 - Az[ξ]) - 1/Δ Ay1[ξ],
z''[ξ] + r^2 z[ξ] == -1/Δ Az1[ξ] - r (α1 - Ay[ξ]), y[0] == yo,
y'[0] == Pyo/Δ, z[0] == zo, z'[0] == Pzo/Δ}, {y, z}, ξ]
Py[ξ_] := D[y[ξ] /. j1, ξ]
Pz[ξ_] := D[z[ξ] /. j1, ξ]
P1[ξ_] := Py[ξ]^2 + Pz[ξ]^2
A0 = 7; δ = 1/15; r = 1; φ = 5; κ = 1/Sqrt[2]; α1 = 0; α2 = 0; Δ = 1;
yo = 0; zo = 0; Pyo = 0; Pzo = 0;
j2 = NDSolve[{x'[ξ] == P1[ξ], x[0] == 0}, x[ξ], {ξ, 0, 1.6*2 π/δ}]
produces the message
NDSolve::ndfdmc: Computed derivatives do not have dimensionality consistent with the initial conditions. >>
How can I fix this so that I can plot x[ξ]?
Plot[x[ξ] /. j2, {ξ, 0, 1.6*2*π/δ},
PlotStyle -> Automatic, PlotRange -> All, AxesOrigin -> {0, 0}]
