1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Linear-Shooting Method

  1. Mar 4, 2008 #1
    1. The problem statement, all variables and given/known data
    0<=x<=2 y(0)=0 , y(2)=-4, h = 0.2
    Approximate the solution using Euler's method

    2. Relevant equations

    3. The attempt at a solution

    So we'll have two guesses
    y1''=2*y1'-y1'+x*exp(x)-x y1(0)=0,
    y2''=2*y2'-y2'+x*exp(x)-x y2(0)=0,
    So i need to find the coefficients

    What boundary conditions do I require? y1'(0)=? y2'(0)= ?
  2. jcsd
  3. Mar 4, 2008 #2
    Pick two random values for y1'(0) and y2'(0). This will give you two solutions to the ODE.
    Then y = a*y1 + b*y2 is also a solution.
    You know that y1(0)=0 and y(2) =0, so ay1(0)+by2(0)=0. So fix a = 1, and pick b such that y1(2) + b*y2(2) = y(2).
    So b = (y(2) - y1(2)) / y2(2), where y1(2) and y2(2) are the result of shooting with arbitrary guesses for y1'(0) and y2'(0).
  4. Mar 5, 2008 #3
    Okay so say if I choose y1'(0)=1 and y2'(0)=2

    y'=ay1'+by2' =>
    => a=-2*b


    y2(2)=-4/b +2y1(2)



    => 3by1(2)=0
    b or y1(2) is 0.

    This correct so far?
    Last edited: Mar 5, 2008
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook