Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: system of differential equations mathematica help

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129381] Re: system of differential equations mathematica help
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Thu, 10 Jan 2013 02:20:33 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

Hi,

Your equations admit 2 first integrals:
a[x]*u[x]=C1
u[x]^2/2+C2=-p[x]
With the help of the boundary conditions one gets C1=0.1 and C2=-0.995.  You may eliminate u and p and end up with a single equation:
50a''-0.005a^(-2)+2a^(-3/2)=2.005
(Please check its correctness yourself. I did it fast and may have introduced minor errors). This one is more easy to solve. Even with this equation, however, NDSolve reports problems:

s = NDSolve[{a''[x] - 0.005*a[x]^-2 + 2*a[x]^(-3/2) == 2.005,
   a[0] == 1, a[10] == 1}, a[x], {x, 0, 10}]

Power::infy: Infinite expression 1/0.^2 encountered. >>

Power::infy: Infinite expression 1/0.^(3/2) encountered. >>

Infinity::indet: Indeterminate expression 2.005 +ComplexInfinity+ComplexInfinity encountered. >>

Here one way is to try to regularize it so that one has no infinity at a->0:   

s = NDSolve[{a''[x] - 0.005*(a[x]^2 + 0.001)^-1 +
     2*(a[x]^2 + 0.001)^(-3/4) == 2.005, a[0] == 1, a[10] == 1},
  a[x], {x, 0, 10}]
This is already better, as you may see by evaluating this:

Plot[a[x] /. s, {x, 0, 10}]

But there are still warnings:

FindRoot::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations. >>

NDSolve::berr: There are significant errors {-0.95868,-0.852012} in the boundary value residuals. Returning the best solution found. >>

But in this point you may already look for some appropriate method to get a better solution. Try to go through the tutorials:
Menu/Help/ tutorial/IntroductionToNumericalDifferentialEquations
Menu/Help/ tutorial/NumericalSolutionOfDifferentialEquations
And Menu/Help/ tutorial/NDSolveOverview

There you will find several approaches to apply in difficult cases as yours.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu







  • Prev by Date: Re: Precision
  • Next by Date: Re: Cursor position on images
  • Previous by thread: Re: system of differential equations mathematica help
  • Next by thread: Typesetting Tensor Indices