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!

Euler's Method

  1. Mar 13, 2013 #1
    1. The problem statement, all variables and given/known data

    http://img853.imageshack.us/img853/5578/euler.png [Broken]


    2. Relevant equations

    y_(n+1)=y_n+f(x_n,y_n)h

    3. The attempt at a solution

    With n = 100 and step size h = 0.01, I got y_100 = 3.1515

    I don't see how this is right, because the directions imply that it's supposed to be accurate to pi within 4 decimal places, but this last value is higher than pi. Also what does it mean by using different values of h, and still keeping n = 100? That doesn't make any sense because then it wouldn't evaluate up to y(1) = pi.
     
    Last edited by a moderator: May 6, 2017
  2. jcsd
  3. Mar 13, 2013 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Euler's method isn't all that accurate. It doesn't give you pi that accurately with 100 steps as you found. I don't know what they mean by using different values of h either. That won't give you an approximation to pi, it will give you an approximation to 4*arctan(h*n). May just be a badly written question. They might just mean how small does h have to be to give you a good appoximation to pi after 1/h steps.
     
    Last edited: Mar 13, 2013
  4. Mar 13, 2013 #3
    This problem is 10% of my final grade (and due tomorrow) so I want to make sure I'm doing it correctly. From the directions it says it's supposed to converge, but it doesn't look like it does unless I'm missing something. It converges at around 6.299, with n = 100,000. I also verified it by solving the function directly after solving for it from the D.E. which is y(x)=4arctan(x). I don't see what I'm supposed to do from here.
     
  5. Mar 13, 2013 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Euler's method will converge if you use a small enough step size. Did you use n=100000 with h=1/(100000)? Though round-off errors and stability might start taking their toll. I'm not exactly sure what it expects you to do from the wording either.
     
  6. Mar 13, 2013 #5
    I see what you mean now, but since I only have to go to n=100 I guess I don't have to worry about that here. But I don't know if I'm supposed to change the step size partially into it, or do a separate run of euler's method with a different step size. Since the directions says to use only one table, I would assume the I have to change the step size before n reaches 100, but that doesn't make any sense to me.
     
  7. Mar 13, 2013 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    That's the problem with the question. You won't get to x=1 and pi if you only change the step size and not n.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Euler's Method
  1. Euler's Method (Replies: 4)

  2. Euler's method? (Replies: 2)

  3. Euler's method (Replies: 1)

  4. Euler's method (Replies: 1)

  5. Euler's Method (Replies: 6)

Loading...