16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

132 CHAPTER 3. LINEAR ODE MODELS<br />

is a linear combination of a Bessel function of the ¯rst kind (BesselJ(m; x)) and<br />

of the second kind (BesselY(m; x)), with C1 and C2 arbitrary constants. In<br />

traditional mathematical notation, the Bessel functions are written as Jm(x)<br />

and Ym(x), m being referred to as the order of the Bessel function. Highlighting<br />

BesselJ(m; x) orBesselY(m; x) on the computer screen will open a Help page<br />

with some (but not much) information about these special functions.<br />

If you wish to know what other special functions are known to Maple, execute<br />

the following inifcns (initially known mathematical functions) command<br />

line and use the hyperlinks provided in the lengthy list of functions. Remember<br />

to close the Help page when you're done.<br />

> ?inifcns;<br />

The Bessel functions are actually in¯nite Frobenius power series solutions of<br />

the Bessel ODE, i.e., a series expansion about x = 0 is sought of the form<br />

y(x) = P1 m=0 cm xm+s . The allowed values of the index s and the forms of the<br />

coe±cients cm are determined5 by substituting y(x) intotheBesselODE.<br />

The series command can be used to obtain the form of the Frobenius series.<br />

For example, since the most commonly occurring order in physical problems<br />

involves positive-integer values of m, Jennifer calculates the Frobenius series of<br />

Jm(x) form = 0 to 2, terms of order x8 and higher being omitted here.<br />

> seq(J[m]=series(BesselJ(m,x),x=0,8),m=0..2);<br />

J0 =1¡ 1<br />

4 x2 + 1<br />

64 x4 ¡ 1<br />

2304 x6 +O(x8 );<br />

J1 = 1 1<br />

x ¡<br />

2 16 x3 + 1<br />

384 x5 ¡ 1<br />

18432 x7 +O(x8 );<br />

J2 = 1<br />

8 x2 ¡ 1<br />

96 x4 + 1<br />

3072 x6 +O(x8 )<br />

Note that at x =0,wehaveJ0 =1andJ1 = J2 =0. Asiseasilycon¯rmedby<br />

increasing the range of m in the seq command, Jm(0) = 0 for m =3; 4 :::<br />

Looking at the above truncated series does not convey much of an idea of<br />

the shapes of J0(x), J1(x), and J2(x). Jennifer will now plot these functions<br />

and attach appropriate identifying labels to each curve. First, in the graph gr1<br />

she plots Jm(x) overtherangex =0to20form =0to2.<br />

> gr1:=plot(fseq(BesselJ(m,x),m=0..2)g,x=0..20,thickness=2):<br />

She uses the textplot command in gr2 to place appropriate labels on the<br />

Bessel function curves. The horizontal and vertical coordinates of the names<br />

(entered as strings) were determined by observing the picture generated by gr1.<br />

> gr2:=textplot([[1.5,0.9,"J0"],[3,0.6,"J1"],[5,0.4,"J2"]]):<br />

The two graphs are superimposed to yield Figure 3.6.<br />

> display(fgr1,gr2g,tickmarks=[2,2]);<br />

The Jm(x) are oscillatory with amplitudes that decrease with increasing x.<br />

Unlike sin(x) orcos(x), the Jm(x) do not cross the horizontal axis at equal<br />

5 A recipe is given in <strong>Computer</strong> <strong>Algebra</strong> <strong>Recipes</strong> for Mathematical Physics [Enn05].

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

Saved successfully!

Ooh no, something went wrong!