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: [mg80142] Re: a problem about NDSolve and NIntegrate
  • From: lynn <lynn0701 at gmail.com>
  • Date: Mon, 13 Aug 2007 04:41:35 -0400 (EDT)
  • References: <f9emog$lpq$1@smc.vnet.net>

On 8 9 ,   5 28 , lynn <lynn0... at gmail.com> wrote:
> Hello,
>
> I'm tring to solve a diffrential equation with
>
> its upper boundary as a variable.
>
> and then I want to integrate it, and define
>
> it as a funcion with two variable.
>
> However, I don't know why it doesn't work at the second step.
>
> my equation is as following,
>
> f[c_?NumberQ]:=y[x]/.NDSolve[{eqn,y[0]==1,y'[0]==0},y,{x,0,c},M=
axSteps-
>
> >10000][[1]]
>
> n[w_NumberQ,c_NumberQ]:=NIntegrate[c*y[x]*(r-w)],{r,w,1}]
>
> function f works well, however there's some problem in funcion n,
>
> and it's confused me for a long time...,
>
> thanks for your help!!
>
> Best Regards!!Lynn

Thanks for your pointing out my faults.

I miss-typed it when I tried to simplize my equation.

But my original problem still exist,

The following is the original equation,

f[ _?NumberQ] := y[ ] /. NDSolve[{
  2 y'[ ] y[ ] +
      y''[ ] y[ ] -
          (y'[ ])^2 ==   y[ ], y[0.00001] == 1, y'[0.00001] == =
0}, y,
{ ,
               0.00001,  }, MaxSteps -> 1000][[1]]

then f[5]=InterpolatingFunction[{{0.00001, 5.}}, <>][ ]

and I want to integrate it y[ ] with a  ,

\!\(g[w_?NumberQ,  _?NumberQ] := 2\
      NIntegrate[\  \/y[ ]=D7 \/\@\( \^2 - w\^2\), { , w,  },
MaxRecursion -> \
10]\)

But I can't get correct answer when ask for such as g[1,2]...

Thanks a lot!!

Sincerely, Lynn



  • Prev by Date: Re: Re: Increasing scattered subsequence
  • Next by Date: Drawing Potatoes and a Problem with Piecewise
  • Previous by thread: Re: a problem about NDSolve and NIntegrate
  • Next by thread: Re: a problem about NDSolve and NIntegrate