Jump to content

User:Egm6322.s14.team2/report2

From Wikiversity

Report 2 PEA 2 Spring 2014 Team 2

[edit | edit source]

Problems are given in lecture notes Sec66a


Problem Statement

[edit | edit source]

The atomic-resolution TEM figure on [p.66b-16 ] is not obvious (not easy to see and to understand); search the literature (web, pdf papers, pdf reports, etc.) for better (good quality) figure(s) that show the dislocation at atomic level with a burger vector. for example, start with an image web search for “dislocation atomic TEM burger vector”.


(a): A clear image that shows the atomic dislocation Burger vector

Solution

[edit | edit source]

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.


From looking through the experimental results of atomic scale imaging of dislocations it seems that a clear illustration of the burgers vector is difficult to find.

An imageof atomic scale edge dislocation is available from a paper published the journal Nature .

There is also a diagram of an atomic scale edge dislocation with a burgers vector notated on the image found on a website about solid mechanics. The image is small however.

R2.2 Roots of Associated Laguerre Polynomials

[edit | edit source]

Problem Statement

[edit | edit source]

Plot the associated Laguerre polynomials for and . Use MATLAB to find the roots of for , and verify the numbers in the table on p.66a-7

Note: If you already have the plots made in report R1, you simply copy and paste these plots in report R2; the task then is only to find the roots of these polynomials.

(a): Associated Laguerre polynomial plots

(b): Roots of Laguerre polynomials

(c): Verify numbers in the table on p.66-7

Solution

[edit | edit source]

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.


Part (a): Associated Laguerre Polynomial Plots

[edit | edit source]

The plot was created using the Python scripting language.

Figure 1: Associated Laguerre Polynomial ([1])


Part (b): Roots of Associated Laguerre Polynomials

[edit | edit source]

The roots of the associated Laguerre polynomial were computed using Wolfram Alpha. The syntax for creating associated Laguerre polynomials in Wolfram Alpha: LaguerreL[n,k,x] where n is the degree, k is the family of Laguerre polynomials, and x is the independent variable.


The Laguerre polynomial given by,

 

 

 

 

(Eq 2-1)

Has three roots. The approximate roots of the polynomial are:




The Laguerre polynomial given by,

 

 

 

 

(Eq 2-2)

Has three roots. The roots of the polynomial are:




The Laguerre polynomial given by,

 

 

 

 

(Eq 2-3)

Has three roots. The roots of the polynomial are:




The Laguerre polynomial given by,

 

 

 

 

(Eq 2-4)

Has three roots. The roots of the polynomial are:




The Laguerre polynomial given by,

 

 

 

 

(Eq 2-5)

Has three roots. The roots of the polynomial are:




Part (c): Two Sets of Roots of Associated Laguerre Polynomials For

[edit | edit source]

In this section we are asked to compute the roots of the associated Laguerre polynomials with . We are then asked to compare these results to previously tabulated results.

The Laguerre polynomial given by,

 

 

 

 

(Eq 2-6)

The following roots:

Associated Laguerre Polynomial Roots of
Root # Root
0
0.5277
1.796
3.877
6.919
11.235
17.65



The Laguerre polynomial given by,

 

 

 

 

(Eq 2-7)

The following roots:

Associated Laguerre Polynomial Roots of
Root # Root
0
0.4610
1.564
3.352
5.916
9.421
14.19
21.09

R2.3: Comparison of Laguerre Polynomial Power Series Representations

[edit | edit source]

Given Information

[edit | edit source]

(Eq 3-1) was given for the value of PN(u) and (Eq 3-2) through (Eq 3-4) were given for the Laguerre polynomials written with the same variables as (Eq 3-1) for comparisons.

 

 

 

 

(Eq 3-1)

 

 

 

 

(Eq 3-2)

 

 

 

 

(Eq 3-3)

 

 

 

 

(Eq 3-4)

Problem Statement

[edit | edit source]

Compare (Eq 3-1) to the various finite power series expressions for the associated Laguerre polynomials in (Eq 3-2) through (Eq 3-4). For (Eq 3-2), read about the Pochhammer symbol in King 2003, p.60 ( there is a misprint in the name Pochhammer in King 2003; "hh" not "kh"). Read also other refs on the Pochhammer symbol such as Wikipedia, MathWorld,etc. The problem statement is also given in R2.3: sec.66a, Pb-66-6.

Solution

[edit | edit source]

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.


Part A

The falling factorial term in (Eq 3-1) can be rewritten with a Pochhammer symbol.

 

 

 

 

(Eq 3-5)

Where,

 

 

 

 

(Eq 3-6)

The Pochhammer symbol can be related to a binomial coefficient by the equation:

 

 

 

 

(Eq 3-7)


Plugging (Eq 3-7) into (Eq 3-5) results in:

 

 

 

 

(Eq 3-8)

The binomial coefficient has the following closed form for integer arguments:[1]

 

 

 

 

(Eq 3-9)

Substituting the closed form in (Eq 3-9) into (Eq 3-8) gives:

 

 

 

 

(Eq 3-10)

Factoring out a and changing the reference for the to and making to gives:
I do not believe this is correct because you are factoring out a single negative 1, not (-1)^n. This equation is always positive where n is an integer.

 

 

 

 

(Eq 3-11)

This is what I get...

 

 

 

 

(Eq 3-11)

Taking out the first term two terms of (Eq 3-2) (the first term is 0) with gives:

 

 

 

 

(Eq 3-12)

And when I change the range of LN, I get -1 as the coefficient of u.

 

 

 

 

(Eq 3-12)

It should be noted that the summation index in (Eq 3-12) changes from to . This is because when the binomial coefficient is zero and cannot be represented by the factorial expression. This term must be brought outside of the sum, but since the term is zero, all that results is an index change.

Part B

For the the case where , (Eq 3-3) has the form:

 

 

 

 

(Eq 3-13)

Using the expression (Eq 3-7) for the binomial term in (Eq 3-13) yields:

 

 

 

 

(Eq 3-14)

Plugging (Eq 3-14) into (Eq 3-13) gives:

 

 

 

 

(Eq 3-15)

The first term of (Eq 3-13) is brought outside the summation. To reproduce (Eq 3-12)

 

 

 

 

(Eq 3-16)

Part C

Making for (Eq 3-4) gives

 

 

 

 

(Eq 3-17)

 

 

 

 

(Eq 3-18)

Substituting the closed form of (Eq 3-9) and (Eq 3-18) into (Eq 3-17) gives:

 

 

 

 

(Eq 3-19)

R2.4:Differential Element in Spherical Coordinates

[edit | edit source]

Given Information

[edit | edit source]

The following equation is given for ds2:

 

 

 

 

(Eq 4-1)

xi is written in spherical coordinates in (Eq 4-2) through (Eq 4-4).

 

 

 

 

(Eq 4-2)

 

 

 

 

(Eq 4-3)

 

 

 

 

(Eq 4-4)

Problem Statement

[edit | edit source]

Show that the infinitesimal length ds2 in (Eq 4-1) can be written in spherical coordinates, (Eq 4-5), as given in Pb.R*7.3 on pp.39-[1,3] of sec.39 of the notes.

 

 

 

 

(Eq 4-5)

Solution

[edit | edit source]

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

The derivatives of xi are given in (Eq 4-6) through (Eq 4-8).

 

 

 

 

(Eq 4-6)

 

 

 

 

(Eq 4-7)

 

 

 

 

(Eq 4-8)

(Eq 4-9) was developed by substituting the squared derivatives in the summation of (Eq 4-1) and combining like terms.

 

 

 

 

(Eq 4-9)

Using the Pythagorean Trigonometric Identity, (Eq 4-9) reduces to (Eq 4-10).

 

 

 

 

(Eq 4-10)

The magnitude of the tangent vector h are then identified as follows:

 

 

 

 

(Eq 4-11)

 

 

 

 

(Eq 4-12)

 

 

 

 

(Eq 4-13)

The definition of the Laplace operator, , in cartesian coordinates:

 

 

 

 

(Eq 4-14)

The Laplace operator can be expressed in spherical coordinates from equation (2) from the class notes 39-2,

 

 

 

 

(Eq 4-15)

After substituting the values of h from (Eq 4-11) through (Eq 4-13), the Laplacian takes the form:

 

 

 

 

(Eq 4-16)

Factoring the from the first term, the partial derivative with respect to r, and the from the third term, the partial derivative with respect to , since both values are fixed in the partial derivatives, the Laplacian takes the form:

 

 

 

 

(Eq 4-17)

R2.5: Using Variation of Parameters To Find Second Solution To The Legendre Differential Equation

[edit | edit source]

Given Information

[edit | edit source]

The following equation is given for P2(x), the Legendre Polynomial of degree n=2:

 

 

 

 

(Eq 5-1)

Problem Statement

[edit | edit source]

Using variation of parameters, show that Equation 5-2 is a second solution to the Legendre differential equation in Equation 5-3 as given in Pb.R*6.11 on pp.37-4 in sec.37 of the notes.

 

 

 

 

(Eq 5-2)

Solution

[edit | edit source]

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

The Legendre differential equation of degree n=2 is given in equation 5-3.

 

 

 

 

(Eq 5-3)

Using reduction of order, some function, v, times P2(x) and the first two derivatives of the product are substituted into the Legendre differential equation in equation 5-7. Furthermore, since P2(x) is a solution to the Legendre equation the coefficient of the first order term, v, reduces to zero. Since the lowest order term cancels out, the second order differential equation is reduced to a first order differential equation where w=v' and w'=v'' in Equation 5-8 which can be solved through separation of variables.

 

 

 

 

(Eq 5-4)

 

 

 

 

(Eq 5-5)

 

 

 

 

(Eq 5-6)

 

 

 

 

(Eq 5-7)

 

 

 

 

(Eq 5-7)

Through partial fraction decomposition, the integral is

 

 

 

 

(Eq 5-8)

Through integration

 

 

 

 

(Eq 5-9)

Using properties of the natural logarithm and then inverting it using the exponential function, equation 5-9 becomes

 

 

 

 

(Eq 5-10)

Substituting v' back into Equation 5-10 and again using partial fraction decomposition

 

 

 

 

(Eq 5-11)

Using integration by parts

 

 

 

 

(Eq 5-12)

where u and v are defined as follows:

 

 

 

 

(Eq 5-13)

 

 

 

 

(Eq 5-14)

 

 

 

 

(Eq 5-15)

Using the properties of the natural logarithm to combine the first two terms and performing the simple integration on the last term:

 

 

 

 

(Eq 5-16)

Substituting v into Equation 5-4 then identifying the new solution as Q2

 

 

 

 

(Eq 5-17)

R2.6: Derive Lapace's Equation in Cylindrical Coordinates

[edit | edit source]

Given Information

[edit | edit source]

The following equations are given for cylindrical coordinates:

 

 

 

 

(Eq 6-1)

 

 

 

 

(Eq 6-2)

 

 

 

 

(Eq 6-3)

Problem Statement

[edit | edit source]

(a) Find

 

 

 

 

(Eq 6-4)

in terms of

 

 

 

 

(Eq 6-5)

and

 

 

 

 

(Eq 6-6)


(b) Find

 

 

 

 

(Eq 6-7)

Identify in terms of

(c) Find in terms of cylindrical coordinates

(d) Use separation of variable to find the separated equations of Laplace's equation in cylindrical coordinates and compare to the Bessel equation:

 

 

 

 

(Eq 6-8)

Solution

[edit | edit source]

On our honor, we consulted the solution of Dr. Gaely of Concordia College (http://wwwp.cord.edu/faculty/gealy/physics315/SepVarsCyl.pdf) to motivate the change of variables in the solution of part d. We improved upon the referenced solution by explicitly showing the functional arguments as a result of the change of variables.

Part a

[edit | edit source]

The total differential of can be written as:

 

 

 

 

(Eq 6-9)

Similar expressions can be written for and .

 

 

 

 

(Eq 6-10)

 

 

 

 

(Eq 6-11)

Plugging in the expressions from (Eq 6-1), (Eq 6-2) and (Eq 6-3):

 

 

 

 

(Eq 6-12)

 

 

 

 

(Eq 6-13)

 

 

 

 

(Eq 6-14)

Part b

[edit | edit source]

Plugging in (Eq 6-12), (Eq 6-13), and (Eq 6-14) into (Eq 6-7).

 

 

 

 

(Eq 6-15)

Expanding (Eq 6-14) out, and applying the following trig identity:

 

 

 

 

(Eq 6-16)

Results in the following expression:

 

 

 

 

(Eq 6-17)

Comparing (Eq 6-17) to the left hand side of (Eq 6-7):

 

 

 

 

(Eq 6-18)

 

 

 

 

(Eq 6-19)

 

 

 

 

(Eq 6-20)

Part c

[edit | edit source]

The Laplacian operator for a scalar function in general curvilinear coordinates is defined as[2]:

 

 

 

 

(Eq 6-21)

Plugging in (Eq 6-18), (Eq 6-19) and (Eq 6-20).

 

 

 

 

(Eq 6-22)

 

 

 

 

(Eq 6-23)

 

 

 

 

(Eq 6-24)

Part d

[edit | edit source]

Laplace's equation in cylindrical coordinates is:

 

 

 

 

(Eq 6-25)

 

 

 

 

(Eq 6-26)

Assume a solution to (Eq 6-26) has the following form:

 

 

 

 

(Eq 6-27)

Plugging (Eq 6-27) into (Eq 6-26):

 

 

 

 

(Eq 6-28)

Dividing by

 

 

 

 

(Eq 6-29)

The terms in z are then "seperated" and set equal to a constant: .

 

 

 

 

(Eq 6-30)

Multiplying by :

 

 

 

 

(Eq 6-31)

Now the term can be separated and set to .

 

 

 

 

(Eq 6-32)

Making a change of variable [3]:

 

 

 

 

(Eq 6-33)

 

 

 

 

(Eq 6-34)

 

 

 

 

(Eq 6-35)

Plugging the above change of variable into (Eq 6-32) and multiplying by gives:

 

 

 

 

(Eq 6-36)

Which is Bessel's equation given in (Eq 6-8).

R2.7:Testing Gauss-Laguerre Quadrature

[edit | edit source]

Given Information

[edit | edit source]

The following equations are given:

 

 

 

 

(Eq 7-1)


 

 

 

 

(Eq 7-2)


(Eq 7-1) is motivated by quadrature tests written by Dr. John Burkardt found here:

http://people.sc.fsu.edu/~%20jburkardt/c_src/test_int_laguerre/test_int_laguerre.html

Problem Statement

[edit | edit source]

(a) Find the values of the integral of the function (7-1) by other means (exact or approximate), then evaluate these integrals with the Gauss-Laguerre quadrature for comparison.


(b) Find and appropriate transformation to show the equality of (7-2). Find the value of in some table and use the Gauss-Laguerre quadrature to find an approximate value of the integral to compare.

Solution

[edit | edit source]

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

Part a

[edit | edit source]

Gauss-Laguerre quadrature is a Gaussian quadrature that integrates a function over the interval with the weighting factor .

 

 

 

 

(Eq 7-3)

Since the integral in (Eq 7-3) has the weighting term in it, a transformation can be applied to integrate an arbitrary function of interest.

 

 

 

 

(Eq 7-4)


The integration points are found to be the roots of the Laguerre polynomial , and the weights are found by the following expression [4]:

 

 

 

 

(Eq 7-5)

Since the integral in (Eq 7-1) has a lower limit of 2 instead of zero, a change of variable is needed.

 

 

 

 

(Eq 7-6)

(Eq 7-3) then becomes [5]:

 

 

 

 

(Eq 7-7)

A numerical python (NumPy) script was written to test the quadrature for the integral in (Eq 7-1). The source code is given below:

Source:

#################################################################################
# Name: gausslagtest.py
# Author: Cameron Stewart
# Date: 2/5/2014
# Purpose: This script uses Gauss-Laguerre quad  to integrate the integral:
#     exp(-2) Integral (2 to infinity) (1/(x*log(x)^2)
#################################################################################
import numpy as np
import matplotlib.pyplot as plt
#################################################################################
# Function name: TestFunction
# Input: a value, or array of values of x
# Output: g(x) at given points
# f(x)=exp(-2)/(x*log(x)*log(x); g(x)=f(x)*(e^x)
# Function f(x) that is desired to be integrated this function is multiplied by
# e^x to account for the weighting function e^-x in G-L Quad
#################################################################################
def TestFunction(x):
    y=np.exp(x)*1/(x*np.log(x)*np.log(x))
    return y

#################################################################################
# Uses the numpy Laguerre Gauss quadrature routine:
# numpy.polynomial.laguerre.laggauss(deg)  to find roots and weight points.
# Output is tuple of 1d arrays for the weights and integration points.  
# Note: Not tested for deg>100
#################################################################################

weight=(np.polynomial.laguerre.laggauss(4))
# weight[0] contains the roots/integration points
# weight[1] contains the weights at said points

# COV: y=x+a to account for lower limit of 
# integration
a=2

func=TestFunction(weight[0]+a)
integ=weight[1]*func
integ=np.exp(-a)*np.sum(integ)
print('n=4')
print(np.exp(-2)*integ)

weight=(np.polynomial.laguerre.laggauss(16))
func=TestFunction(weight[0]+a)
integ=weight[1]*func
integ=np.exp(-a)*np.sum(integ)
print('n=16')
print(np.exp(-2)*integ)

weight=(np.polynomial.laguerre.laggauss(100))

func=TestFunction(weight[0]+a)
integ=weight[1]*func
integ=np.exp(-a)*np.sum(integ)
print('n=100')
print(np.exp(-2)*integ)

# Exact value computed from analytic solution
exact=np.exp(-2)*1./(np.log(2))
print('exact')
print(exact)

#################################################################################
# Plot to show the convergence with increasing integration points
#################################################################################
t=np.linspace(2,100,99)
error=[]
for i in range(2, 101):
    weight=(np.polynomial.laguerre.laggauss(i))
    func=TestFunction(weight[0]+a)
    integ=weight[1]*func
    integ=np.exp(-a)*np.sum(integ)
    error.append((np.abs(np.exp(-2)*integ-exact))\
                     /exact*100.)
plt.plot(t,error)
plt.title('Convergence test for Gauss-Laguerre quadrature: logarithmic integral')
plt.xlabel(r'Integration points: $n$')
plt.ylabel(r'Error %')
plt.show()


Script terminal output:

n=4
0.145107525093
n=16
0.162236347114
n=100
0.172558662198
exact
0.195247541983

Plot generated by script:

Figure 7.1: Convergence of ( 7-1) with increasing integration points


The above script uses NumPy's Laguerre module quadrature routine: numpy.polynomial.laguerre.laggauss(deg). This routine solves the roots of the Laguerre polynomials by first finding the eigenvalues of the Companion Matrix, and then applying an iteration of Newton's Method to improve accuracy.

Documentation

source

The above script uses ( 7-5) to calculate ( 7-1).

 

 

 

 

(Eq 7-8)

Where,

 

 

 

 

(Eq 7-9)

The script above compares favourably with values calculated by Dr. Burkardt [6].

n Python Script Dr. Burkardt
4 0.145107525093 0.145108
16 0.162236347114 0.162236
Table 7.1 Comparison of quadrature calculations


As can be seen in Figure 1, even at 100 integration points there is still significant error of around 12 percent.

Part b

[edit | edit source]

The equivalence of ( 7-2) is not shown here. A suitable transformation has been elusive. It is the Author's belief that this relation was originally developed via contour integration, and is not trivially shown [7]

( 7-2) can be evaluated at Wolfram Alpha.

 

 

 

 

(Eq 7-10)

To integrate ( 7-2) by Gauss-Laguerre quadrature, ( 7-3) has the following form:


 

 

 

 

(Eq 7-11)

Where,


 

 

 

 

(Eq 7-12)


A NumPy script similar to the one used in part a was used to integrate ( 7-2). A figure similar to Figure 7-1 was made testing the percent error as the number of integration points are increased.

Source:

#################################################################################                                    
# Name: gausslagbessel.py                                                                                            
# Author: Cameron Stewart                                                                                            
# Date: 2/5/2014                                                                                                     
# Purpose: This script uses Gauss-Laguerre quad  to integrate the integral:                                          
#     2/pi Integral (0 to infinity) sin( 0.5 cosh(x) )                                                               
#################################################################################                                    
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import jn
#################################################################################                                    
# Function name: TestFunction                                                                                        
# Input: a value, or array of values of x                                                                            
# Output: g(x) at given points                                                                                       
# f(x)=sin( 0.5 * cosh(x) )                                                                                          
# Function f(x) that is desired to be integrated this function is multiplied by                                      
# e^x to account for the weighting function e^-x in G-L Quad                                                         
#################################################################################                                    
def TestFunction(x):
    y=np.exp(x)*np.sin(0.5*np.cosh(x))
    return y

#################################################################################                                    
# Uses the numpy Laguerre Gauss quadrature routine:                                                                  
# numpy.polynomial.laguerre.laggauss(deg)  to find roots and weight points.                                          
# Output is tuple of 1d arrays for the weights and integration points.                                               
# Note: Not tested for deg>100                                                                                       
#################################################################################                                    
# Exact value computed from analytic solution                                                                        
exact=jn(0,0.5)
print('exact')
print(exact)
#################################################################################                                    
# Plot to show the convergence with increasing integration points                                                    
#################################################################################                                    
t=np.linspace(2,100,99)
a=0
error=[]
for i in range(2, 101):
    weight=(np.polynomial.laguerre.laggauss(i))
    func=TestFunction(weight[0]+a)
    integ=weight[1]*func
    integ=np.exp(-a)*np.sum(integ)
    error.append((np.abs((2./np.pi)*integ-exact))\
                     /exact*100.)
plt.plot(t,error)
plt.title('Convergence test for Gauss-Laguerre quadrature: Bessel integral')
plt.xlabel(r'Integration points: $n$')
plt.ylabel(r'Error %')
plt.ylim(0,5999)
plt.show()


Script terminal output:

exact
0.938469807241


Plot generated by script:

Figure 7.2: Percent error of ( 7-2) with increasing integration points


Figure 7-2 does not show any convergence to the correct solution. Observing (Eq 7-12) there are two apparent red flags. The first is that is unbounded as . The second red flag is that oscillates with an unbounded frequency as . Both of these characteristics make a polynomial extrapolation as used in Gaussian quadrature schemes problematic. With a limited number of sampling integration points, it is not expected that Gauss-Laguerre quadrature will yield accurate results for equations with these characteristics.

Contributing Team Members

[edit | edit source]




Problem Assignments
Problem # Solved by Reviewed by
1 Neal, Christopher all
2 Neal, Christopher all
3 Bartlett, Elizabeth all
4 Bartlett, Elizabeth; Frost, Kevin Stewart. Cameron
5 Bartlett, Elizabeth Stewart, Cameron
6 Stewart, Cameron Bartlett, Elizabeth
7 Stewart, Cameron Bartlett, Elizabeth

References

[edit | edit source]
  1. Weisstein, Eric W. "Binomial Coefficient." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/BinomialCoefficient.html
  2. Weisstein, Eric W. "Laplacian." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Laplacian.html
  3. http://wwwp.cord.edu/faculty/gealy/physics315/SepVarsCyl.pdf
  4. Weisstein, Eric W. "Laguerre-Gauss Quadrature." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Laguerre-GaussQuadrature.html
  5. http://ice.uchicago.edu/2012_presentations/Faculty/Judd/Quadrature_ICE11.pdf
  6. http://people.sc.fsu.edu/~%20jburkardt/c_src/test_int_laguerre/test_int_laguerre_prb_output.txt
  7. Weisstein, Eric W. "Mehler's Bessel Function Formula." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/MehlersBesselFunctionFormula.html