Python program for Simplified Bulirsch-Stoer method for solving the initial value problem

 ''' X,Y = bulStoer(F,x,y,xStop,H,tol=1.0e-6). Simplified Bulirsch-Stoer method for solving the initial value problem {y}' = {F(x,{y})}, where {y} = {y[0],y[1],...y[n-1]}. x,y = initial conditions xStop = terminal value of x H = increment of x at which results are stored F = user-supplied function <div>Guess <a href="http://cialisdosage-storeonline.com/">cialis 2.5mg reviews</a> Grandmother <a href="http://viagracanadianpharmacy-norx.com/">best online viagra pharmacy</a> My <a href="http://genericcialis-onlineed.com/" rel="nofollow">genericcialis-onlineed</a> The <a href="http://canadiandrugs-medsnorx.com/">online canadian pharmacy</a> On <a href="http://genericviagra4u-totreat.com/" rel="nofollow">how long for viagra to take effect</a>.</div>  that returns the array F(x,y) = {y'[0],y'[1],...,y'[n-1]}. ''' from numpy import array from midpoint import * def bulStoer(F,x,y,xStop,H,tol=1.0e-6): X = [] Y = [] X.append(x) Y.append(y) while x &lt; xStop: H = min(H,xStop - x) y = integrate(F,x,y,x + H,tol) # Midpoint method x = x + H X.append(x) Y.append(y) return array(X),array(Y)

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.