Re: A simple ordinary differential equation
- To: mathgroup at smc.vnet.net
- Subject: [mg98213] Re: A simple ordinary differential equation
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 3 Apr 2009 04:32:36 -0500 (EST)
- Organization: Uni Leipzig
- References: <gr21kh$lpg$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, what is wrong with f[x_?NumericQ] = 1 - 1111*x'^2; ? A derivative x' from a numeric value f[x_?NumericQ] what is wrong with Sqr[] is it a miss-typed Sqrt[] or is it a square Sqr[x_]:=x^2 f[x_[t_]] := 1 - 1111*x'[t]^2; sol = NDSolve[{x''[t] + (16/10^4) x'[t]^2* Sqrt[f[x[t]]]/x[t]^2 - (1458/10^9)*f[x[t]]/x[t]^2 == 0, x[0] == 1, x'[0] == 0}, {x[t], x'[t]}, {t, 0, 100}, AccuracyGoal -> 8, PrecisionGoal -> 8, WorkingPrecision -> 30, MaxSteps -> Infinity]; and Plot[Evaluate[x'[t] /. sol], {t, 0, 100}] work fine. Regards Jens I. Shechtman wrote: > What is wrong with this equation? > > Clear[sol] > f[x_?NumericQ] = 1 - 1111*x'^2; > sol = NDSolve[{x''[t] + (16/10^4)x'[t]^2*Sqr[ > f[x[t]]]/x[ > t]^2 - (1458/10^9)*f[x[t]]/x[t]^2 == > 0, x[0] == 1, x'[0] == 0}, x[t], { > t, 0, 100}, AccuracyGoal -> 8, > PrecisionGoal -> 8, WorkingPrecision -> > 30, MaxSteps -> Infinity]; > Plot[Evaluate[x'[t] /. sol], {t, 0, 100}] >