MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Solving stiff differential equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84497] Re: Solving stiff differential equations
  • From: roland franzius <roland.franzius at uos.de>
  • Date: Sat, 29 Dec 2007 20:01:20 -0500 (EST)
  • Organization: Universitaet Hannover
  • References: <fl4utf$9vb$1@smc.vnet.net>

dkjk at bigpond.net.au wrote:
> Hi all,
> 
> I want to solve the following nonlinear ODE
> 
> x'[t] == M - 3 x[t] Sqrt[-M*t + 7/10 + x[t]]
> 
> x[0] == 3/10
> 
> where M is a very large number (~10^43).
> 
> I tried solving this using
> 
> M = 10^43;
> s = NDSolve[{x'[t] == M - 3 x[t] Sqrt[-M t + 7/10 + x[t]],
>    x[0] == 3/10}, x[t], {t, -10, 10}, WorkingPrecision -> 20]
> Plot[Evaluate[x[t] /. s], {t, -10, 10}, PlotRange -> All]
> 
> but I got a lot of errors.  Could anyone please advise how I should go
> about solving this?

Obviously you have a log derivative in your equation

D[Sqrt[-M t + 7/10 + x[t]],t]

(x'[t]-M)/(2 Sqrt[-M t + 7/10 + x[t]])


Set

eq1= D[( - M t +7/10+x[t]) /Sqrt[-M t +7/10 + x[t]] , t] - 3x[t]

and replace

eq2=eq/.({x[t]->#,x'[t]-> D[#,t]}&)[y[t]^2 -7/10 - M t]

y[t]*(3*(-(7/10) + M*t + y[t]^2) + 2*Derivative[1][y][t])



The resulting equation is solvable for y and produces rapidly 
oscillating functions

q[t_,M_,c_]=DSolve[3 (-7/10+M*t+y[t]^2)+2y'[t] == 0,y[t], t][[1]] /. 
C[1] :> c

(2*(-(((3/2)^(2/3)*c*M*
           AiryAiPrime[(2*(2/3)^(1/3)*(63/40 - (9*M*t)/4))/
                      (3*(-M)^(2/3))])/(-M)^(2/3)) -
          ((3/2)^(2/3)*M*
         AiryBiPrime[(2*(2/3)^(1/3)*(63/40 - (9*M*t)/4))/
                   (3*(-M)^(2/3))])/(-M)^(2/3)))/
    (3*(c*AiryAi[(2*(2/3)^(1/3)*(63/40 - (9*M*t)/4))/(3*(-M)^(2/
              3))] +
          AiryBi[(2*(2/3)^(1/3)*(63/40 - (9*M*t)/4))/(3*(-M)^(2/3))]))

-- 

Roland Franzius


  • Prev by Date: Re: help with mathematica 5.2-Vector
  • Next by Date: Re: Defining derivatives
  • Previous by thread: Re: Solving stiff differential equations
  • Next by thread: help with mathematica 5.2-Vector