<< Chapter < Page Chapter >> Page >
- D 2 y ( x ) = λ ρ ( x ) y ( x ) .

A short description of spectral discretization is in "Numerical Methods" .

For the specific q in [link] , we know what the eigenvalues are supposed to be, so we can calculate them and analyze the error. Before doing so, it is interesting to consider the eigenfunctions for several ρ ( x ) obtained from different μ 1 values. [link] shows the first two eigenfunctions obtained from the numerically calculated mass density functions. When μ 1 = 9 , we see that the first two eigenfunctions resemble φ 1 ( x ) = sin ( π x ) and φ 2 ( x ) = sin ( 2 π x ) . This is to be expected because μ 1 = 9 is fairly close to π 2 9 . 9 . (When μ 1 = π 2 , we obtain q ( t ) = 0 from   [link] and therefore a string of uniform mass density, which has as its first two eigenfunctions sin ( π x ) and sin ( 2 π x ) .) Equivalently, potentials with μ 1 farthest from π 2 show eigenfunction behavior most deviant from sin ( π x ) and sin ( 2 π x ) . Interested readers can view a movie of the eigenfunctions changing as μ 1 changes from 1 to 37.4 by tenths. The behavior of the eigenfunctions as μ 1 increases changes drastically when μ 1 35 due to the first and second eigenvalues becoming close. In the following section, we discuss the error in numerically calculating the eigenvalues.

The first two eigenfunctions recovered from the mass densities shown in [link] . The first eigenfunction is shown in blue, the second in red.

Error analysis: recovering eigenvalues

The sources of error in our numerical scheme arise in part because of the highly constrained nature of the ODEs. Unless otherwise specified, the integration was completed with step size 10 - 4 . In addition to this error, we are required to interpolate between nodes to obtain the values of ρ ( x ) at the points in the Chebyshev grid. (Unless otherwise specified, all computations were executed on a Chebyshev grid of size N = 256 .) However, it should be noted that in all runs, we have a minimum of 10 4 nodes between 0 and 1. With a grid so fine, even linear interpolation to the Chebyshev points yields results with tolerable error. Because, in our case, the potential function q ( t ) was originally specified by its Dirichlet spectrum, we know the exact eigenvalues that the numerical solver should return. [link] shows the first five expected eigenvalues alongside those we recovered numerically. The error is visibly small, but indistinguishable from case to case. [link] shows the error in the first eigenvalue recovered from transformations of potential functions specified by various μ 1 . The error is smallest near μ 1 = π 2 , which is to be expected because this is the simplest case. As μ 1 gets further away from π 2 , the error increases. We also see that decreasing the time step in the ODE solver by a single order of magnitude reduces the error by a single order of magnitude. In this way, we have verified first-order convergence, which is consistent with the expected results of the forward Euler scheme used.

The first five eigenvalues of q ( t ) (blue circles) and those numerically recovered from the transformed equivalent, ρ ( x ) , x [ 0 , 1 ] (green 'x').
The error in the first eigenvalue recovered from the transformation of q ( t ) with λ ( q ) = { μ 1 , 4 π 2 , 9 π 2 , 16 π 2 , . . . } to ρ ( x ) , x [ 0 , 1 ] with varying step size.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, The art of the pfug. OpenStax CNX. Jun 05, 2013 Download for free at http://cnx.org/content/col10523/1.34
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'The art of the pfug' conversation and receive update notifications?

Ask