Re: NDSolve and error
- To: mathgroup at smc.vnet.net
- Subject: [mg92559] Re: NDSolve and error
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sun, 5 Oct 2008 06:05:47 -0400 (EDT)
On 10/4/08 at 6:16 AM, dodatki at poczta.fm wrote: >Hello! Lately I wrote simple code in Mathematica >sol[p_] := >NDSolve[{Sqrt[ 1 + (y'[t])^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}] >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\)." >May I know what I'm doing wrong? Or how can I improve that code to >work correctly? Look at the left hand side of differential equation you posted. It says something about the derivative evaluated at t. But the right hand side is evaluated at x. Change the t on the left hand side to x and things should work.