Question

Question 4 A mathematical model has been described by an engineer into the following differential equation: dy 0.5x0 dx y(0)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) Euler’s Method to solve ODE

y – y’ + 0.5x = 0

i.e    y’ = y + 0.5x ;             at xo = 0, y0 = 2.5

thus, f(x,y) = y + 0.5x

for h = 0.5

at xo = 0, y0 = 2.5

Now, f(xo , y0 )= 2.5 + 0.5(0) = 2.5

At x1 = 0.5,          y1 = y0 +h[f(xo , y0 )] = 2.5 + 0.5(2.5) = 3.75

Now, f(x1 , y1 ) = 3.75 + 0.5(0.5) = 4

At x2 = 1,              y2 = y1 +h[f(x1 , y1 )] = 3.75 + 0.5(4) = 5.75

We continue iterating in excel and tabulate the result below

x f(x,y) y
0 2.5 2.5
0.5 4 3.75
1 6.25 5.75
1.5 9.625 8.875
2 14.6875 13.6875
2.5 22.2813 21.0313
3 33.6719 32.1719

35 30 25 20 15 10 0.5 1.5 2.5 3.5

b) Runge Kutte of t order

y – y’ + 0.5x = 0

i.e    y’ = y + 0.5x ;            

thus, f(x,y) = y + 0.5x

Given : xo = 0, y0 = 2.5     and h =0.5

Iteration 1: at x = x0 + h = 0+0.5 = 0.5

K1 =hf(x0 , y0) = 0.5[2.5 + 0.5 (0)] = 1.25

K2 =hf(x0 +h/2, y0 + k1 /2) = 0.5 *f(0.25, 3.125) = 1.625

K3 =hf(x0 +h/2, y0 + k2 /2) =0.5 *f(0.25, 3.3125) = 1.71875

K4 =hf(x0 +h, y0 + k3 ) = 0.5 *f(0.5, 4.21875) = 2.2344

y1 = y0 + 1/ 6 (k1 + 2k2 + 2k3 + k4) = 2.5 + 1/6 (1.25 + 2x1.625 + 2x1.7188 + 2.2344) = 4.1953

We carry on with further iteration in excel and the results are as shown below:

x y k1 x0 + h/2 y0+k1/2 k2 yo+k2/2 k3 x0+h y0+k3 k4
0 2.5000 1.2500 0.2500 3.1250 1.6250 3.3125 1.7188 0.5000 4.2188 2.2344
0.5 4.1953 2.2227 0.7500 5.3066 2.8408 5.6157 2.9954 1.0000 7.1907 3.8453
1 7.1520 3.8260 1.2500 9.0650 4.8450 9.5746 5.0998 1.5000 12.2518 6.5009
1.5 12.1881 6.4691 1.7500 15.4227 8.1488 16.2625 8.5688 2.0000 20.7569 10.8784
2 20.6519 10.8260 2.2500 26.0649 13.5949 27.4494 14.2872 2.5000 34.9391 18.0946
2.5 34.7660 18.0080 2.7500 43.7701 22.5725 46.0523 23.7137 3.0000 58.4797 29.9898
3 58.1944

70.0000 60.0000 50.0000 40.0000 30.0000 20.0000 10.0000 0.0000 0.5 2.5 3.5

c) The curve y(x) is a smooth second degree curve in both the solutions

Runge Kutta method gives a much smoother approximation of the solution as compared to the Euler's method.

Add a comment
Know the answer?
Add Answer to:
Question 4 A mathematical model has been described by an engineer into the following differential equation: dy 0.5x0 dx...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT