Pre-Engineering 220 Introduction to MatLab ® & Scientific Programming j kiefer



Download 8.69 Mb.
Page112/128
Date02.05.2018
Size8.69 Mb.
#47255
1   ...   108   109   110   111   112   113   114   115   ...   128

b. Euler’s Method

Let’s keep just the first two terms of the Taylor’s series: , where the To is the sum of all the terms we’re dropping—call it the truncation error. In what follows, we will have to distinguish between the correct or exact solution, x(t), and our approximate solution, xi. We hope .
With the Euler Method, our algorithm is [given to, x(to) = xo and f(x,t)]











example: , with to = 0 and xo = 4 and .

The algorithm is: .
The first few steps in the numerical solution are shown in the following table.

i

t

x

0

0

4

1

.5

4

2

1

7.25

3

1.5

13.75

4

2

23.5








Download 8.69 Mb.

Share with your friends:
1   ...   108   109   110   111   112   113   114   115   ...   128




The database is protected by copyright ©ininet.org 2024
send message

    Main page