Re: NDSolve::ndsz question
- To: mathgroup at smc.vnet.net
- Subject: [mg63696] Re: NDSolve::ndsz question
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Tue, 10 Jan 2006 01:48:51 -0500 (EST)
- Organization: Uni Leipzig
- References: <dpnqoa$6rh$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, you may use high-precision computation (avoid 0.5 and 0.1 and use 1/2 and 1/10 instead) if you know that your solution has no singularity -- otherwise you must program an initial value solver that use rational approximations to the function instead of polynomes. Regards Jens "Flip" <fliptomato at gmail.com> schrieb im Newsbeitrag news:dpnqoa$6rh$1 at smc.vnet.net... | Greetings, I'm trying to solve a differential equation but I'm getting | the following error: | | NDSolve::ndsz: At x == 18.84025621252942`, step size is effectively | zero; \ | singularity or stiff system suspected | | I'm not sure how to deal with this--is there a way to allow smaller | step sizes? Here is my complete code: | | k := 400000000; | b := 0.0023; | epsR := 0.024; | solution := NDSolve[ | {y'[x] == -k x^(-0.5) \[ExponentialE]^(-epsR x) (y[x]^2 - (b x^2 | BesselK[2,x])^2), | y[0.1] == b*BesselK[2,0.1]/(0.1)}, y, {x,0.1,5000}] | Evaluate[y[5000] /. solution] | | Any thoughts would be appreciated! Thanks, | Flip |