Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


(ii) To orderh^4 ,

yi+1=yi+^16 (c 1 +2c 2 +2c 3 +c 4 ), (27.80)

where

c 1 =hf(xi,yi),

c 2 =hf(xi+^12 h, yi+^12 c 1 ),
c 3 =hf(xi+^12 h, yi+^12 c 2 ),

c 4 =hf(xi+h, yi+c 3 ).

27.6.5 Isoclines

The final method to be described for first-order differential equations is not so


much numerical as graphical, but since it is sometimes useful it is included here.


The method, known as that ofisoclines, involves sketching for a number of


values of a parametercthose curves (the isoclines) in thexy-plane along which


f(x, y)=c, i.e. those curves along whichdy/dxis a constant of known value. It


should be noted that isoclines are not generally straight lines. Since a straight


line of slopedy/dxat and through any particular point is a tangent to the curve


y=y(x) at that point, small elements of straight lines, with slopes appropriate


to the isoclines they cut, effectively form the curvey=y(x).


Figure 27.6 illustrates in outline the method as applied to the solution of

dy
dx

=− 2 xy. (27.81)

The thinner curves (rectangular hyperbolae) are a selection of the isoclines along


which− 2 xyis constant and equal to the corresponding value ofc. The small


cross lines on each curve show the slopes (=c) that solutions of (27.81) must


have if they cross the curve. The thick line is the solution for whichy=1at


x= 0; it takes the slope dictated by the value ofcon each isocline it crosses. The


analytic solution with these properties isy(x)=exp(−x^2 ).


27.7 Higher-order equations

So far the discussion of numerical solutions of differential equations has been


in terms of one dependent and one independent variable related by a first-order


equation. It is straightforward to carry out an extension to the case of several


dependent variablesy[r]governed byRfirst-order equations:


dy[r]
dx

=f[r](x, y[1],y[2],...,y[R]),r=1, 2 ,...,R.

We have enclosed the labelrin brackets so that there is no confusion between,


say, the second dependent variabley[2]and the valuey 2 of a variableyat the

Free download pdf