function [ n_data, n, a, x, fx ] = laguerre_general_values ( n_data ) %*****************************************************************************80 % %% LAGUERRE_GENERAL_VALUES returns some values of the generalized Laguerre function. % % Discussion: % % In Mathematica, the function can be evaluated by: % % LaguerreL[n,a,x] % % The functions satisfy the following differential equation: % % X * Y'' + (ALPHA+1-X) * Y' + N * Y = 0 % % Function values can be generated by the recursion: % % L(0,ALPHA)(X) = 1 % L(1,ALPHA)(X) = 1+ALPHA-X % % L(N,ALPHA)(X) = ( (2*N-1+ALPHA-X) * L(N-1,ALPHA)(X) % - (N-1+ALPHA) * L(N-2,ALPHA)(X) ) / N % % The parameter ALPHA is required to be greater than -1. % % For ALPHA = 0, the generalized Laguerre function L(N,ALPHA)(X) % is equal to the Laguerre polynomial L(N)(X). % % For ALPHA integral, the generalized Laguerre function % L(N,ALPHA)(X) equals the associated Laguerre polynomial L(N,ALPHA)(X). % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 19 September 2004 % % Author: % % John Burkardt % % Reference: % % Stephen Wolfram, % The Mathematica Book, % Fourth Edition, % Wolfram Media / Cambridge University Press, 1999. % % Parameters: % % Input/output, integer N_DATA. The user sets N_DATA to 0 before the % first call. On each call, the routine increments N_DATA by 1, and % returns the corresponding data; when there is no more data, the % output value of N_DATA will be 0 again. % % Output, integer N, the order of the function. % % Output, real A, the parameter. % % Output, real X, the point where the function is evaluated. % % Output, real FX, the value of the function. % n_max = 20; a_vec = [ ... 0.00E+00, ... 0.25E+00, ... 0.50E+00, ... 0.75E+00, ... 1.50E+00, ... 2.50E+00, ... 5.00E+00, ... 1.20E+00, ... 1.20E+00, ... 1.20E+00, ... 1.20E+00, ... 1.20E+00, ... 1.20E+00, ... 5.20E+00, ... 5.20E+00, ... 5.20E+00, ... 5.20E+00, ... 5.20E+00, ... 5.20E+00, ... 5.20E+00 ]; fx_vec = [ ... 0.3726399739583333E-01, ... 0.3494791666666667E+00, ... 0.8710042317708333E+00, ... 0.1672395833333333E+01, ... 0.6657625325520833E+01, ... 0.2395726725260417E+02, ... 0.2031344319661458E+03, ... 0.1284193996800000E+02, ... 0.5359924801587302E+01, ... 0.9204589064126984E+00, ... -0.1341585114857143E+01, ... -0.2119726307555556E+01, ... -0.1959193658349206E+01, ... 0.1000000000000000E+01, ... 0.5450000000000000E+01, ... 0.1720125000000000E+02, ... 0.4110393750000000E+02, ... 0.8239745859375000E+02, ... 0.1460179186171875E+03, ... 0.2359204608298828E+03 ]; n_vec = [ ... 5, ... 5, ... 5, ... 5, ... 5, ... 5, ... 5, ... 8, ... 8, ... 8, ... 8, ... 8, ... 8, ... 0, ... 1, ... 2, ... 3, ... 4, ... 5, ... 6 ]; x_vec = [ ... 0.25E+00, ... 0.25E+00, ... 0.25E+00, ... 0.25E+00, ... 0.25E+00, ... 0.25E+00, ... 0.25E+00, ... 0.00E+00, ... 0.20E+00, ... 0.40E+00, ... 0.60E+00, ... 0.80E+00, ... 1.00E+00, ... 0.75E+00, ... 0.75E+00, ... 0.75E+00, ... 0.75E+00, ... 0.75E+00, ... 0.75E+00, ... 0.75E+00 ]; if ( n_data < 0 ) n_data = 0; end n_data = n_data + 1; if ( n_max < n_data ) n_data = 0; n = 0; a = 0.0; x = 0.0; fx = 0.0; else n = n_vec(n_data); a = a_vec(n_data); x = x_vec(n_data); fx = fx_vec(n_data); end return end