 
 
 
 
 
 
Re: NDSolve and error
- To: mathgroup at smc.vnet.net
- Subject: [mg92553] Re: NDSolve and error
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sun, 5 Oct 2008 06:04:38 -0400 (EDT)
- References: <gc7fql$elo$1@smc.vnet.net>
dodatki at poczta.fm wrote:
> sol[p_] :=
>   NDSolve[{Sqrt[
>           1 + (y'[t])^2] == (x^(p - 1) + (y[x])^(p - 1)*y'[x])/(x^p +
=================^^^^^^
Must be y'[x] not of t.
>                 y[x]^p)^(1 - 1/p), y[1] == 6}, y, {x, 1, 4}]
> 
> but when I typed sol[2] the following kind of error was shown:
> 
> NDSolve::"ndnum": "Encountered non-numerical value for a derivative at
> \
> \!\(x\) == \!\(4.587812868332132`*^-296\)."
In[1]:= sol[p_] :=
  NDSolve[{Sqrt[
      1 + (y'[x])^2] == (x^(p - 1) + (y[x])^(p - 1)*y'[x])/(x^p +
         y[x]^p)^(1 - 1/p), y[1] == 6}, y, {x, 1, 4}]
In[2]:= sol[2]
Out[2]= {{y->InterpolatingFunction[{{1.,4.}},<>]}}
In[3]:= Plot[y[x] /. %, {x, 1, 4}]
Regards,
-- Jean-Marc

