MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NDSolve can't solve a complex ODE correctly?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74889] Re: NDSolve can't solve a complex ODE correctly?
  • From: "Kevin J. McCann" <kjm at KevinMcCann.com>
  • Date: Tue, 10 Apr 2007 05:15:53 -0400 (EDT)
  • References: <evd3uh$5ks$1@smc.vnet.net>

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.

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
> 
> 


  • Prev by Date: Re: Simplification with Integers assumption
  • Next by Date: Re: Plot a simple function
  • Previous by thread: NDSolve can't solve a complex ODE correctly?
  • Next by thread: Re: NDSolve can't solve a complex ODE correctly?