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: [mg29187] Re: [mg29158] Differential eqn. with interpolated coeficients
  • From: Ben Jacobson <bjacobson at illumitech.com>
  • Date: Sat, 2 Jun 2001 05:54:41 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Works fine for me.  I would guess you have a syntax error.

In[2]:=
p[x_] = Interpolation[Table[{j, Sin[j]}, {j, 0, 6, .6}]][x]

Out[2]=
InterpolatingFunction[{{0., 6.}}, "<>"][x]

In[6]:=
q[x_] = Interpolation[Table[{j, j*Cos[j]}, {j, 0, 6, .6}]][x]

Out[6]=
InterpolatingFunction[{{0., 6.}}, "<>"][x]

In[9]:=
NDSolve[{y''[x] + p[x]y'[x] + q[x] == 0, y[0] == .5, y'[0] == .3}, y, {x, 0, 
    6}]

Out[9]=
{{y -> InterpolatingFunction[{{0., 6.}}, "<>"]}}

Ben Jacobson
Illumitech Inc.

At 04:15 AM 6/1/01 -0400, 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
>
>


  • Prev by Date: experience with optimization packages?
  • Next by Date: Re: Base 10 Versus Base 16 in Mathematica
  • Previous by thread: Differential eqn. with interpolated coeficients
  • Next by thread: Re: Differential eqn. with interpolated coeficients