answersLogoWhite

0


Best Answer

Since the questioner didn't specify which shooting method was being used, I'll explain the linear shooting method.

First off, the shooting method is used to solve boundary-value problems, or BVPs, where instead of being given 2 initial conditions to solve a problem, we only have the value of the function at both ends of a given interval [a,b], i.e. we are given y(a) and y(b) as conditions for a problem y''=f(x,y,y'), where x is in the interval [a,b].

Now, suppose our problem is written in the form of y''= p(x)y'+q(x)y+r(x), y(a)=s and y(b)=t with the functions p, q and r continuous on the interval [a,b] and q(x)>0 on [a,b], I wont go into the theory of it but this means we can separate our problem into a system of 2 initial-value problems, namely:

y1''=p(x)y1'+q(x)y1+r(x), x in [a,b], y(a)=s, y'(a)=0

y2''=p(x)y2'+q(x)y2, x in [a,b], y(a)=0, y'(a)=1

and that the linear combination y(x)=y1(x)+((t-y1(b))/y2(b))*y2(a) is a unique solution to our linear boundary-value problem.

The textbook I am using for the majority of this information gives the following algorithm for the shooting method with Runge-Kutta 4 in terms of its individual components, in order to save a LOT of space, I'm gonna try and write it up in terms of vectors instead.

The algorithm for the shooting method with R-K4 approximating y1 and y2 is as follows:

INPUT: endpoints a, b; boundary conditions s, t; number of sub intervals N; functions p, q and r of x; vectors u=(s, 0) v=(0,1) (please note that in the algorithm a vector followed by [1] or [2] signifies the first/second component of the vector. e.g. at the moment u[1]=s and u[2]=0)

STEP 1: set h=(b-a)/N

STEP 2: For i=0...N-1 do STEPS 3 to 5

STEP 3: set x=a+ih

STEP 4: set;

k1=(hu[2] , h[p(x)u[2]+q(x)u[1]+r(x)])

k2=(hu[2]+0.5*k1[2] , h[p(x+h/2)*(u[2]+0.5*k1[2])+q(x+h/2)*(u[1]+0.5*k1[1])+r(x+h/2)])

k3=(hu[2]+0.5*k2[2] , h[p(x+h/2)*(u[2]+0.5*k2[2])+q(x+h/2)*(u[1]+0.5*k2[1])+r(x+h/2)])

k4=(hu[2]+k3[2] , h[p(x+h)*(u[2]+k3[2])+q(x+h)*(u[1]+k3[1])+r(x+h)])

set u[1]=(u[1]+(k1[1]+2*k2[1]+2*k3[1]+k4[1])/6)

set u[2]=(u[2]+(k1[2]+2*k2[2]+2*k3[2]+k4[2])/6)

STEP 5: set;

k'1=(hv[2] , h[p(x)v[2]+q(x)v[1]])

k'2=(hv[2]+0.5*k'1[2] , h[p(x+h/2)*(v[2]+0.5*k'1[2])+q(x+h/2)*(v[1]+0.5*k'1[1])])

k'3=(hv[2]+0.5*k'2[2] , h[p(x+h/2)*(v[2]+0.5*k'2[2])+q(x+h/2)*(v[1]+0.5*k'2[1])])

k'4=(hv[2]+k'3[2] , h[p(x+h)*(v[2]+k'3[2])+q(x+h)*(v[1]+k'3[1])])

set v[1]=(v[1]+(k'1[1]+2*k'2[1]+2*k'3[1]+k'4[1])/6)

set v[2]=(v[2]+(k'1[2]+2*k'2[2]+2*k'3[2]+k'4[2])/6)

STEP 6: set w=(s, (t-u[1])/v[1])

OUTPUT (a, w)

STEP 7: for i=1...N;

set W1=u[1,i]+w[2]*v[1,i]

set W2=u[2,i]+w[2]*v[2,i]

set x+a+ih;

OUTPUT (x, W1, W2) (output is actually components of the ith iteration of the vector w, it's not giving out the last iteration but a list of all the outputs as the last iteration isn't very helpful for a boundary problem, we want to know the values inbetween)

STEP 8: STOP

The value of the function y(x) is then given by y(xi)=y1(xi)+y2(xi)*(t-y1(b))/y2(b)

Hopefully you can read the algorithm, just for clarification on the running of it, it does one run on i=0 for the R-K method (steps 4 and 5), then again for i=1, it then moves to the shooting method (step 7) and does one iteration using the vector values generated by the R-K4 on that run to generate the value of y(x) on the first step after x=a i.e. at x=a+h. It then goes to i=2 and does a run of R-K generating new vector values again, and then goes to the shooting method and generates the next value of the function at x=a+2h and so on until it has finished generating a list of values for W1 and W2 which correspond to y1(xi) and y2(xi) respectively. You can then use this values with the formula above to find the values of the function at the step points between a and b.

However in actuality the algorithm doesn't run like that, I just think it easier to think of it in that way. What it actually does is run step 3-5 for i=0 to i=N-1, so on the final iteration you generate a value for u and v at i=N. you use these Nth iterations in step 6. step 7 then runs from i=1 to i=N using the vector values previously generated for the corresponding value of i. Hence why I felt then need to put u[1,i] etc. in, in hopes of clarifying what value the algorithm is using.

And there you have the shooting method with a Runge-Kutta 4 technique for linear BVPs. Hopefully this made sense, if not send me a message detailing what it is you don't understand and I will see if I can help if I have spare time.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Runge-Kutta 4 technique with shooting method?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is chargeback method?

It is a technique that uses accounting entries to allocate the indirect costs of running the IT department. it has 4 methods: # no charge method # fixed charge method # variable charge method based on resource usage # variable charge method based on volume


What is chargeback?

It is a technique that uses accounting entries to allocate the indirect costs of running the IT department. it has 4 methods: # no charge method # fixed charge method # variable charge method based on resource usage # variable charge method based on volume


What is the ISBN of Shooting Sean?

The ISBN of Shooting Sean is 978-0-00-651424-4.


What are the release dates for Shooting Sizemore - 2007 1-4?

Shooting Sizemore - 2007 1-4 was released on: USA: 28 January 2007


When did Shooting Star die?

Shooting Star died on June 4, 1966, in Hollywood, California, USA of stroke.


What are the release dates for Climax - 1954 Shooting for the Moon 4-25?

Climax - 1954 Shooting for the Moon 4-25 was released on: USA: 24 April 1958


What are the ratings and certificates for Glee - 2009 Shooting Star 4-18?

Glee - 2009 Shooting Star 4-18 is rated/received certificates of: USA:TV-14


What year did the columbinne shooting happened?

4/20/99


What happens in daz 4 Zoe after the shooting in silverdale?

she died :(


Where can you take your 4 year old for his birthday?

to a shooting range


What are the 4 method of arranging trees?

square method , rectangular method tae mo


What are the release dates for Shooting Puppies - 2009?

Shooting Puppies - 2009 was released on: USA: 4 July 2009 (Los Angeles, California)