Solving differential equations in Mathematica 7.0
- To: mathgroup at smc.vnet.net
- Subject: [mg108581] Solving differential equations in Mathematica 7.0
- From: Wei-Li Tan <deathanubis at hotmail.com>
- Date: Wed, 24 Mar 2010 04:42:23 -0500 (EST)
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