Question: Problem to solve an ODE (probably a singularity)

Hello, 

I am trying to plot 2 equations divided in 3 intervals (tini..tr, tr..te, te..tfin1), but when i try to solve the first equation it appears:

"Warning, cannot evaluate the solution further left of .66099564e18, probably a singularity"

Is it possible avoid this point?

About the second equation, when i try to solve between "te and tr" the program says that the argument is invalid.

Can someone help me?

Here is the program:

restart;

Digits := 20;

M := 0.122e20*0.152e25;
kappa := evalf(sqrt(8*Pi/M^2));
rrhoCC := 0.769e-41*(0.1e-28*0.561e24)*0.152e25^4;

rrhoM0 := 0.1e51;
rrhoR0 := 0;
rrhoM := proc (t) options operator, arrow; rrhoM0/a(t)^3 end proc;
rrhoR := proc (t) options operator, arrow; rrhoR0/a(t)^4 end proc;
pM := proc (t) options operator, arrow; 0 end proc;
eq1 := diff(a(t), t) = a(t)*kappa*sqrt(rrhoM(t)+rrhoCC)/sqrt(3);
eq2 := 2*(diff(a(t), t, t)) = -(1/3)*kappa^2*(rrhoM(t)+3*pM(t)-2*rrhoCC)*a(t);
tini := 0.1e19;
sys1 := {eq1, a(tini) = 1.0};
sys2 := {eq2, a(tini) = 1.0, (D(a))(tini) = 0.284e-17};
with(DEtools);
with(plots);
tfin1 := 0;
te := 10^(-32);
tr := 10^12;
singularities(eq1, a(t));
singularities(eq2, a(t));
p1a := dsolve(sys1, type = numeric, abserr = 10^(-15), relerr = 10^(-15), range = tini .. tr);
p1b := dsolve(sys1, type = numeric, abserr = 10^(-10), relerr = 10^(-10), range = tr .. te);
p1c := dsolve(sys1, type = numeric, abserr = 10^(-10), relerr = 10^(-10), range = te .. tfin1);
fig1a := odeplot(p1a, [t, a(t)]);
fig1b := odeplot(p1b, [t, a(t)]);
fig1c := odeplot(p1c, [t, a(t)], color = red);
display(fig1a, fig1b, fig1c);
p2a := dsolve(sys2, type = numeric, abserr = 1.*10^(-12), relerr = 1.*10^(-12), range = tfin1 .. te);
p2b := dsolve(sys2, type = numeric, abserr = 1.*10^(-12), relerr = 1.*10^(-12), te .. tr);
p2c := dsolve(sys2, type = numeric, abserr = 1.*10^(-12), relerr = 1.*10^(-12), range = tr .. tini);
fig2a := odeplot(p2a, [t, a(t)], color = green);
fig2b := odeplot(p2b, [t, a(t)], color = green);
fig2c := odeplot(p2c, [t, a(t)], color = green);
display(fig2a, fig2b, fig2c);
display(fig1a,fig2a,fig1b,fig2b,fig1c,fig2c);

 

 

 

Please Wait...