Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13084
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: system of differential equations mathematica help |
| Date | 2013-01-10 07:19 +0000 |
| Message-ID | <kclq2q$9mf$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: system of differential equations mathematica help Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-01-10 07:19 +0000
csiph-web