• Support PF! Buy your school textbooks, materials and every day products Here!

Use the Euler method?

  • Thread starter Success
  • Start date
  • #1
75
0

Homework Statement


Use the Euler method with h=0.05 to find approximate values of y'=3+t-y, y(0)=1 at t=0.1, 0.2, 0.3, and 0.4.


Homework Equations


I don't even know what formula and how to use it.


The Attempt at a Solution


The answers are 1.1975, 1.38549, 1.56491, 1.73658.
 

Answers and Replies

  • #2
40
0
Euler's method is a recursive method. In general, it is best to understand what you're actually doing than to memorize the equations. In Euler's method, you essentially get an estimate of y' and use that to estimate y at future values.

At t=0, y=1 (given), and thus, y'(0)=3+0-1=2. In the next h seconds, you would expect y to increase by y' * h. Thus, we say y(x+h)=h*y'(x)+y(x). We get that y(0.05)=0.05*y'(0)+y(0)=1.1. our new value of y'(0.05)=3+0.05-y(0.05)=1.95. Keep iterating this method to get future values of y and y'.
 
  • #3
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728

Homework Statement


Use the Euler method with h=0.05 to find approximate values of y'=3+t-y, y(0)=1 at t=0.1, 0.2, 0.3, and 0.4.


Homework Equations


I don't even know what formula and how to use it.


The Attempt at a Solution


The answers are 1.1975, 1.38549, 1.56491, 1.73658.
Are you saying that your textbook and/or course notes have nothing at all on Euler's method?
 
  • #4
20,131
4,208
You are solving a differential equation of the form:
[tex]\frac{dy}{dt}=f(y,t)[/tex]
To solve this equation numerically, you are approximating the derivative on the left hand side by:
[tex]\frac{dy}{dt}≈\frac{y(t+Δt)-y(t)}{Δt}[/tex]
But, what values of y and t do you use to substitute into the function f, the values at time t, y(t) and t, or the values at time t+Δt, y(t+Δt), t+Δt? In Euler's method you use the former, so your algebraic approximation to the differential equation becomes:
[tex]\frac{y(t+Δt)-y(t)}{Δt}=f(y(t),t)[/tex]
or, equivalently,
[tex]y_{n+1}-y_n=Δtf(y_n,nΔt)[/tex]
where n signifies the n'th time step of your calculation. In the terminology that your problem statement uses, h = Δt
 

Related Threads on Use the Euler method?

  • Last Post
Replies
1
Views
3K
Replies
5
Views
3K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
1
Views
960
Top