Re: NDSolve can't solve a complex ODE correctly?
- To: mathgroup at smc.vnet.net
- Subject: [mg74908] Re: NDSolve can't solve a complex ODE correctly?
- From: "Barrow" <GRseminar at gmail.com>
- Date: Wed, 11 Apr 2007 01:52:40 -0400 (EDT)
- References: <evd3uh$5ks$1@smc.vnet.net><evfknm$75t$1@smc.vnet.net>
On 4=A4=EB10=A4=E9, =A4U=A4=C85=AE=C917=A4=C0, "Kevin J. McCann" <k...@Kevi= nMcCann.com> wrote: > You should try plotting the individual functions. They are growing > exponentially. I suspect that this explains why they don't converge > (numerically) to each other. They are on the order of 10^300 at larger > values of t. > > Oh sorry, I found just now that, the analytical result is a'[t]/a[t] converges to az'[t]/az[t], NOT a[t] converges to az[t]. And, the result obtained by NDSolve of Mathematica respects that. Thanks anyway! > > Barrow wrote: > > 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- =C1=F4=C2=C3=B3Q=A4=DE=A5=CE=A4=E5=A6r - > > - =C5=E3=A5=DC=B3Q=A4=DE=A5=CE=A4=E5=A6r -