<< Chapter < Page Chapter >> Page >
Eigenvalues from Euler's equations.
Semi-log plot of error in computing eigenvalues from Euler's equation.
Comparison of eigenvalues from Euler's density and uniform density.

In computing the results which are reported starting in "Numerical Results" , various techniques were used. Some techniques were successful and other techniques failed to give the desired or expected results, which led to alternate techniques being tried. A short description of our methods, including a description of spectral discretization, is given in the next section.

Numerical methods

When we began gathering the data included here in our results, we started by programming the q ( t ) in [link] from [link] into MATLAB. Our next goal was to find the ρ ( x ) from these potential functions. We started by assuming x [ 0 , 1 ] and used a uniform grid to solve the ODE from the Liouville transformation [link] with forward Euler and the change of variables for t [link] with composite trapezoid quadrature. Briefly, forward Euler gives a numerical approximation to the solution of the initial value problem

a ' = f ( a , b ) , a ( b 0 ) = a 0

through the formula

a n + 1 = a n + h f ( a n , b n )

where h = b n + 1 - b n [link] . In order to facilitate finding the eigenvalues, we attempted to incorporate a Chebyshev grid for x into the uniform grid. This is when we became aware something was not working properly. In an attempt to find the problem, we output the value of t at each step, and we realized for some choices of μ 1 and initial conditions, when x reached 1, t might be much less than 1 or even greater than 1. We had two choices at this point, we could choose values of μ 1 and initial conditions and find the necessary value of x which would result in t being within some tolerance of 1 or we could solve the ODE in t instead of x . This second method is how we chose to continue our exploration.

With a uniform grid over t [ 0 , 1 ] and given μ 1 , ρ ( 0 ) , and ρ ' ( 0 ) we used forward Euler to solve the ODE [link] and then implemented the change of variables. This resulted in strings of various lengths depending on the choice of μ 1 , ρ ( 0 ) , and ρ ' ( 0 ) . These are illustrated in [link] .

We made the choice to restrict to strings of unit length and ρ ( 0 ) = 1 . To facilitate this choice, we included a bisection solver to find the necessary value of ρ ' ( 0 ) for a given μ 1 that results in a string of length 1. After this determination is made, the resulting graphs are illustrated in [link] .

For a given μ 1 by changing the choice of ρ ( 0 ) , with the necessary value of ρ ' ( 0 ) being determined to result in a unit string, the isospectral graphs, graphs with the same Dirichlet spectrum, are produced (seen in [link] ).

To compute the eigenvalues and eigenfunctions, we wanted to use spectral discretization, but because our method solves the ODE in t , we could not choose at which x values we would have values for ρ ( x ) . To overcome this, we used the MATLAB function "interp1" and used a cubic spline interpolation to find ρ at the Chebyshev grid x values from the values we did have from solving the ODE in t . Then, after adjusting the differential operator matrix, D , and ρ matrix, B , for the Dirichlet boundary conditions, we used the MATLAB function "eig" to solve for M , the diagonal matrix of generalized eigenvalues, and V , a full matrix of corresponding eigenvectors, in the generalized eigenvalue problem, D 2 * V = M * B * V (from - y ' ' ( x ) = λ ρ ( x ) y ( x ) ). The eigenvalues were sorted, and the eigenvectors were sorted correspondingly, to produce the figures in this paper.

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