Euler's method for numerical approximation

Click For Summary
The discussion focuses on using Euler's method to approximate solutions for the differential equation y' = 3 + t - y with the initial condition y(0) = 1. In part A, the user successfully calculates values at t = 0.1, 0.2, 0.3, and 0.4 using a step size of h = 0.1. However, in part B, with a smaller step size of h = 0.05, the user struggles to obtain the correct values, specifically for Y1, which they calculate as 1.1 instead of the expected 1.1975. The error stems from not accounting for the increased number of steps required with the smaller step size, which leads to a misunderstanding of the iterative process. Correctly applying the Euler formula with the new step size yields more accurate results.
Chandasouk
Messages
163
Reaction score
0
y' = 3 + t - y, y(0) = 1

A) Find the approximate values of the solution of the given initial value problem at t = 0.1, 0.2, 0.3, 0.4 using the Euler method with h = 0.1.

B) Repeat part A with h = 0.05. Compare the results found in A.

I did part A correctly, but cannot get the right numbers for part B when I use the step size 0.05.

For part A, I did the following
(t0=0, y0=1)

Y1 = y0+f(t0,y0)*h = 1 + f(0,1)(0.1) = 1.2

Similarly,

Y2=y1+f(t1,y1)*h=1 + f(0.1,1.2)(0.1) = 1.39

Etc, etc.

However when I do part B, where h = 0.05, and try calculating Y1

Y1 = y0+f(t0,y0)*h = 1+f(0,1)(0.05) = 1.1

The answer in my book is 1.1975

What am I doing wrong?
 
Physics news on Phys.org
Chandasouk said:
However when I do part B, where h = 0.05, and try calculating Y1

Y1 = y0+f(t0,y0)*h = 1+f(0,1)(0.05) = 1.1

The answer in my book is 1.1975

What am I doing wrong?
Everything seems to be correct in what you have posted so far. Remember, $ y_{n}=y_{n-1}+f(t_{n-1},y_{n-1})*h$ is an approximation of the value of y(t) at t=n*h.
 
The general Euler forumla is:
<br /> y_{i+1}=y_{i}+y&#039;(y_{i},t_{i})h<br />
so take h=0.05 to obtain:
<br /> y_{0.05}=1+0.05*(3+0-1)=1.1<br />
Now to calculate y at 0..1:
<br /> y_{0.1}=1.1+0.05*(3+0.05-1.1)=1.1925<br />
 
Oh, thanks. I forgot to account for the step size change, meaning you take more steps to get to 0.1 now.
 
Last edited:
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
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K