Re: Solving differential equations in Mathematica 7.0
- To: mathgroup at smc.vnet.net
- Subject: [mg108624] Re: Solving differential equations in Mathematica 7.0
- From: dh <dh at metrohm.com>
- Date: Thu, 25 Mar 2010 04:27:56 -0500 (EST)
- References: <hocm9d$shg$1@smc.vnet.net>
Hi,
it looks like the solution is rapidly changing at x==x1. You could solve
up to a value slightly less than x1 and look at the solution to get an
idea what is happening. Maybe you can already get an idea by looking at
the equations. e.g. a term like 1/(x-x1).
Daniel
On 24.03.2010 10:33, Wei-Li Tan wrote:
> Hi,all:
> Here is the code I want to solve the equation
>
> Eqn1 := f2*(D[z[x], {x, 1}])^2 + f1*(D[z[x], {x, 2}]) + P*(D[y[x],
> {x, 2}]) + Psoil;
> Eqn2 := z[x] - (D[y[x], {x, 2}]);
>
> sol = NDSolve[{Eqn1 == 0, Eqn2 == 0, y[0] == disp, y'[0] == 0, y[L]
> == 0, y'[L] == 0}, {z, y}, {x, 0, L},
> MaxSteps -> Infinity, AccuracyGoal -> 10, StartingStepSize -
>> 0.001, MaxStepSize -> 0.005,
> MaxStepFraction -> 0.001]
>
> f1,f2 are the function of z[x]; Psoil is the function of
> y[x];P,L,disp are constant.
>
> and the Mathematica return me the message:
>
> NDSolve::ndsz: At x ==x1, step size is effectively zero; singularity
> or stiff system suspected.
> FindRoot::cvmit: Failed to converge to the requested accuracy or
> precision within 100 iterations.
> NDSolve::berr: There are significant errors {xi} in the boundary
> value residuals.Returning the best solution found.
>
> {{z -> InterpolatingFunction[{{0.,25}},<>], y ->
> InterpolatingFunction[{{0.,25}},<>]}}
>
>
> How should I do to debug the code and find the correct solution.
> Any help on this matter will be greatly appreciated.
> Thanks
>
--
Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.com>