Re: NDSolve - Nice function but stiffness-problem
- To: mathgroup at smc.vnet.net
- Subject: [mg94399] Re: NDSolve - Nice function but stiffness-problem
- From: Nano <lukas.kranz at gmx.de>
- Date: Fri, 12 Dec 2008 06:52:58 -0500 (EST)
Hi Alois, I actually tried to solve the equation with another sysstem and bvp4c and it worked slighty better. I got solutions for the parameter up to A=7. Is there no reasonable way to solve my equation with mathematica? I still do not really see the problem... no singularites, and a "smooth" behaviour in the variation of the parameter. You are saying that "shooting" is not very good solving method. Are there better ones?! I also got an answer from Szabolcs via Email. He suggested solving the equation "backwards" with different starting conditions. It works indeed better until A=5 but also returns error messages for A>5. Here his code: Solution[A_] := NDSolve[{D[\[Phi][x], {x, 2}] == Exp[A*\[Phi][x]], Derivative[1][\[Phi]][1] == 0, \[Phi][0] == 1}, \[Phi][x], {x, 0, 1}, Method -> {"Shooting", "StartingInitialConditions" -> {\[Phi][1] == 0, Derivative[1][\[Phi]][1] == 0}}] ; Manipulate[ Plot[Evaluate[\[Phi][x] /. Solution[A]], {x, 0, 1}, PlotRange -> {0, 1}], {A, 0, 10}]