# Problem with NDSolve in Mathematica 9 / 10

I'm having trouble by solving the following differential equation in Mathematica 9 and 10, where the code works fine in version 7:

τp = 200*10^(-15);
e = 1.60217653*10^(-19);
me = 9.1093826*10^(-31);
c = 2.99792458*10^(8);
ϵ = 8.854187817*10^(-12);
h = 6.626*10^(-34);
hbar = h/(2 Pi);
λ = 786*10^(-9);
n0 = 1.45;
mred = 0.635*me ;
Eg = 7.5*e;
τr = 220*10^(-15);
ω = (2 Pi c)/λ;
k0 = (n0 ω/c);
rhocrit = (ϵ*mred*ω^2/(e^2));
H = 2*10^(4);
I0 = H*(2 Sqrt[Log])/(τp Sqrt[Pi]);
Int1[t_] := I0*Exp[-4 Log (t^2/τp^2)];
γ[Int_] := (ω/e)*Sqrt[(mred c n0 ϵ Eg)/(2 Int)];
Γ[Int_] := γ[Int]^2/(1 + γ[Int]^2);
ζ[Int_] := 1/(1 + γ[Int]^2);
β[Int_] := Pi^2/(2 EllipticK[ζ[Int]]*EllipticE[ζ[Int]]);
x[Int_] := (2 Eg)/(Pi hbar ω Sqrt[Γ[Int]])*EllipticE[ζ[Int]];
μ[Int_] := IntegerPart[x[Int] + 1] - x[Int];
Q[Int_] :=
Sqrt[(Pi)/(2 EllipticK[ζ[Int]])]
Sum[
Exp[-s Pi ((EllipticK[Γ[Int]] - EllipticE[Γ[Int]]) /
(EllipticE[ζ[Int]]))] DawsonF[Sqrt[β[Int] (s + 2 μ[Int])]],
{s, 0, 5}];
WPI[Int_] :=
If[10^(3) > Int,
0,
(2 ω)/(9 Pi) *((ω mred )/(hbar Sqrt[Γ[Int]]))^(3/2)*Q[Int]*
Exp[-Pi ((EllipticK[Γ[Int]] - EllipticE[Γ[Int]])/
(EllipticE[ζ[Int]]))*IntegerPart[x[Int] + 1]]];
Ekrit[t_] := Eg (1 + 1/(4 γ[Int1[t]]^2));
Ekin[t_] := Ekrit[t]/10;

s1 =
NDSolve[{sol1'[t] == WPI[Int1[t]] +
(((k0 ω ((16 Pi ϵ^2 Sqrt[mred Ekin[t]^3]) /
(Sqrt*e^4*sol1[t])))/
(n0^2 rhocrit
(1 + ω^2*(((16 Pi ϵ^2 Sqrt[mred Ekin[t]^3]) /
(Sqrt*e^4*sol1[t]))^2)))) sol1[t] Int1[t])/
(Eg) - sol1[t]/τr, sol1[-3 τp] == 1},
sol1, {t, -3.1 τp, 4 τp}];


In version 7 there are no error messages and with:

LogPlot[Evaluate[sol1[t] /. s1], {t, -2 τp, 2τp}]


I get the expected result: But when I use one of the newer versions, the kernel shuts down without giving an output. Anyone got an idea how to solve this problem?

• Could you please format the code of your question such that it can be copied to Mathematica? – user21 Aug 11 '14 at 7:55
• I'm sorry, this is my first question in here and I had a bit trouble formatting the code, but now it should work ;) – Peter Aug 11 '14 at 8:05
• @Peter can you share the original equation? – m0nhawk Aug 11 '14 at 8:31
• @m0nhawk thanks for your editing suggestions! what do you mean with original equation? – Peter Aug 11 '14 at 8:42
• If it shuts down, then I'd report this to the support. Looks like a bug. – user21 Aug 11 '14 at 9:18