MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Shooting Method Help

  • To: mathgroup at
  • Subject: [mg97474] Re: Shooting Method Help
  • From: Torsten Hennig <Torsten.Hennig at>
  • Date: Sat, 14 Mar 2009 05:35:39 -0500 (EST)

> Hi
> Im sure if anyone has done the shooting method on two
> variables
> instead of one would find this problem easy to
> tackle.
> I have two coupled differential equations one in the
> variable named
> vphi[Rr] and the other wz[Rr] both are a function of
> Rr. My notebook
> file can be accessed at
> .nb
> I only have two boundary conditions to satisfy. They
> are vphi[1]==0
> and vphi[0]==0.
> Since eqn1 has vphi''[Rr] as second order. It needs
> two initial
> conditions, one is vphi[1]=0 and the other I decided
> to implement the
> shooting method on to get vphi[0]==0.
> So the initial condition vphi'[1]=A but since I have
> eqn2 with wz'[Rr]
> in it I need an initial condition on wz as well. I
> decided to use the
> shooting method on it as well so I kept wz[1]==B.

Why ? If you have only two boundary conditions
to be satisfied, fix wz[1] to an arbitrary value.
Then you only need to solve for A.

> I essentially am doing the shooting method with two
> variables, A and B
> but since I dont have any other boundary condition to
> satisfy on wz,
> when it comes time to solve for the roots in the
> shooting method I
> need two equations to solve for A and B
> One equation I use to set vphi[0]==0 but I dont know
> what to set the
> second one to for it to find a root for both A and B.
> So my findroot
> expression looks like this
> rooteqn =
>  FindRoot[{fpA[A, B] == 0,
>    fpA[A, B] == 0}, {{A, {Al, Au}}, {B, {Bl, Bu}}}]
> where I repeat the function twice over
> fpend[A_, B_] := vphi[0] /. NDSolve[{Eqnstosolve,
> vphi[1] == 0,
> \!\(\*SuperscriptBox["vphi", "\[Prime]",
> MultilineFunction->None]\)[1] == A, \[Omega]z[1] ==
> B}, {vphi, \[Omega]z}, {Rr, 0, xend}, MaxSteps
> Steps -> Infinity]
> This results in a result for vphi'[0]==A but it
> doesnt actually solve
> for values of B. It gives me the same result for
> whatever bounds I
> select for B.
> How do I solve for both A and B? Is there another way
> to implement
> this so I can solve for vphi[Rr] and wz[Rr]
> Any help on this matter is greatly appreciated.

Best wishes

  • Prev by Date: Re: ListPointPlot3D not composable?
  • Next by Date: Re: Re: Mathematica and some General Comments
  • Previous by thread: Re: Shooting Method Help
  • Next by thread: Re: Re: Re: Mathematica and some General