1
|
3719 Views
|
|
1 Total Likes
View groups...
Share
GROUPS:

# Mathematica 10.0 is 11 times slower than Mathematica 9.0?

Posted 9 years ago
 Here is the transcript of two sessions: one in Mathematica 9.0 and the other in 10.0: \$ math9 Mathematica 9.0 for Linux x86 (64-bit) Copyright 1988-2013 Wolfram Research, Inc. In:= <x[t],p->p[t]}), p'[t] == -(D[H[x,p,t],x]/.{x->x[t],p->p[t]}), x == x0, p == p0}; (* Try to solve the Cauchy problem for this system *) sol = DSolve[eqn, {x,p}, t]; (* Verify the solution at a random moment of time *) tmp1 = eqn /. sol /. {t->RandomReal[]}//Simplify; If[tmp1 != {{True,True,True,True}}, Return[Print["kesolve: DSolve verification: FAILED"]]]; Clear[tmp1]; (* Express 'initial values' x0,p0 in terms of 'final' values x(t),p(t): x0=x0(x,p,t) and p0=p0(x,p,t) *) init = Solve[{tmp1 == x[t]/.sol[], tmp2 == p[t]/.sol[]}, {x0,p0}] /. {tmp1->x,tmp2->p} //Simplify; (* Construct a candidate for the final solution of the Cauchy problem *) tmp1 = F0[x0/.init[], p0/.init[]]; (* Verify this candidate before returning it *) tmp2 = D[tmp1,t] + D[H[x,p,t],p]*D[tmp1,x] - D[H[x,p,t],x]*D[tmp1,p]//Simplify; If[tmp2 =!= 0, Return[Print["kesolve: final solution verification: FAILED"]]]; tmp1 ]  As you see, the result is calculated about 11 times faster in Mathematica 9 than in Mathematica 10. Attachments: