I doubt that one could write a completely general 'shooting method' package, since there are so many variables.  For example, some problems are only stable in one direction, or worse, must be integrated in both directions (outside in or inside out).  However, it's really very easy to write a shooting method for a specific problem by using odeint and fsolve.  Here's a very simple example.  (I threw it together quickly, and don't claim that it's pretty.)
john

# TPBVP - Blasius problem (boundary layer on a plate)
# from Carnahan, Luther, and Wilkes, "Applied Numerical
# Methods," Wiley (1969), p. 407.  The conditions are
# y0 = y1 = 0. at x = 0, y1 = 1 at x = infinity.  From
# the physics of the problem, 'infinity' is simply some
# 'large' number.  By trial, x = 6. is sufficient.
from scipy import *
from pylab import *
def deriv(y,x):
    y0d=y[1]
    y1d=y[2]
    y2d=-0.5*y[0]*y[2]
    return [y0d,y1d,y2d]
x = arange(0,6.,0.1)
def resid(ybv):
    global out, x
    y0 = [0.,0.,ybv]
    out = integrate.odeint(deriv,y0,x)
    i = out.shape[0] - 1
    dev = out[i][1] - 1.
    return dev
ybv = optimize.fsolve(resid,.3)
print ybv
plot(x,out[:,1])
show()

(This gives the "literature" answer: ybv = 0.3326976)

Ganesh V wrote:
Hi!

The main steps of the shooting method are

- Transform the given boundary value problem into an initial value
problem with estimated parameters
- Adjust the parameters iteratively to reproduce the given boundary values

I remember this..

http://www.cambridge.org/catalogue/catalogue.asp?isbn=0521852870&ss=res

This is the book.. Numerical Methods in Engineering with Python from the Cambridge Univ Press. This book has a chapter on solving Two point boundary value problems. But since the book is meant to teach Numerical methods, he has developed all the necessary machinery including ODEint and Newton Raphson iteration all by himself using Numpy alone and uses those functions to write the code for solving BVP's. A similar thing will have to be done using Scipy's packages now I guess.. or are we expecting a code fully written in C, C++, FORTRAN ?? I could help if it were the former..not the latter. I have been wanting this for quite some time now !! Too basic a feature to be missing in the Scipy !!

Ganesh

--


Ganesh V
Undergraduate student,
Aerospace Engineering,
IIT Madras, Chennai-36.

My homepage -->  http://www.ae.iitm.ac.in/~ae03b007

_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user