Computational Physics (Lecture 14) PHY4061. What happens if the string is not light, and/or carries a mass density ρ(x) that is not a constant? This is.

Slides:



Advertisements
Similar presentations
Matrix Representation
Advertisements

Lecture 7: Basis Functions & Fourier Series
Quantum One: Lecture 5a. Normalization Conditions for Free Particle Eigenstates.
Engineering Mathematics Class #15 Fourier Series, Integrals, and Transforms (Part 3) Sheng-Fang Huang.
Chapter 2: Second-Order Differential Equations
Quantum One: Lecture 3. Implications of Schrödinger's Wave Mechanics for Conservative Systems.
Lecture 3 Laplace transform
Ch 3.5: Nonhomogeneous Equations; Method of Undetermined Coefficients
Ch 7.9: Nonhomogeneous Linear Systems
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Lecture 6 The dielectric response functions. Superposition principle.
Lecture 8: Fourier Series and Fourier Transform
Some Properties of the 2-D Fourier Transform Translation Distributivity and Scaling Rotation Periodicity and Conjugate Symmetry Separability Convolution.
Chapter 3 Formalism. Hilbert Space Two kinds of mathematical constructs - wavefunctions (representing the system) - operators (representing observables)
2. Solving Schrödinger’s Equation Superposition Given a few solutions of Schrödinger’s equation, we can make more of them Let  1 and  2 be two solutions.
Boyce/DiPrima 9th ed, Ch 11.2: Sturm-Liouville Boundary Value Problems Elementary Differential Equations and Boundary Value Problems, 9th edition, by.
Ordinary Differential Equations Final Review Shurong Sun University of Jinan Semester 1,
Lecture 2 Differential equations
Quantum One: Lecture 8. Continuously Indexed Basis Sets.
Ch 9 pages ; Lecture 21 – Schrodinger’s equation.
Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 10: Boundary Value Problems and Sturm– Liouville.
Differential Equations
9.6 Other Heat Conduction Problems
1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms.
THE LAPLACE TRANSFORM LEARNING GOALS Definition The transform maps a function of time into a function of a complex variable Two important singularity functions.
ISAT 412 -Dynamic Control of Energy Systems (Fall 2005)
ORDINARY DIFFERENTIAL EQUATION (ODE) LAPLACE TRANSFORM.
1 Chapter 8 Ordinary differential equation Mathematical methods in the physical sciences 3rd edition Mary L. Boas Lecture 5 Introduction of ODE.
1 The Fourier Series for Discrete- Time Signals Suppose that we are given a periodic sequence with period N. The Fourier series representation for x[n]
Chapter 4: Image Enhancement in the Frequency Domain Chapter 4: Image Enhancement in the Frequency Domain.
Fourier Series. Introduction Decompose a periodic input signal into primitive periodic components. A periodic sequence T2T3T t f(t)f(t)
1 Fourier Representation of Signals and LTI Systems. CHAPTER 3 School of Computer and Communication Engineering, UniMAP Hasliza A Samsuddin EKT.
Acoustic diffraction by an Oscillating strip. This problem is basically solved by a technique called Wiener Hopf technique.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Background Any function that periodically repeats itself.
Wednesday, Oct. 17, 2012PHYS , Fall 2012 Dr. Jaehoon Yu 1 PHYS 3313 – Section 001 Lecture #13 Wednesday, Oct. 17, 2012 Dr. Jaehoon Yu Properties.
Ch 2. The Schrödinger Equation (S.E)
Lecture 15 Solving the time dependent Schrödinger equation
Time-dependent Schrodinger Equation Numerical solution of the time-independent equation is straightforward constant energy solutions do not require us.
THE LAPLACE TRANSFORM LEARNING GOALS Definition
1 8. One Function of Two Random Variables Given two random variables X and Y and a function g(x,y), we form a new random variable Z as Given the joint.
Characteristic vibrations of the field. LL2 section 52.
The Mathematics for Chemists (I) (Fall Term, 2004) (Fall Term, 2005) (Fall Term, 2006) Department of Chemistry National Sun Yat-sen University 化學數學(一)
Fourier series, Discrete Time Fourier Transform and Characteristic functions.
Boundary-Value Problems in Rectangular Coordinates
One Function of Two Random Variables
Boyce/DiPrima 9 th ed, Ch 11.3: Non- Homogeneous Boundary Value Problems Elementary Differential Equations and Boundary Value Problems, 9 th edition, by.
Fourier Representation of Signals and LTI Systems.
1 Fourier Representation of Signals and LTI Systems. CHAPTER 3 School of Computer and Communication Engineering, UniMAP Amir Razif B. Jamil Abdullah EKT.
Computational Physics (Lecture 3) PHY4370. Interpolation Computer is a system with finite number of discrete states. – In numerical analysis, the results.
Computational Physics (Lecture 13) PHY4061. Recap of last lecture: Boundary-value and eigenvalue problems A typical boundary-value problem in physics.
Ch. 12 Partial Differential Equations
Computational Physics (Lecture 12) PHY4370. The Euler and Picard methods Numerically, we can rewrite the velocity as: Here, i is the ith time step. Let.
Math for CS Fourier Transforms
Class 3 Linear System Solution Using the Laplace Transform
Then,  Fourier Series: Suppose that f(x) can be expressed as the following series sum because Fourier Series cf. Orthogonal Functions Note: At this point,
Quantum Two 1. 2 Angular Momentum and Rotations 3.
Advanced Engineering Mathematics 6th Edition, Concise Edition
Computational Physics (Lecture 13)
Computational Physics (Lecture 14)
Ch 11.1: The Occurrence of Two-Point Boundary Value Problems
UNIT II Analysis of Continuous Time signal
Quantum One.
Quantum One.
Quantum One.
2. Solving Schrödinger’s Equation
Quantum One.
3 General forced response
Linear Systems Review Objective
THE LAPLACE TRANSFORM LEARNING GOALS Definition
Presentation transcript:

Computational Physics (Lecture 14) PHY4061

What happens if the string is not light, and/or carries a mass density ρ(x) that is not a constant? This is an inhomogeneous equation. We can solve it with a general solution of the homogeneous equation u_h(x, t) (with g = 0) and a particular solution u_p(x, t) of the inhomogeneous equation. g = 9.80 m/s^2 is the magnitude of the gravitational acceleration

the solution of the homogeneous equation. Still separate t from x by taking u_h(x, t) = X(x)Θ(t); then we have can be solved as an eigenvalue problem in ODE

For the particular solution of the inhomogeneous equation we can simplify the problem by considering the static case, that is, u_p(x, t) = u_p(x). A linear equation set if we discretize the second-order derivative involved. This equation determines the shape of the string when it is in equilibrium.

After we obtain the general solution u_h(x, t) of the homogeneous equation and a particular solution of the inhomogeneous equation, u_p(x) from the above static equation, we have the general solution of the inhomogeneous equation as : u(x, t) = u_h(x, t) + u_p(x, t). The initial displacement u0(x) and initial velocity v0(x) are still needed to determined the remaining parameters in the general solution above.

This procedure of separating variables can also be applied to higher dimensional systems. The diffusion equation in an isotropic, three dimensional, and infinite space, with a time- dependent source and a zero initial value The diffusion equation under a time- dependent source and a constant diffusion coefficient is given by

The initial value n(r, 0) = 0 will be considered first. t = 0 in this case can be viewed as the moment of the introduction of the source. we can view the source as an infinite number of impulsive sources, each within a time interval dτ, given by S(r, τ)δ(t − τ )dτ. This way of treating the source is called the impulse method.

The solution n(r, t) is then the superposition of the solution in each time interval dτ, with with η(r, 0; τ ) = 0.

The impulse equation above is equivalent to a homogeneous equation: with the initial condition η(r, τ; τ ) = S(r, τ). we have transformed the Original inhomogeneous equation with a zero initial value into an integral of a function that is a solution of a homogeneous equation with a nonzero initial value!

We can generally write the solution of the inhomogeneous equation as the sum of a solution of the corresponding homogeneous equation and a particular solution of the inhomogeneous equation with the given initial condition satisfied. So if we find a way to solve the corresponding homogeneous equation with a nonzero initial value, we find the solution of the general problem!

the separation of variables for a homogeneous diffusion equation with a nonzero initial value. Assume that the space is an isotropic, three- dimensional, and infinite space to simplify our discussion. Suppress the parameter τ to simplify our notation.

The solution of η(r, t) = η(r, t; τ ) is : η(r, t) = X(r)Θ(t), – where X(r) is a function of r only and Θ(t) is a function of t only. Substitute this assumed solution into the equation, we have X(r) Θ(t) − D Θ(t) ∇ ^2 X(r) = 0, Θ’(t)/D(t) = ∇ ^2 X(r)/X(r)= −k^2, where k = |k| is an introduced parameter (eigenvalue) that will be determined later.

we have two separate equations:

The spatial equation is now a standard eigenvalue problem with k^2 being the eigenvalue to be determined by the specific boundary condition. – assumed that the space is isotropic, three- dimensional, and infinite, the solution is given by plane waves with X(r) = C exp(ik·r), – C is a general constant.

Similarly, the time-dependent equation for Θ(t) is a standard initial-value problem with the solution. – Θ(t) = B exp(−ω(t−τ )), – ω = Dk^2 – B is a coefficient to be determined by the initial condition

combine the spatial solution and the time solution we can obtain the coefficient A_k from the initial value of η(r, τ) = S(r, τ) with the Fourier transform of the above equation as

we substitute the above result for A_k into the integral for η(r, t) and complete the integration over k, we obtain substituted into the integral expression of n(r, t):

This integral can be evaluated numerically if the form of S(r, t) is given. if the space is not infinite but confined by some boundary, the solution will be in a different but similar form, because the idea of the Fourier transform is quite general in the sense of the spatial eigenstates.. In most cases, the spatial eigenstates form an orthogonal basis set which can be used for a general Fourier transform

Fourier analysis and orthogonal functions an arbitrary periodic function f (t), with a period T, can be decomposed into a summation of simple harmonic terms, which are periodic functions of frequencies that are multiples of the fundamental frequency 1/T of the function f (t).

Assuming that we have a time-dependent function f (t) with a period T, that is, f (t + T ) = f (t), the Fourier theorem can be cast as a summation: ω = 2π/T is the fundamental angular frequency and g_j are the Fourier coefficients

The Fourier theorem can be derived from the properties of the exponential functions: Which form an orthonormal basis set in the region of one period of f(t): Where t0 is an arbitrary starting point, phi_j*(t) is the complex conjugate of phi_j(t), and delta _jk is the Kronecker delta function.

Fourier analysis and orthogonal functions Fourier theorem to a nonperiodic function in [a, b], suppose we have a complete basis set of orthonormal functions phi_k (x) with: For any arbitrary function f(x), we have: If the function is square integrable, defined by: The summation in the series is over all the possible states in the complete set, and the coefficients g_j is given by:

The continuous Fourier transform is obtained if we restrict the series to the region of t from –T/2 to T/2. Then we can extend the period T to inifity. Redine : Then the sum becomes: This is known as the Fourier integral. The Fourier coefficient function is given by:

Discrete Fourier transform The Fourier transformof a specific function: – usually necessary in the analysis of experimental data, – difficult to establish a clear physical picture just from the raw data taken from an experiment. Numerical procedures for the Fourier transform: – inevitable in physics and other scientific fields. We have to deal with a large number of data points, And the speed of the algorithm for the Fourier transform becomes a very important issue.

We need to convert the continuous variables – into discrete ones before we develop a numerical procedure. consider f (x) as a space-dependent physical quantity obtained from experimental measurements. – between x = 0 and x = L, f (x) is nonzero only for x ∈ [0, L].

assume that the data are taken at evenly spaced points with each interval h = L/(N − 1), – N is the total number of data points. assume that the data repeat periodically outside the region of x ∈ [0, L], which is equivalent to imposing the periodic boundary condition on the finite system. The corresponding wavenumber in the momentum space is then discrete too, with an interval κ = 2π/L. The discrete Fourier transform:

the Fourier coefficients given by The exponential functions in the series form a discrete basis set of orthogonal functions: We can implement the discrete Fourier transform in a straightforward manner:

fr[i] = x[i]*(1-x[i]); fi[i] = 0; } dft(fr, fi, gr, gi); // Perform the inverse Fourier transform for (int i=0; i<n; ++i) { gr[i] = f0*gr[i]; gi[i] = -f0*gi[i]; fr[i] = fi[i] = 0; } dft(gr, gi, fr, fi); for (int i=0; i<n; ++i) { fr[i] = f0*fr[i]; fi[i] = -f0*fi[i]; } // Output the result in every m data steps for (int i=0; i<n; i+=m) System.out.println(x[i] + " " + fr[i] + " " fi[i]); } // An example of performing the discrete Fourier transform // with function f(x)=x(1-x) with x in [0,1]. The // inverse transform is also performed for comparison. import java.lang.*; public class Fourier { static final int n = 128, m = 8; public static void main(String argv[]) { double x[] = new double[n]; double fr[] = new double[n]; double fi[] = new double[n]; double gr[] = new double[n]; double gi[] = new double[n]; double h = 1.0/(n-1); double f0 = 1/Math.sqrt(n); // Assign the data and perform the transform for (int i=0; i<n; ++i) { x[i] = h*i;

// Method to perform the discrete Foruier transform. Here // fr[] and fi[] are the real and imaginary parts of the // data with the correponding outputs gr[] and gi[]. public static void dft(double fr[], double fi[], double gr[], double gi[]) { int n = fr.length; double x = 2*Math.PI/n; for (int i=0; i<n; ++i) { for (int j=0; j<n; ++j) { double q = x*j*i; gr[i] += fr[j]*Math.cos(q)+fi[j]*Math.sin(q); gi[i] += fi[j]*Math.cos(q)-fr[j]*Math.sin(q); }

computing time that is proportional to N^2 We can use f (x) = x(1 − x) as the data function to test the method in the region of x ∈ [0, 1].