       Re: Shooting Method Help

• To: mathgroup at smc.vnet.net
• Subject: [mg97474] Re: Shooting Method Help
• From: Torsten Hennig <Torsten.Hennig at umsicht.fhg.de>
• 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
>
> http://web.mit.edu/~shahriar/Public/shootingmethodhelp
> .nb
>
> I only have two boundary conditions to satisfy. They
> are vphi==0
> and vphi==0.
>
> Since eqn1 has vphi''[Rr] as second order. It needs
> two initial
> conditions, one is vphi=0 and the other I decided
> to implement the
> shooting method on to get vphi==0.
>
> So the initial condition vphi'=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==B.
>

Why ? If you have only two boundary conditions
to be satisfied, fix wz 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 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 /. NDSolve[{Eqnstosolve,
> vphi == 0,
> \!\(\*SuperscriptBox["vphi", "\[Prime]",
> MultilineFunction->None]\) == A, \[Omega]z ==
> B}, {vphi, \[Omega]z}, {Rr, 0, xend}, MaxSteps
> Steps -> Infinity]
>
> This results in a result for vphi'==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
Torsten.

```

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