Please Help With Euler's Method?

VictimOfCalculus

New member
Joined
Dec 26, 2010
Messages
2
Hello!

I've been having trouble with an Euler's Method problem. Here it is;

a) Given the differential equation y[sup:1wdbb3wj]I[/sup:1wdbb3wj]=y+x with the initial condition that y(0)=1. Use Euler's method with h=0.4 to approximate y(2).
b) Verify that y=2e[sup:1wdbb3wj]x[/sup:1wdbb3wj]-x-1 is the exact solution to the initial value problem in part (a)
c) What is the amount of error for your approximation in part (a)?

I've used excel to solve part (a). The answer was 7.75648 (I know this is right because I double checked with my teacher). For part (b), I substituted 2 for x. Here's my work for part (b);

Y=2e[sup:1wdbb3wj]x[/sup:1wdbb3wj]-x-1
Y(2)=2e[sup:1wdbb3wj]2[/sup:1wdbb3wj]-2-1
Y=11.77811

Part (c), however, I don't know how to solve. I'm not sure what formula to use for error, so any help would be greatly appreciated =] Thanks guys!
 
VictimOfCalculus said:
Hello!

I've been having trouble with an Euler's Method problem. Here it is;

a) Given the differential equation y[sup:2ol6bcvq]I[/sup:2ol6bcvq]=y+x with the initial condition that y(0)=1. Use Euler's method with h=0.4 to approximate y(2).
b) Verify that y=2e[sup:2ol6bcvq]x[/sup:2ol6bcvq]-x-1 is the exact solution to the initial value problem in part (a)
c) What is the amount of error for your approximation in part (a)?

I've used excel to solve part (a). The answer was 7.75648 (I know this is right because I double checked with my teacher). For part (b), I substituted 2 for x. Here's my work for part (b);

Y=2e[sup:2ol6bcvq]x[/sup:2ol6bcvq]-x-1

for part (b) you need to show that the function above satisfies the given ODE and the initial condition. To do that:

y' = 2e[sup:2ol6bcvq]x[/sup:2ol6bcvq] - 1

= (2e[sup:2ol6bcvq]x[/sup:2ol6bcvq]-x-1) + x

= y + x <<< satisfies ODE

and

y(0) = 2e[sup:2ol6bcvq]0[/sup:2ol6bcvq] - 0 - 1 = 2*1 - 1 = 1 <<< satisfies the initial condition



Y(2)=2e[sup:2ol6bcvq]2[/sup:2ol6bcvq]-2-1
Y=11.77811 <<< the error is the difference between this value and the value approximated through numerical analysis

Part (c), however, I don't know how to solve. I'm not sure what formula to use for error, so any help would be greatly appreciated =] Thanks guys!
 
Top