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: Euler's Method

  1. Jun 8, 2012 #1
    1. The problem statement, all variables and given/known data

    I have some trouble understanding the following solved problem:

    http://img808.imageshack.us/img808/3340/euler2.jpg [Broken]

    This is the solutions they have given us:

    [itex]E(32 \ steps) = 0.00097030[/itex]

    [itex]E(64 \ steps) = 0.00003202[/itex]

    32 steps has h=0.625

    64 steps has h= 0.03125

    The formula for effective order at stepsize h is

    [itex]q= \frac{\ln |E(2h)|- \ln |E(h)|}{\ln 2}[/itex]

    [itex]\therefore q (0.03125)= \frac{\ln |E(0.625)|- \ln |E(0.03125)|}{\ln 2} \approx 4.92[/itex]

    3. The attempt at a solution

    So I don't understand how they figured out that 32 steps has a step size of 0.625? What is the relationship between the stepsize and number of steps? :confused:

    I used to think that step size and the number of steps were related like this:

    [itex]h = \frac{1}{step \ size}[/itex]

    But using this, for 32 steps I get a step size of h=1/32=0.03125, and for 64 steps I get h=1/64=0.0156. The only way I can get the correct answer is to multiply the denominator by 2, but why should I do that?

    So, what's the problem with what I'm doing? Is my method wrong, or is that a typo in the given answers?
    Last edited by a moderator: May 6, 2017
  2. jcsd
  3. Jun 8, 2012 #2
    The problem states that y(1) = -1, and the solutions are at t=3.
    The step size would be the change in t divided by the number of steps.
  4. Jun 9, 2012 #3
    But still I don't get the correct answer. The correct answer says:

    And if I divide the change in t by the number of steps I get



    How come for 32 steps I got a different answer?
  5. Jun 9, 2012 #4
    I'm not sure. It's weird that the number they gave is off by a factor of 10, but the one for 64 is correct. Is it possible it's a typo?
  6. Jun 9, 2012 #5
    Yes. But are you sure in order to find the step size from the number of steps we have to divide the change in t by the number of steps? If that's the correct method then I think that may be a typo.
  7. Jun 9, 2012 #6


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Yes, Villyer is correct, and that's a typo.
  8. Jun 9, 2012 #7
    Okay thank you very much for the confirmation. And thanks a lot Villyer!!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook