Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Shooting Problem (fwd)


  • To: mathgroup@smc.vnet.net
  • Subject: [mg10648] Re: Shooting Problem (fwd)
  • From: Seth Chandler <SChandler@Central.UH.Edu>
  • Date: Tue, 27 Jan 1998 03:10:12 -0500
  • Organization: University of Houston
  • References: <6a1mls$pqo@smc.vnet.net>

The following may not be elegant, but if I understand your problem
correctly it may work. Suppose your differential equation is
c'[t]==Sin[Exp[-t^2/2]c[t]. You want to know what value of c[t] at time
0 will yield a value of c[t] equal to 3.04 at time 0.6.  So far as I
can see, Mathematica cannot solve the problem analytically. So, you use
NDSolve and create an initial condition c[0]==guess. You then let
FindRoot plug in values for guess and let the FindRoot procedure
iterate until the value of the InterpolatingFunction created by NDSolve
is equal to 3.04 at time 0.6.  Your example may be somewhat more
complicated, but the basic concept should work. Here is the code:


In[27]:=
FindRoot[Head[(
          c[t]/.First[
              NDSolve[{c[0]==guess,c'[t]==Sin[Exp[-t^2/2]c[t]]},
                c[t],{t,0,1}]])][0.6]-3.04,{guess,3,4}] Out[27]=
{guess\[Rule]2.80767}

Seth J. Chandler
Associate Professor of Law
University of Houston Law Center
WOLKOWISKY JAY H wrote:

> Forwarded message:
> From: WOLKOWISKY JAY H <wolkowis@euclid.Colorado.EDU> To:
To: mathgroup@smc.vnet.net
> mathgroup@smc.vnet.net
> Subject: [mg10648] Re: [mg10472] Shooting Problem MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset=US-ASCII Content-Length: 1359
>
> >
> > Hello,
> >        I have a system of two differential equations, k'[t] and c'[t].
> > In the problem I am working with I know the initial condition for k,
> > k[0]=a and I know a steady state or boundary condition k[sometime]=b.
> > The problem is to choose c[0] so that k[t] arrives (sometime) at point
> > b (which is a steady state).  In puttering around with this problem
> > I've been use NDSolve to generate paths beginning at k[0]=a and c[0]=x.
> > Then  by trial and error I vary x until I have a path such that
> > k[sometime] reaches b or very near b.  Obviously, I would like an
> > interative procedure to do this automatically.  Has anyone written such
> > a procedure already?  I beleive this method of solving this type of
> > problem is called the shooting method.
> >
> > Thanks
> > --
> > Alex Tabarrok
> > Department of Economics
> > Ball State University
> > Muncie, IN, 47306
> > EMail: 00ATTabarrok@BSUVC.BSU.Edu
> > Web Page: http://www.bsu.edu/econ then hit Faculty and then Tabarrok
> >
> >
>
> Hi,
>
> I've written a paper which is about the "shooting method" with
> Mathematica. It is: "Shooting the Buckled Plate" Innovation in
> Mathematics, Proceedings  of the Second  International MATHEMATICA
> Symposium,Editors: V. Keranen, P.Mitic,A.Hietamaki,1997.P507-515.
>
> Jay H. Wolkowisky
> Dept. of Mathematics
> University of Colorado
> Boulder, CO 80309
> email: wolkowis@euclid.colorado.edu


WOLKOWISKY JAY H wrote:

> Forwarded message:
> From: WOLKOWISKY JAY H <wolkowis@euclid.Colorado.EDU> To:
To: mathgroup@smc.vnet.net
> mathgroup@smc.vnet.net
> Subject: [mg10648] Re: [mg10472] Shooting Problem MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset=US-ASCII Content-Length: 1359
>
> >
> > Hello,
> >        I have a system of two differential equations, k'[t] and c'[t].
> > In the problem I am working with I know the initial condition for k,
> > k[0]=a and I know a steady state or boundary condition k[sometime]=b.
> > The problem is to choose c[0] so that k[t] arrives (sometime) at point
> > b (which is a steady state).  In puttering around with this problem
> > I've been use NDSolve to generate paths beginning at k[0]=a and c[0]=x.
> > Then  by trial and error I vary x until I have a path such that
> > k[sometime] reaches b or very near b.  Obviously, I would like an
> > interative procedure to do this automatically.  Has anyone written such
> > a procedure already?  I beleive this method of solving this type of
> > problem is called the shooting method.
> >
> > Thanks
> > --
> > Alex Tabarrok
> > Department of Economics
> > Ball State University
> > Muncie, IN, 47306
> > EMail: 00ATTabarrok@BSUVC.BSU.Edu
> > Web Page: http://www.bsu.edu/econ then hit Faculty and then Tabarrok
> >
> >
>
> Hi,
>
> I've written a paper which is about the "shooting method" with
> Mathematica. It is: "Shooting the Buckled Plate" Innovation in
> Mathematics, Proceedings  of the Second  International MATHEMATICA
> Symposium,Editors: V. Keranen, P.Mitic,A.Hietamaki,1997.P507-515.
>
> Jay H. Wolkowisky
> Dept. of Mathematics
> University of Colorado
> Boulder, CO 80309
> email: wolkowis@euclid.colorado.edu





  • Prev by Date: Re: Flattening systems of eqns: And the winner is...
  • Next by Date: No Subject
  • Prev by thread: Re: Shooting Problem (fwd)
  • Next by thread: [Q]Mathematica: Alternative to GrayLevel for photocopies?