MathGroup Archive 1999

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

Search the Archive

Re: NDSolve, InterpolatingFunctions and imaginary initial values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18060] Re: [mg18018] NDSolve, InterpolatingFunctions and imaginary initial values
  • From: "Kevin J. McCann" <kevinmccann at Home.com>
  • Date: Tue, 15 Jun 1999 01:43:21 -0400
  • Delivery-date: Tue Jun 15 09:00:01 1999
  • References: <199906121952.PAA05662@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

I ran into this irritant last year.  It occurs because your interpolation
for a[t] expects t to be real and when you introduced complex numbers t
thinks it is complex even when the imaginary part is zero.  Substitute
a[Re[t]] for a[t] in your final NDSolve and all will be well.

Kevin

----- Original Message -----
From: Carl Woll <carlw at u.washington.edu>
To: mathgroup at smc.vnet.net
Subject: [mg18060] [mg18018] NDSolve, InterpolatingFunctions and imaginary initial
values


<snip>

> In[54]:=
> NDSolve[{v'[t]==a[t],v[0]==I},v,{t,0,2}]
>
> NDSolve::ndnum:
>    The right-hand side of the differential equation does
>      not evaluate to a number at t == 0..
>
> NDSolve::ndnum:
>    The right-hand side of the differential equation does
>      not evaluate to a number at t == 0..
>
> Out[54]=
> NDSolve[{v'[t] == InterpolatingFunction[{{0, 2}}, <>][t], v[0] == I}, v,
> {t, 0, 2}]
>



  • Prev by Date: Inserting Adobe pdf files in ver. 4 notebooks
  • Next by Date: Re: A little problem with positive numbers
  • Previous by thread: Re: Inserting Adobe pdf files in ver. 4 notebooks
  • Next by thread: Re: Tips for 4.0 !!