Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: system of differential equations mathematica help
Replies: 2   Last Post: Jan 10, 2013 2:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexei Boulbitch

Posts: 479
Registered: 2/28/08
Re: system of differential equations mathematica help
Posted: Jan 10, 2013 2:19 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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@iee.lu








Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.