Solving Euler's Method: Accuracy of y_100 = 3.1515

In summary, the conversation discusses the use of Euler's method to approximate pi with a step size of 0.01 and n = 100. The final value obtained is higher than pi, and it is mentioned that using different values of h will not give an approximation to pi but rather to 4*arctan(h*n). It is also mentioned that the method will converge with a small enough step size, but there is confusion about how to approach the problem with the given directions.
  • #1
bl4ke360
20
0

Homework Statement



http://img853.imageshack.us/img853/5578/euler.png

Homework Equations



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

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:
Physics news on Phys.org
  • #2
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:
  • #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.
 
  • #4
bl4ke360 said:
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.

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.
 
  • #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.
 
  • #6
bl4ke360 said:
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.

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.
 

1. What is Euler's method and how does it work?

Euler's method is a numerical method used to approximate the solution to a differential equation. It works by breaking down the problem into small intervals, calculating the slope at each interval, and using this information to estimate the value of the function at a given point.

2. How accurate is Euler's method in solving differential equations?

The accuracy of Euler's method depends on the step size used and the smoothness of the function being approximated. Generally, the smaller the step size, the more accurate the approximation will be. However, Euler's method is a first-order method, meaning that the error between the approximation and the true solution will decrease linearly with the step size.

3. What is the significance of y_100 = 3.1515 in the context of solving Euler's method?

y_100 = 3.1515 represents the estimated value of the function at a specific point, in this case, the 100th interval. It is used to evaluate the accuracy of Euler's method and compare it to the true solution of the differential equation.

4. How can the accuracy of Euler's method be improved?

The accuracy of Euler's method can be improved by decreasing the step size. Additionally, using higher-order numerical methods such as the Runge-Kutta method can also improve the accuracy of the approximation.

5. Can Euler's method be used to solve all types of differential equations?

Euler's method is most commonly used for solving first-order differential equations. However, it can also be used for higher-order differential equations by converting them into a system of first-order equations. It may not always be the most accurate method, so it is important to consider other numerical methods when solving more complex differential equations.

Similar threads

Replies
7
Views
2K
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
712
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Differential Equations
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
Back
Top