Question on Euler's method - Calculations using rounded numbers? HELP

In summary, when using Euler's Method with a step size of 0.2 to determine y(1.6) for the given differential equation dy/dx=ln(2y+x) and initial condition y(1)=1.2, it is important to record the results to 5 decimal places at each step. However, in the actual calculations, it is necessary to use the full values displayed on the calculator, as rounding to 5 decimal places can lead to accumulating rounding errors.
  • #1
joshuad
5
0

Homework Statement



Taking step size h = 0.2, use Euler’s Method to determine y(1.6), given that
dy/dx = ln(2y+x) ; y(1)=1.2
Record your results to 5 decimal places at each step.

Homework Equations



N/A

The Attempt at a Solution



My question is to do with the method, not the solution, specifically the 'Record your results to 5 decimal places at each step' part. I know that basically you need to use 2 iterations to get an approximation for y(1.6). In the calculations themselves do I use the full values displayed on my calculator, or do I use the value rounded to 5 decimal places?

For example:

y'(1,1.2) = 1.22377543162

then to get y(1.2) we use y[n+1] = y[n] + hy'[n]

so y(1.2) = 1.2 + 0.2( y'[n] )

My question is at this point, do I use 1.22377543162 -or- do I use 1.22378 for y'[n] to calculate y(1.2)?

Please Help! :)
 
Physics news on Phys.org
  • #2
You are always using rounded values in this sort of calculation - proceed as normal.
Record 5dp ... but calculate to all the dp you have.
 
  • #3
So I would write down (in this case) y'[n]=1.22378 in my table, but actually use 1.22377543162 in the calculation to work out y(1.2)?
 
  • #4
That's right - you are over thinking this ... imagine your calculator gave you 1000 digits each time, would you want to write them all down?
I use GNU Octave - it does its calculations to 8dp, but only actually reports 4dp.
At each stage it stores the whole precision numbers and uses the whole precision in calculations.

Write down 5dp, but use all the dp in the next iteration.
Otherwise you'll accumulate rounding errors.

If you are still nervous, do it both ways and see what difference it makes.
 
  • Like
Likes 1 person

1. What is Euler's method?

Euler's method is a numerical method used to approximate solutions to differential equations. It involves using a step-by-step process to calculate an estimated value for the solution at each step.

2. How does Euler's method work?

Euler's method works by using the derivative of the function at a given point to estimate the value of the function at the next point. This is done by using the slope of the tangent line at the current point to approximate the change in the function over a small interval.

3. Why are rounded numbers used in calculations for Euler's method?

Rounded numbers are used in calculations for Euler's method because it is a numerical method and therefore involves performing calculations with numbers that are not exact. Rounding helps to simplify the calculations without significantly affecting the accuracy of the final result.

4. What are the potential sources of error when using Euler's method with rounded numbers?

The potential sources of error when using Euler's method with rounded numbers include truncation error, which occurs due to the use of discrete steps instead of a continuous function, and rounding error, which occurs due to the use of rounded numbers in the calculations.

5. How accurate are the results obtained from using Euler's method with rounded numbers?

The accuracy of the results obtained from using Euler's method with rounded numbers depends on the size of the step used and the complexity of the function being approximated. Generally, the smaller the step, the more accurate the results will be. However, even with small steps, there may still be some error due to the use of rounded numbers.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
276
  • Calculus and Beyond Homework Help
Replies
1
Views
287
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Differential Equations
2
Replies
40
Views
540
  • Calculus and Beyond Homework Help
Replies
4
Views
701
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
Back
Top