Rss

Derivation of vanishing Self-Adjoint Surface term

For and eigenvalue equation in Sturm-Liouville form

 \hat{L} y = \frac{d}{dx} \left(p(x) \frac{dy}{dx} \right) + q(x) y

with scalar product

  \left(f,g \right) = \int_a^b f^*(x) g(x) dx

we examine the first part of the operator  \hat{L}

 \hat{L}_1 = \frac{d}{dx} \left( p(x) \frac{d}{dx} \right)  

We require  \left( f,\hat{L}_1 g \right) = \left( \hat{L}_1 f, g \right)

We start from

 \left( f,\hat{L}_1 g \right) = \int_a^b f^*(x) \frac{d}{dx} \left( p(x) \frac{dg}{dx} \right)   dx

using integration by parts we have

  \left( f,\hat{L}_1 g \right) =  \left[ p(x) f^*(x)  \frac{dg}{dx} \right]_a^b - \int_a^b  p(x) \frac{d^*f}{dx} \frac{dg}{dx} dx

then using integration by parts again we find

 \left( f,\hat{L}_1 g \right) =  \left[ p(x) \{  f^*(x)   \frac{dg}{dx}   - g(x) \frac{df^*}{dx} \}  \right]_a^b - \int_a^b \frac{d}{dx} \left( p(x) \frac{d^*f}{dx}  \right) g(x) dx

The second term clearly is  \left( \hat{L}_1 f, g \right)  , so we require the first term  =0  for self-adjoint form.

So we find

\left[ p(x) \{  f^*(x)   \frac{dg}{dx}   - g(x) \frac{df^*}{dx} \}  \right]_a^b =0      for an operator to be in self-adjoint form.

Variational Principle

The variation theorem states that given a system with a Hamiltonian H , then if f is any normalised, well-behaved function that satisfies the boundary conditions of the Hamiltonian, then

 \left<f|H|f \right> \ge E_0

For un-normalised wavefunctions

 \frac{ \left< f|H|f \right> }{\left< f|f \right>} \ge E_0

Example 1: Schrödinger Equation in quantum mechanics

We will consider the Hamiltonian

 \hat{H} = \frac{\hat{p}^2}{2m} + V(x)  = -\frac{\hbar^2}{2m} \frac{d^2}{dx^2} + V(x)

The normal scalar product to use is

 \left( f,g \right) = \int_a^b f^*(x) g(x) w(x) dx

where  w(x)  is the weight function.

Therefore, to calculate   \left< f|H|f \right>  we have

 \left< \psi|\hat{H}|\psi \right> = \int_a^b \psi^* \hat{H} \psi dx = \int_a^b \psi^* \left(  -\frac{\hbar^2}{2m} \frac{d^2}{dx^2} + V(x) \right)  \psi dx

 = \int_a^b \psi^* \left(  -\frac{\hbar^2}{2m} \frac{d^2\psi }{dx^2} + V(x) \psi \right) dx = \int_a^b \left(-\frac{\hbar^2}{2m}\right)  \psi^*  \frac{d^2\psi }{dx^2} + V(x) |\psi|^2 dx 

using integration by parts on the first term gives

 \left< \psi|\hat{H}|\psi \right>  = \left[   \left(-\frac{\hbar^2}{2m}\right) \psi^* \frac{d \psi}{dx}    \right]_a^b +
 \quad \displaystyle\int\limits_a^b \left( \frac{\hbar^2}{2m} \right) |\frac{d \psi}{dx}|^2  + V(x) | \psi |^2 dx

And for self-adjoint operators, which this must be, the surface term vanishes. Giving

 \left< \psi|\hat{H}|\psi \right>  =   \displaystyle\int\limits_a^b \left( \frac{\hbar^2}{2m} \right) |\frac{d \psi}{dx}|^2  + V(x) | \psi |^2 dx

This makes calculation easier.

So 

 E_0 \le   \frac{\displaystyle\int\limits_a^b \left( \frac{\hbar^2}{2m} \right) |\frac{d \psi}{dx}|^2  + V(x) | \psi |^2 dx}{\displaystyle\int\limits_a^b |\psi|^2 dx} 

 

Integrating factor

Sturm-Liouville form

Any second order linear ordinary differential equation

A(x) \frac{d^2y}{dx^2} + B(x) \frac{dy}{dx} +C(x) y = D(x)       or        \hat{L} y = D(x)

where \hat{L}  is a second order linear operator, can be rewritten in Sturm-Liouville form

 -\frac{d}{dx} \left[ p(x) \frac{dy}{dx} \right] +q(x) y = r(x)

Method:

Start with a general 2nd order linear ODE

A(x) \frac{d^2y}{dx^2} + B(x) \frac{dy}{dx} +C(x) y = D(x)

Divide by A(x) to obtain

\frac{d^2y}{dx^2} + \frac{B(x)}{A(x)} \frac{dy}{dx} +\frac{C(x)}{A(x)} y = \frac{D(x)}{A(x)}

Now we let b(x) = \frac{B(x)}{A(x)}  , c(x) = \frac{C(x)}{A(x)}  and d(x) = \frac{D(x)}{A(x)}

y'' +b(x) y' +c(x) y = d(x)

Now we use the integrating factor, p(x), to reformulate the 2nd order differential part, such that

 p(x) = \textrm{exp} \left[ \int b(x) dx \right]

The equation now becomes

 \frac{d}{dx} \left( p(x) \frac{dy}{dx} \right) + p(x) c(x) y = p(x) d(x)

where we now define q(x) = p(x) c(x)  and  r(x) = r(x) d(x)  . So the original equation is now cast in Sturm-Loiuville form.

This can also be applied to eigenvalue problems...

Any second order linear eigenvalue equation

A(x) \frac{d^2y}{dx^2} + B(x) \frac{dy}{dx} +C(x) y = \lambda y       or        \hat{L} y = \lambda y

where \hat{L}  is a second order linear operator, can be rewritten in Sturm-Liouville form

 \frac{d}{dx} \left[ p(x) \frac{dy}{dx} \right] +q(x) y = \lambda w(x) y

The same proceedure is followed as the non eigenvalue problem. The only difference is the introduction of the weight function,  w(x)  , which is defined as

w(x) = \frac{p(x)}{A(x)}

Note: we need   w(x) \ge 0  on the interval  \bigl[ a,b \bigr]

and we require

 \left[p(x) \{ f^*(x)g^{'}(x) - f^{*'}(x) g(x) \} \right]^b_a = 0

For a derivation of this see this post.

This ensures all eigenvalues, \lambda_i  , are real and corresponding eigenfunctions, \psi_i , are orthogonal relative to the weight function w(x).

Mathematically:

 \int_a^b \psi^*_i(x) \psi_j(x) w(x) dx = \delta_{ij}     (orthogonal)

and

 \left(\psi_1, \hat{L} \psi_2 \right) = \lambda_2 \left( \psi_1,\psi_2\right)_w

 \left(\hat{L}\psi_1, \psi_2 \right) = \lambda_1^* \left( \psi_1,\psi_2\right)_w

 \rightarrow \left( \lambda_1^* - \lambda_2\right) \left( \psi_1 -\psi_2 \right)_w = 0     (real eigenvalues)

Example 1: Legendre's Equation

 \left( 1-x^2 \right) \frac{d^2y}{dx^2} - 2x\frac{dy}{dx} = \lambda y

Divide by  \left( 1-x^2 \right)  , which gives

 \frac{d^2y}{dx^2} - \frac{2x}{1-x^2} \frac{dy}{dx} = \frac{1}{1-x^2} \lambda y

Now we compute the integrating factor,  p(x)

 p(x) = \textrm{exp} \left[  \int \frac{-2x}{1-x^2} dx    \right] = 1-x^2

So the Sturm-Liouville form is

 \frac{d}{dx} \left[ \left( 1-x^2 \right) \frac{dy}{dx}  \right] = \lambda y

So we see the weight function,  w(x) = 1 .

Greens Functions and Linear differential equations

If an Linear operator  L has a Green's function, G(x)  , the following relationship can be written down.

L G(x,s) = \delta(x-s)

This can be used to solve inhomogeneous differential equations of the form

L u(x) = f(x)

The Green's function is a sort of right inverse of L such that it knowledge of G(x) yields the function u(x) by direct integration. This proof is as follows.

From L G(x,s) = \delta(x-s)

Multiply both sided by f(s) and integrate with respect to ds

 \int LG(x,s) f(s) ds = \int \delta(x-s) f(s) ds

Using the properties of the delta function

 \int L G(x,s) f(s) ds = f(x) = L u(x)

Since the operator L on the left hand side is in x it can be pulled out the front of the integral, which gives

L \int G(x,s) f(s) ds = L u(x)

Therefore we have found the equation for u(x) which is

 u(x) = \int G(x,s) f(s) ds

 

 

What is Linear - Operators and Equations?

A linear operator preserves

L (f + g ) = Lf + L g      additivity
L ( \alpha f ) = \alpha L f       homogeneity of degree 1

In the context of ordinary differential equations the linear operator L is of the form

 L \equiv \left( C_N(x)\frac{d^N}{dx^N}+C_{N-1}(x)\frac{d^N-1}{dx^N-1}+...+C_2(x)\frac{d^2}{dx^2} + C_1(x)\frac{d}{dx} + C_0(x)\right)

Therefore a linear differntial equation would be

 L f(x) = g(x)     inhomogenous

L f(x) = 0     homogeneous

And if the C_i  coefficients are constant, i.e. not functions of x the ode is said to have constant coefficients.

Some simple examples:

4\frac{d^2y}{dx^2} + \frac{dy}{dx} + y = 0       homogeneous with constant coefficients

x^2\frac{d^2y}{dx^2} + \frac{dy}{dx} + xy = 0        homogeneous with non constant coefficients

x^2\frac{d^2y}{dx^2} + \frac{dy}{dx} + xy = e^x        inhomogeneous with non constant coefficients

2\frac{d^2y}{dx^2} + \frac{dy}{dx} + 4y = e^x         inhomogeneous with constant coefficients

Useful vi commands

some useful vi commands

i  - insert text

I - insert line before cursor

dd - remove entire line

x - remove single character

Esc (key) - To return to command mode after in edit mode.

:x - exit and save

:q - exit and don't save

Copying multiple directories using wildcards on linux

If you had a file structure like

dir1
dir2
dir3
folder

And you wanted to copy all the three directories (and their contents) dir1, dir2 and dir3 into the directory called folder, you use the command

cp -rv dir* folder

Note: I like to use the "v" switch here, meaning verbose, so I know how the copy is progressing

If you then wanted to remove the directories from their original location, you could use the command

rm -r dir*

 

Removing directories and their contents on linux

Use the command

rm -r <directory name>

Stack: How to multiply vectors

Question Variables

x1= [1,1,1]
x2=[1,1,-1]
result1=x1.transpose(x2)
result2=transpose(x1).x2

Question Stem 

<p> Result1= @result1@ </p>

<p> Result2= @result2@ </p>

Output

Result1= 1

Result2= \begin{bmatrix} 1 &1 &-1\\ 1&1& -1\\ 1 & 1 & -1\end{bmatrix}

For more information about the STACK system see stack.bham.ac.uk