(* Stability of ODE's and methods *) (* To run on command line: math -run "<{Hue[1], Thickness[0.01]}, PlotLabel -> "x(0)= 1.0", AxesLabel -> {t , x[t]}] solutionB = NDSolve[{x'[t] == a*x[t], x[0] == 1.1}, x, {t, 0, 10}] plotB = Plot[Evaluate[x[t] /. solutionB ], {t, 0, 10}, PlotStyle->{Hue[0.5], Thickness[0.01]}, PlotLabel -> "x(0) = 1.1", AxesLabel -> {t, x[t]}] (* Print the difference between the solutions at t = 10 *) Print[] Print["Difference between solutions at t=10 ", Evaluate[x[10] /. solutionB ] - Evaluate[x[10] /. solutionA ] ] Print[] Plot[Evaluate[x[t] /. solutionB ] - Evaluate[x[t] /. solutionA ], {t, 0, 10}, PlotLabel -> "Difference", AxesLabel -> {t, x[t]}] Clear[a]