Multiple-Choice Test Euler’s Method Ordinary Differential ...

[Pages:10]Multiple-Choice Test Euler's Method Ordinary Differential Equations COMPLETE SOLUTION SET

1. To solve the ordinary differential equation

3 dy + 5y2 = sin x, y(0) = 5

dx

by Euler's method, you need to rewrite the equation as

(A) dy = sin x - 5y2, y(0) = 5

dx

( ) (B) dy = 1 sin x - 5y2 , y(0) = 5 dx 3

(C)

dy dx

=

1 3

-

cos

x

-

5y3 3

,

y(0) = 5

(D) dy = 1 sin x, y(0) = 5

dx 3

Solution The correct answer is (B).

To solve ordinary differential equations by Euler's method, you need to rewrite the equation in

the following form

dy dx

=

f (x, y),

y(0) =

y0

Thus,

3 dy + 5y2 = sin x, y(0) = 5

dx

3 dy = sin x - 5y2, y(0) = 5

dx

dy = 1 (sin ) x - 5y2 , y(0) = 5

dx 3

2. Given

3 dy + 5y2 = sin x, y(0.3) = 5

dx

and using a step size of h = 0.3 , the value of y(0.9) using Euler's method is most nearly

(A) - 35.318 (B) - 36.458 (C) - 658.91 (D) - 669.05

Solution The correct answer is (A).

First rewrite the differential equation in the proper form.

( ) dy = 1 sin x - 5y 2

dx 3

f (x, y) = 1 (sin x - 5y 2 ) 3 Euler's method is given by

yi+1 = yi + f (xi , yi )h

where h = 0.3

For i = 0 , x0 = 0.3 , y0 = 5

y1 = y0 + f (x0, y0 )h = 5 + f (0.3,5)? 0.3

( ) = 5 + 1 sin(0.3)- 5(5)2 ? 0.3 3

= 5 + (-12.470)

= -7.4704

y1 is the approximate value of y at x = x1 = x0 + h = 0.3 + 0.3 = 0.6

For i = 1, x1 = 0.6 , y1 = -7.4704

y2 = y1 + f (x1, y1 )h = -7.4704 + f (0.6,-7.4704)? 0.3

( ) = -7.4704 + 1 sin(0.6)- 5(- 7.4704)2 ? 0.3 3 = -7.4704 - 27.847

= -35.318 y2 is the approximate value of y at

x = x2 = x1 + h = 0.6 + 0.3 = 0.9

y(0.9) -35.318

3. Given

3 dy + y = e0.1x , y(0.3) = 5

dx

and using a step size of h = 0.3 , the best estimate of dy (0.9) using Euler's method is most

dx nearly

(A) - 0.37319 (B) - 0.36288 (C) - 0.35381 (D) - 0.34341

Solution The correct answer is (B).

First rewrite the differential equation in the proper form.

( ) dy = 1 e0.1x - y

dx 3

( ) f (x, y) = 1 e0.1x - y 3 Euler's method is given by

yi+1 = yi + f (xi , yi )h

where h = 0.3

For i = 0 , x0 = 0.3 , y0 = 5

y1 = y0 + f (x0 , y0 )h = 5 + f (0.3,5)? 0.3

( ) = 5 + 1 e0.1?0.3 - 5 ? 0.3 3

= 5 + (- 0.12056)

= 4.8794

y1 is the approximate value of y at x = x1 = x0 + h = 0.3 + 0.3 = 0.6

For i = 1, x1 = 0.6 , y1 = 4.8794

y2 = y1 + f (x1, y1)h = 4.8794 + f (0.6,4.8794)? 0.3

( ) = 4.8794 + 1 e0.1?0.6 - 4.8794 ? 0.3 3

= 4.8794 + (- 0.11471)

y2 is the approximate value of y at x = x2 = x1 + h = 0.6 + 0.3 = 0.9

y(0.9) 4.7647

Thus

( ) dy = 1 e0.1x - y

dx 3

( ( ) dy 0.9 1 e0.1?0.9 -

dx

3

= -0.36288

) 4.7647

4. The velocity (m/s) of a body is given as a function of time (seconds) by

v(t) = 200ln(1+ t)- t, t 0

Using Euler's method with a step size of 5 seconds, the distance traveled in meters by the body from t = 2 to t = 12 seconds is most nearly

(A) 3133.1 (B) 3939.7 (C) 5638.0 (D) 39397

Solution The correct answer is (A).

v(t) = 200ln(1+ t)- t

dS = 200ln(1+ t)- t

dt

f (t, S ) = 200ln(1+ t)- t

Euler's method is given by

Si+1 = Si + f (ti , Si )h

where h = 0.5

For i = 0 , t0 = 2 s , S0 = 0 m (assuming S0 = 0 m would make S2 the value of the distance covered, as the distance covered is S2 - S0 )

S1 = S0 + f (t0, S0 )? h = 0 + f (2,0)? 5 = 0 + (200ln(1+ 2)- 2)? 5

= 1088.6 m

t1 = t0 + h = 2+5

=7 For i = 1 , t1 = 7 s , S1 = 1088.61 m

S2 = S1 + f (t1, S1 )? h = 1088.6 + f (7,1088.6)? 5 = 1088.6 + (200ln(1+ 7)- 7)? 5

= 1088.6 + 2044.4

= 3133.1 m

S (12) - S(2) S2 - S0 = 3133.1 m

Note to the student: You do not have to assume S0 = 0 m . Instead, let it be some unknown constant, that is, S0 = C . In that case, if you follow Euler's method as above, you would get

S1 = S0 + f (t0 , S0 )? h = C + f (2,0)? 5 = C + (200ln(1+ 2)- 2)? 5

= C +1088.6 m

t1 = t0 + h = 2+5

=7 For i = 1 , t1 = 7 s , S1 = C +1088.61 m

S2 = S1 + f (t1, S1 )? h = C +1088.6 + f (7,1088.6)? 5 = C +1088.6 + (200ln(1+ 7)- 7)? 5

= C +1088.6 + 2044.4

= C + 3133.1 m

S(12) - S(2) S2 - S0 = C + 3133.1- C

= 3133.1 m

5. Euler's method can be derived by using the first two terms of the Taylor series of writing the

value of yi+1 , that is the value of y at xi+1 , in terms of yi and all the derivatives of y at xi . If

h = xi +1 - xi , the explicit expression for yi+1 if the first three terms of the Taylor series are chosen for the ordinary differential equation

2 dy + 3y = e-5x , y(0) = 7

dx

would be

( ) (A)

yi+1 =

yi

+

1 2

e-5xi

- 3yi

h

( ) (B)

yi+1

=

yi

+

1 2

e -5 xi

- 3yi

h - 1 5 e-5xi 22

h2

( ) (C)

yi+1

=

yi

+

1 2

e -5 xi

- 3yi

h+

1 - 13 e-5xi 2 4

+

9 4

yi

h2

( ) (D)

yi+1

=

yi

+1 2

e -5 xi

- 3yi

h- 3 2

yi h 2

Solution The correct answer is (C).

The differential equation

2 dy + 3y = e-5x , y(0) = 7

dx is rewritten as

( ) dy = 1 e-5x - 3y , y(0) = 7

dx 2

( ) f (x, y) = 1 e-5x - 3y 2

The Taylor series is given by

( ) ( ) ( ) yi+1

=

yi

+

dy dx

xi , yi

xi+1 - xi

+ 1 d2y 2! dx 2

xi , yi

xi+1 - xi

2 + 1 d3y 3! dx3

xi , yi

xi+1 - xi

3 + ...

yi+1

=

yi

+

f

( (xi , yi ) xi+1

-

xi ) +

1 2!

f

'(xi ,

( yi ) xi+1

-

)xi 2

+

1 3!

f

''(xi ,

( yi ) xi+1

-

)xi 3

+ ...

If we look at the first three terms of the Taylor series

( ) ( ) yi+1 = yi + f (xi , yi ) xi+1 - xi

+

1 2!

f

'(xi ,

yi )

xi+1

-

xi

2

=

yi

+

f

(xi ,

yi )h +

1 2!

f

'(xi,

yi )h2

where

h = xi+1 - xi

f (x, y) = f + f dy

x y dx

( ) ( ) = 1 - 5e-5x + - 3 1 e-5x - 3y

2

2 2

= - 13 e-5x + 9 y

4

4

then the value of yi+1 is given by

( ) yi+1

=

yi

+

1 2

e -5 xi

- 3yi

h + 1 - 13 e-5xi 2 4

+9 4

yi

h

2

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download