MathGroup Archive 2005

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

Search the Archive

Re: Unable to obtain value from interpolation function integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59601] Re: Unable to obtain value from interpolation function integration
  • From: "antononcube" <antononcube at gmail.com>
  • Date: Sat, 13 Aug 2005 03:26:37 -0400 (EDT)
  • References: <ddhjqj$h7q$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Using Mathematica code based on the formulas in your post, everything
works fine. Please, provide the exact Mathematica code you have used.
(Also, it will be better if there are no special symbols in it, in
order to be easier to copy and paste it.)

In[4]:= lambdar = 7.31^-10;
lambdad = 5.63^-8 ;
lambdas = 5^-7.;


In[8]:=f[t_] := f[t_] := (0.0022 + 0.0086/(1 + t/3600) + 1.89^-7*t -
7.60^-12*t^2 + 1.72^-16*t^3 - 1.77^-21 t^4 + 6.27^-27*t^5)


In[9]:= solution =
  NDSolve[
    {y1'[t] == -( lambdar + lambdad)*y1[t] +
          lambdas*y2[t] + (1 - UnitStep[t - 86400]*4.04^17*f[t]),
      y2'[t] ==  lambdad*y1[t] -  lambdas*y2[t],
      y1[0] == 0,
      y2[0] == 0},
    {y1[t], y2[t]}, {t, 0, 100000.}]

NDSolve::ndsz: At t == 86400., step size is effectively zero;
singularity or
     stiff system suspected.

Out[9]= {{y1[t] -> InterpolatingFunction[{{0., 86400.}}, <>][t],
 y2[t] -> InterpolatingFunction[{{0., 86400.}}, <>][t]}}

In[10]:= (y1[t] /. solution)[[1]]

Out[10]= InterpolatingFunction[{{0., 86400.}}, <>][t]


In[11]:= NIntegrate[(y1[t] /. solution)[[1]], {t, 90000, 91800}]

Out[11]=1.8598667775520015*^24

Anton Antonov,
Wolfram Research, Inc.


  • Prev by Date: Re: Broken DSolve + Piecewise forcing function
  • Next by Date: Re: Strange statistics function integration
  • Previous by thread: Re: Unable to obtain value from interpolation function integration
  • Next by thread: Re: Unable to obtain value from interpolation function integration