From: Alessio Giberti on
I have to solve numerically equations like

u''[x] - 1*^7 u[x] == 3.6*^7,
u'[0]==0, u'[2*^-3]==0,

but I get the message:

"The equations derived from the boundary conditions are numerically
ill-conditioned. The boundary conditions may not be sufficient to
uniquely define a solution. The computed solution may match the boundary
conditions poorly."

No problem with less extreme coefficients, the solutions are good, but
more extreme coefficients lead to non-reliable results. What can I do to
overcome the problem?

From: Bob Hanlon on

Use exact numbers and DSolve or use higher precision with NDSolve

eqns = {u''[x] - 1*^7 u[x] == 36*^6,
u'[0] == 0, u'[2*^-3] == 0};

soln = DSolve[eqns, u[x], x][[1]]

{u[x] -> -(18/5)}

eqns2 = {u''[x] - 1*^7 u[x] == 3.6`35*^7,
u'[0] == 0, u'[2*^-3] == 0};

soln2 = NDSolve[eqns2, u, {x, 0, 5}, WorkingPrecision -> 35][[1]];

Table[u[x] /. soln2, {x, 0, 5, .5}]

{-3.6,-3.6,-3.6,-3.6,-3.6,-3.6,-3.6,-3.6,-3.6,-3.6,-3.6}

Plot[Evaluate[u[x] /. soln2], {x, 0, 5}]


Bob Hanlon

---- Alessio Giberti <giberti(a)fe.infn.it> wrote:

=============
I have to solve numerically equations like

u''[x] - 1*^7 u[x] == 3.6*^7,
u'[0]==0, u'[2*^-3]==0,

but I get the message:

"The equations derived from the boundary conditions are numerically
ill-conditioned. The boundary conditions may not be sufficient to
uniquely define a solution. The computed solution may match the boundary
conditions poorly."

No problem with less extreme coefficients, the solutions are good, but
more extreme coefficients lead to non-reliable results. What can I do to
overcome the problem?



 | 
Pages: 1
Prev: does not work?
Next: Odd phenomenon