MathGroup Archive 2007

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

Search the Archive

Re: a problem about NDSolve and NIntegrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80253] Re: a problem about NDSolve and NIntegrate
  • From: chuck009 <dmilioto at comcast.com>
  • Date: Wed, 15 Aug 2007 04:30:48 -0400 (EDT)

Well hey, I think I got it now after following this for some days now:  Using Jean-Marc's code:

(* set up f[c] which defines the solution over the interval [0,c] *)

f[c_] := y[x] /. 
  NDSolve[{2 y'[x] y[x] + y''[x] y[x] - (y'[x])^2 == y[x], y[0] == 1, 
     y'[0] == 0}, y, {x, 0, c}][[1]]

(* Now define another function which integrates f[u] over the \
interval [0,v] *)

g[u_, v_] := NIntegrate[Evaluate@f[u], {x, 0, v}]

Nice guys!  

Isn't that what you wanted Lynn?  Works for me :)


  • Prev by Date: Re: Increasing scattered subsequence
  • Next by Date: Re: Graphing an inequality
  • Previous by thread: Re: a problem about NDSolve and NIntegrate
  • Next by thread: ListPlot problem