MathGroup Archive 2001

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

Search the Archive

Re: Differential eqn. with interpolated coeficients

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29185] Re: Differential eqn. with interpolated coeficients
  • From: Tom Burton <tburton at cts.com>
  • Date: Sat, 2 Jun 2001 05:54:39 -0400 (EDT)
  • Organization: Brahea Consulting
  • References: <9f7j82$grq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

?? I'm not having any trouble with this:

In[48]:=
$Version

Out[48]=
4.1 for Microsoft Windows (November 2, 2000)

In[49]:=
P = Interpolation[Table[{i, Random[]}, {i, 5}]]; 

In[50]:=
Q = Interpolation[Table[{i, Random[]}, {i, 5}]]; 

In[51]:=
ans = NDSolve[{y''[x] +  P[x]*y'[x] + Q[x] == 0, 
              y[1] == 1, y'[1] == 1}, y, {x, 1, 5}]

Out[51]=
{{y -> InterpolatingFunction[]}}

In[52]:=
y1 = y /. First[ans]; 

In[53]:=
Plot[Evaluate[y1[x]], {x, 1, 5}]; 

On Fri, 1 Jun 2001 08:20:18 +0000 (UTC), in comp.soft-sys.math.mathematica you wrote:

>I need to solve a ordinary second order differential equation, of the
>type y''[x] + P[x] y'[x] + Q[x] == 0, where the coefficients P[x] and
>Q[x] are an interpolating function (or a table of numerical data). 
>
>I have tried with NDSolve, but it seems to admit only an interpolating
>function for Q[x], but not for P[x]. Does any one know what could I do?
>
>Regards,
>
>Daniel Arteaga

Tom


  • Prev by Date: Re: Base 10 Versus Base 16 in Mathematica
  • Next by Date: Re: J/Link speed of accessing arrays
  • Previous by thread: Re: Differential eqn. with interpolated coeficients
  • Next by thread: Re: Differential eqn. with interpolated coeficients