25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

616 Chapter 20 Ordinary differential equations II

with initial condition

y(x 0

) =y 0

isEuler’s method which weshall study inthe next section.

20.6 EULER’SMETHOD

You will recall, from Chapter 12, that given a functiony(x), the quantity dy

dx represents

thegradientofthatfunction.Soif dy

dx = f (x,y)andweseeky(x),weseethatthedifferential

equation tells us the gradient of the required function. Given the initial condition

y =y 0

whenx =x 0

wecanpicturethissinglepointasshowninFigure20.10.Moreover,

we know the gradient of the solution here. Because dy

dx = f(x,y)weseethat

dy

dx∣ =f(x 0

,y 0

)

x=x0

which equals the gradient of the solution at x = x 0

. Thus the exact solution passes

through (x 0

,y 0

)andhasgradient f (x 0

,y 0

)there.Wecandrawastraightlinethroughthis

point with the required gradient to approximate the solution as shown in Figure 20.10.

Thisstraightlineapproximatesthetruesolution,butonlynear (x 0

,y 0

)because,ingeneral,

the gradient is not constant but changes. So, in practice we only extend it a short

distance,h,alongthexaxistowherex =x 1

.Theycoordinateatthispointisthentaken

asy 1

.Wenowdevelopanexpressionfory 1

.Thestraightlinehasgradient f (x 0

,y 0

)and

passes through (x 0

,y 0

). Itcan beshown thatits equation istherefore

y=y 0

+(x−x 0

)f(x 0

,y 0

)

Whenx =x 1

theycoordinate isthen given by

y 1

=y 0

+(x 1

−x 0

)f(x 0

,y 0

)

and sincex 1

−x 0

=hwe find

y 1

=y 0

+hf(x 0

,y 0

)

Thisequationcanbeusedtofindy 1

.Wethenregard (x 1

,y 1

)asknown.Fromthisknown

point the whole process isthen repeated using the formula

y i+1

=y i

+hf(x i

,y i

)

y

y(x 1 )

y 1

True solution

Tangent line

approximation

y 0

x 0 x 1 x

0

Figure20.10

Approximation usedin Euler’smethod.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!