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

Click For Summary
In the discussion about using Euler's Method to calculate y(1.6), the main focus is on whether to round intermediate results to five decimal places or use full precision during calculations. It is advised to record results to five decimal places for clarity but to utilize the full precision values in calculations to avoid rounding errors. Participants emphasize that while it’s acceptable to round for presentation, maintaining accuracy in calculations is crucial. Using software like GNU Octave can help manage precision automatically. Ultimately, it is recommended to perform calculations with full precision and only round the final results.
joshuad
Messages
5
Reaction score
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
You are always using rounded values in this sort of calculation - proceed as normal.
Record 5dp ... but calculate to all the dp you have.
 
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)?
 
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
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
4
Views
4K