Let dy/dx=xy . Use Euler's method with step size of 0.5 and the initial condition of y(0) = 3 to estimate y(2).

I really am not sure if I did this right, but I got 3.4568 for y(2). I actually feel like it is wrong.

initial x = 0

Y(0) = 3
delta y = x y delta x
= (0)(3)(.5) = 0
so y(.5) = 3 + 0 = 3

Y(.5) = 3
delta y = (.5)(3)(.5) = .75
Y(1) = 3 + .75 = 3.75

Y(1) = 3.75
delta y = 1 (3.75)(.5) = 1.875
Y(1.5) = 3.75+1.875 = 5.625

Y(1.5) = 5.625
delta y = 1.5(5.625).5 = 4.22
Y(2) = 5.625 + 4.22 = 9.84

This is tedious work

I found an excellent youtube for you where they solve a problem very similar to yours.
I assume your text or your notes contain the basic original formula for Euler's Method

I suggest you pause the video at critical points and make the necessary changes for your problem

(There are other youtubes on the right column for similar questions)

https://www.youtube.com/watch?v=nYXclUjpFaw

That Anonymous is me, Damon.

By the way there are lots of Euler methods. I took the first order one by default because you did not specify.

now let's see how we did

dy/dx = x y

dy/y = x dx

ln y = x^2/2

y = C e^(x^2/2)
when x = 0, y = 3
so
y = 3 e^(x^2/2)
when x = 2
y = 3 e^2 = 22.1

graph all that and you will see that Euler slopes slant way below the real exponential curve. You need a higher order method to do this.

There are many of these videos at http://www.khanacademy.org, too.

http://www.google.com/search?q=euler+methods+khanacadem.org&oq=euler+methods+khanacadem.org&aqs=chrome..69i57.6983j0j7&sourceid=chrome&es_sm=119&ie=UTF-8

To use Euler's method to estimate y(2) with a step size of 0.5, you can follow these steps:

1. Start with the initial condition: y(0) = 3.
2. Choose a step size of 0.5. This means you will break the interval [0, 2] into four subintervals: [0, 0.5], [0.5, 1], [1, 1.5], and [1.5, 2].
3. Use the given differential equation, dy/dx = xy, to calculate the slope at each point. Let's go step by step:

a. For the first interval [0, 0.5]:

- Use the initial condition: y(0) = 3.
- Calculate the slope at x = 0 using the given differential equation: (0)(3) = 0.
- Multiply the slope by the step size: 0 * 0.5 = 0.
- Add the resulting value to the initial y-value: 3 + 0 = 3.
- This gives you the estimated y-value at x = 0.5, which will be the initial y-value for the next interval.

b. Repeat for the second, third, and fourth intervals, updating the y-value at each step:

For the interval [0.5, 1]:
- Initial y-value: 3 (from the previous step)
- Slope at x = 0.5: (0.5)(3) = 1.5
- (1.5)(0.5) = 0.75
- Updated y-value at x = 1: 3 + 0.75 = 3.75

For the interval [1, 1.5]:
- Initial y-value: 3.75 (from the previous step)
- Slope at x = 1: (1)(3.75) = 3.75
- (3.75)(0.5) = 1.875
- Updated y-value at x = 1.5: 3.75 + 1.875 = 5.625

For the interval [1.5, 2]:
- Initial y-value: 5.625 (from the previous step)
- Slope at x = 1.5: (1.5)(5.625) = 8.4375
- (8.4375)(0.5) = 4.21875
- Updated y-value at x = 2: 5.625 + 4.21875 = 9.84375

4. Your estimated value for y(2) using Euler's method with a step size of 0.5 and the given initial condition of y(0) = 3 is approximately 9.84375.

It seems like your answer of 3.4568 for y(2) is incorrect. Please double-check your calculations.