Re: numerical_solution
- To: mathgroup at smc.vnet.net
- Subject: [mg73369] Re: numerical_solution
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 14 Feb 2007 05:20:26 -0500 (EST)
- Organization: Uni Leipzig
- References: <eqsa2a$jmb$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, you can't know, because the solution has two numerical errors, from rounding and more important from the method. Since NDSolve[] has an local error control it should keep the local error smaller than 10^(-PrecisionGoal) and since it does it with both version the numerical quality of the solutions is the same. If you don't have additional information like "I wish to conserve the energy." or something else solutions are equivalent. But the runtime may be different for different methods and you should use the method that offer the best performance. Regards Jens j. r. campanha wrote: > Dear MathGroup people > > > How can I know which is the best numerical solution? > > > w == 6; > A == 0.1; > B == 0.17; > F == 0.501; > > solution1 == NDSolve[{x'[t] ==== v[t], v'[t] ==== -(B)*(v[t]) - (A)*(((x[t]= > ))/(1 - (x[t])^2)) + (F)*(Cos[w*t]),x[0] ==== 0.4, v[0] ==== 0.3}, {x, v}, = > {t, 260, 270}]; > > ParametricPlot[Evaluate[{x[t], v[t]} /. solution1], {t, 260, 270}, Frame ->= > True] > > > OR > > solution2 == NDSolve[{x'[t] ==== v[t], v'[t] ==== -(B)*(v[t]) - (A)*(((x[t]= > ))/(1 - (x[t])^2)) + (F)*(Cos[w*t]),x[0] ==== 0.4, v[0] ==== 0.3}, {x, v}, = > {t, 260, 270}, Method -> StiffnessSwitching]; > > > ParametricPlot[Evaluate[{x[t], v[t]} /. solution2], {t, 260, 270}, Frame ->= > True] > > > > Jose R. Campanha > UNESP-Physics Dpto > Rio Claro - S=E3o Paulo > Brasil > >