NDSolve can't solve a complex ODE correctly?
- To: mathgroup at smc.vnet.net
- Subject: [mg74870] NDSolve can't solve a complex ODE correctly?
- From: "Barrow" <GRseminar at gmail.com>
- Date: Mon, 9 Apr 2007 06:13:51 -0400 (EDT)
Dear all, I have two coupled ordinary differential equations which satisfied by two functions, a(t) and az(t). It can be shown analitically that as t approaches infinity, a(t) approaches az(t). But the numerical solution given by Mathematica doesn't agree this. Here is my code: ----------------------- lam = 1; eqb = ((a'[t]/a[t])^2 + 2a'[t]*az'[t]/a[t]/az[t] == lam); eqaz = (3(a'[t]/a[t])^2 + 2(a''[t]/a[t] - (a'[t]/a[t])^2) == lam); sol = NDSolve[{eqb, eqaz, a[0] == 1, az[0] == .5, a'[0] == .6}, {a[t], az[t]}, {t, 0, 2000}, MaxSteps -> 20000]; Plot[Evaluate[{a[t]/az[t]} /. sol], {t, 0, 2000}, PlotStyle -> {Hue[1]}]; ---------------------------------- The result of the plot is an oscillation around 2.07846 which is really strange. Is there anything I didn't noticed about NDSolve or any method to improve my coding? Thanks very much! Cheers. Barrow