# Thread: Euler's Method to approximate

1. ## Euler's Method to approximate

Guys, i wanna understand this problem , i don't know how to do this. Please guide me.

Given the initial value problem: dy/dx = y, y(0)=1. Do the following.
1. Solve the initial value problem and show that e = y(1).
2. Apply Euler's method with h = 0.25 to approximate e =y(1).
3. Apply Improved Euler's method with h = 0.5 to approximate e = y(1).
4. Apply Runge-Kutta method with h = 1 to approximate e = y(1).
5. Find the errors of the above approximations of e. Which approximation is the best?

2. Originally Posted by DMDil
Guys, i wanna understand this problem , i don't know how to do this. Please guide me.

Given the initial value problem: dy/dx = y, y(0)=1. Do the following.
1. Solve the initial value problem and show that e = y(1).
2. Apply Euler's method with h = 0.25 to approximate e =y(1).
3. Apply Improved Euler's method with h = 0.5 to approximate e = y(1).
4. Apply Runge-Kutta method with h = 1 to approximate e = y(1).
5. Find the errors of the above approximations of e. Which approximation is the best?
Well what have you done, where are you stuck?

For 1. you have to solve the initial value ptoblem, which you should be able to do as it is of variables seperable type.

CB

3. Originally Posted by DMDil

Given the initial value problem: dy/dx = y, y(0)=1. Do the following.
1. Solve the initial value problem and show that e = y(1).
This is probably one of the easiest DEs to solve

$\frac{dy}{dx}=y$

$\frac{dy}{y}=dx$

$\ln(y)=x+c$

$y=e^{x+c}$

$y=Ae^{x}$

you are given $y(0)=1$ therefore

$1=Ae^{0}$

$A=1$ and this means

$y=e^{x}$ to show $y(1)=e$

$y(1)=e^{1}$

$y(1)=e$

Originally Posted by DMDil
Given the initial value problem: dy/dx = y, y(0)=1. Do the following.

2. Apply Euler's method with h = 0.25 to approximate e =y(1).
3. Apply Improved Euler's method with h = 0.5 to approximate e = y(1).
4. Apply Runge-Kutta method with h = 1 to approximate e = y(1).
5. Find the errors of the above approximations of e. Which approximation is the best?
The rest of these questions 2,3 & 4 involve different numerical schemes. Q5 is asking which one is the most accurate compared with your answer to Q1 of $y(1)=e$.

4. Originally Posted by pickslides
This is probably one of the easiest DEs to solve

..snippagio..
That is the point of letting him/her solve it himself, if being told it is of variables separable type s/he can't continue it is better that s/he tells us so we can diagnose the problem rather than provide a sample which s/he might think s/he understands but has only skimmed.

CB

5. Fair call CB, point taken

although after reading the question I went on the assumption that the poster is doing a course in numericals solutions to DEs. Therefore my solution to part 1 would have only been consequential and assumed knowledge for such a course. If anything I was hoping my assitance would've only acted as a reminder.

6. yeah i was able to figure it out..it takes so many tries to figure out the close approximation...,