Eulers Method to Approximate Differential Eq.

In summary, to estimate y(1) using Euler's Method with 5 and 10 steps, we use the equation y_n+1 = y_n + h f(t_n , y_n) with a step size of 0.2 for 5 steps and 0.1 for 10 steps. The differential equation given is y'=2xy, and the answer to the DE is y(x) = e^(x^2). To get the values for f(t_n , y_n), we can use the function f(x,y)= 2xy or f(t,y)= 2ty. By plugging in the appropriate values, we can estimate y(1) to be close to e or 2.718
  • #1
brunie
62
0
(** underscores refer to subscripts)

Consider inital value problem y'=2xy, y(0) = 1
Use Eulers Methos to estimate y(1) with 5 and 10 steps.

for 5 steps, increments are by 0.2
for 10 steps, increments are by 0.1

y_n+1 = y_n + h f(t_n , y_n)

where h is step size

the answer to the DE itself is y(x) = e^(x^2)
so these estimates should be close to e or 2.7182818...

i understand how to go from steps to step but i do not understand how to get the values for f(t_n , y_n)
all the examples I've looked at only had one variable so it is hard to compare

so for

y_1 = 1 + 0.2 f(t_1 , y_1)
y_2 = y_1 + 0.2 f(t_2 , y_2)
.
.

any help is appreciated
 
Physics news on Phys.org
  • #2
brunie said:
(** underscores refer to subscripts)

Consider inital value problem y'=2xy, y(0) = 1
Use Eulers Methos to estimate y(1) with 5 and 10 steps.

for 5 steps, increments are by 0.2
for 10 steps, increments are by 0.1

y_n+1 = y_n + h f(t_n , y_n)

where h is step size

the answer to the DE itself is y(x) = e^(x^2)
so these estimates should be close to e or 2.7182818...

i understand how to go from steps to step but i do not understand how to get the values for f(t_n , y_n)

One thing that may be causing trouble is that you have your algorithm in terms of "t" and "y" but your differential equation was given in terms of "x" and "y"! Either rewrite the equation as y'= 2ty or rewrite your algorithm in terms of x and y.
In any case, you are told that f(x,y)= 2xy or that f(t,y)= 2ty.

so for

y_1 = 1 + 0.2 f(t_1 , y_1)
= 1+ 0.2 (2(0)(1))= 1

y_2 = y_1 + 0.2 f(t_2 , y_2)
= 1+ 0.2(2(.2)(1))= 1.08

y_3= 1.08+ 0.2(2(.4)(1.08)= 1.08+ .1728= 1.2528

y_4= 1.2528+ 0.2(2(.6)(1.2528))= 1.5535 ...
 
  • #3
If you are using MATLAB I have some code which can get you started.
 

Related to Eulers Method to Approximate Differential Eq.

1. What is Euler's Method?

Euler's Method is a numerical method for approximating solutions to ordinary differential equations (ODEs) using a step-by-step process. It is named after the mathematician Leonhard Euler.

2. How does Euler's Method work?

Euler's Method works by breaking down a differential equation into smaller, simpler steps. It uses the slope of the tangent line at a given point to estimate the value of the function at the next point. This process is repeated until the desired level of accuracy is achieved.

3. What are the advantages of using Euler's Method?

Euler's Method is relatively simple to understand and implement. It can also be used to approximate solutions to a wide range of differential equations, including those that cannot be solved analytically. Additionally, it can provide a good initial estimate for more advanced numerical methods.

4. What are the limitations of Euler's Method?

Euler's Method can only provide an approximate solution to a differential equation, and the accuracy of the approximation depends on the size of the step chosen. If the step size is too large, the approximation may deviate significantly from the true solution. Additionally, it is not suitable for all types of differential equations, such as those with discontinuities or highly oscillatory solutions.

5. How is Euler's Method used in real-world applications?

Euler's Method has many applications in fields such as physics, engineering, and economics. It can be used to model and analyze various systems, such as population growth, chemical reactions, and electrical circuits. It is also commonly used in computer simulations to predict the behavior of complex systems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
517
  • Calculus and Beyond Homework Help
Replies
5
Views
344
  • Calculus and Beyond Homework Help
Replies
2
Views
327
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
Replies
7
Views
2K
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
701
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Back
Top