Re: Question: nonlinear differential equation with boundary conditions
- To: mathgroup at smc.vnet.net
- Subject: [mg26491] Re: [mg26429] Question: nonlinear differential equation with boundary conditions
- From: Reza Malek-Madani <research at usna.edu>
- Date: Thu, 28 Dec 2000 02:52:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Dear Ronald: I am not aware that Mathematica has an internal function that can handle nonlinear BVPs--as you know, nonlinear BVPs sometimes have no solutions and sometimes multiple solutions, which makes it difficult to write a simple program to take care of all cases. But when there is a unique (and stable) solution, a simple shooting method does the job. Here is how I would approach your BVP (I am not sure if the values I chose are typical for your case): e=1.2;a=b=c=d=1; F[z_] := Module[{sol} , sol = NDSolve[{a y''[x] - b y[x]^2 + c Exp[-d x]==0, y[0] == z, y'[0]==0}, y, {x, 0, e}]; output = First[Evaluate[y'[x] /. sol/. x -> e]]] shoot=FindRoot[F[z], {z, 1, 0.9}]; sol = NDSolve[{a y''[x] - b y[x]^2 + c Exp[-d x]==0, y[0] == z/. shoot, y'[0]==0}, y, {x, 0, e}]; Plot[Evaluate[y[x]/. sol], {x,0,e}] Regards, Reza. ------------------------------------------------------------------------- Reza Malek-Madani Director of Research Research Office, MS 10m Phone: 410-293-2504 (FAX -2507) 589 McNair Road DSN: 281-2504 U.S. Naval Academy Nimitz Room 17 in ERC Annapolis MD 21402-5031 Email: research at usna.edu -------------------------------------------------------------------------- On Wed, 20 Dec 2000, Ronald Sastrawan wrote: > Hello! > Sorry, in my last post there was a mistake in my equation. > (There should be a y^2 in the equation). The real question was: > > I encountered a problem, trying to numerically solve a differential > equation. > My equation looks like: > > A y''[x] - B (y[x])^2 + C Exp[-Dx] == 0 > with boundary conditions: y'[0]==0 , y'[E]==0 > > All constants A to E are known. > > Mathematica complains, that the equation is not linear. But in the > online documentation I saw many examples of nonlinear differential > equations, which all work fine. What is the difference between the > examples and my equation ? And is there a possibility to NDSolve my > equation ? > > Any hint on this would be of great help to me. > > Thanks a lot, > > Ronald > > -- > Ronald Sastrawan > > Freiburg Materials Research Center > Stefan-Meier-Str. 21 > D-79104 Freiburg > Germany > Tel: ++49/761/203-4802 > FAX: ++49/761/203-4801 > EMAIL: sastra at fmf.uni-freiburg.de > http://www.fmf.uni-freiburg.de/~biomed/FSZ/forschung-FSZ.html > > > >