SlideShare a Scribd company logo
1 of 7
Download to read offline
Zewail city of science and Technology
Assignment 1
Numerical solution of the Schr¨odinger
equation
Author
Mohamed Ramadan
201400711
Supervisor
Dr. Amr Bayoumi
November 1, 2017
Assignment 1.
Numerical solution of the Schr¨odinger equation
The time-independent Schr¨odinger equation describing a particle of mass m constrained to motion
in a time-independent, one-dimensional potential V(x) is
−
¯h2
2m
ψ [x] + V [x]ψ[x] = Eψ[x] (1)
and it can be written in terms of the Hamiltonian operator as
ˆHψ[x] = Eψ[x] (2)
where
ˆH = −
¯h2
2m
d2
dx2
+ V [x] (3)
E are energy eigenvalues, and Ψ are time-independent stationary states.
To solve this equation numerically, one must first discretize the functions. A first approach sam-
ples the wave function and potential at a discrete set of N + 1 equally-spaced points in such a way
that position Xj = J × ∆, the index j = 0, 1, 2, 3, ..., N , and ∆ is the interval between adjacent
sampling points. Thus, one may define Xj+1 ≡ Xj + ∆. Such sampling of a particle wave function
and potential is illustrated Fig. 1.
The region in which we wish to solve the Schr¨odinger equation is of length L = N∆. At each
sampling point the wave function has value Ψj = Ψ(xj ). The potential Vj = V(xj ) = 0 for the infinite
potential well, for which we are solving the Schr¨odinger equation.
The first derivative of the discretized wave function Ψ(xj ) in the two-point finite-difference ap-
proximation is:
d
dx
Ψ(xj ) =
Ψ(xj ) − Ψ(xj−1)
∆
(4)
1
To find the second derivative of the discretized wave function, we use the three-point finite difference
approximation,which gives:
d2
dx2
Ψ(xj ) =
Ψ(xj−1) − 2Ψ(xj ) + Ψ(xj+1)
∆2
(5)
with boundary conditions Ψ(x0) = Ψ(xN ) = 0
The result is that the original PDE is replaced by a linear system for nodal values:
−¯h2
m∆2



j = 1 Ψ(x0)−2Ψ(x1)+Ψ(x2)
∆2 = EΨ(x1)
j = 2 Ψ(x1)−2Ψ(x2)+Ψ(x3)
∆2 = EΨ(x2)
j = 3 Ψ(x2)−2Ψ(x3)+Ψ(x4)
∆2 = EΨ(x3)
j = 4 Ψ(x3)−2Ψ(x4)+Ψ(x5)
∆2 = EΨ(x4)



In matrix form HΨ = EΨ, where:




d −u 0 0
−u d −u 0
0 −u d −u
0 0 −u d








Ψ1
Ψ2
Ψ3
Ψ4



 =




E1
E2
E3
E4








Ψ1
Ψ2
Ψ3
Ψ4




where d = ¯h2
m∆2 and u = ¯h2
2m∆2 .
We can use MATLAB to solve for the eigenvalues and eigenfunctions.
2
Solution
1) Using the method outlined, write a MATLAB program to solve the Schr¨odinger wave equation
for the first four eigenvalues and eigenstates of an electron confined to a rectangular potential well
of width L = 10nm bounded by infinite barrier potential energy. Plot the wavefunctions.
L = 10nm and N = 201 so ∆ = 0.04975nm
Firstly,we will calculate the values of d and u which will be :
d =
¯h2
m∆2
=
(1.05457 ∗ 10−34
)2
(9.10938 ∗ 10−31) ∗ (0.04975 ∗ 10−9)2
= 4.9326 ∗ 10−18 (J.S)2
rad2.Kg.m2
u =
¯h2
2m∆2
=
(1.05457 ∗ 10−34
)2
2 ∗ (9.10938 ∗ 10−31) ∗ (0.04975 ∗ 10−9)2
= 2.4663 ∗ 10−18 (J.S)2
rad2.Kg.m2
Substituting in the matrix form then:
H =








4.9326 ∗ 10−18
2.4663 ∗ 10−18
0 0 . .
2.4663 ∗ 10−18
4.9326 ∗ 10−18
2.4663 ∗ 10−18
0 . .
0 2.4663 ∗ 10−18
4.9326 ∗ 10−18
. .
. . . . . .
. . . . . .
. . . . 2.4663 ∗ 10−18
4.9326 ∗ 10−18








Using [V, D] = eigs(H), the eigenvalues,which are E, and eignvectors,which are Ψ can be calcu-
lated.
The eigenvalues are:
E1 E2 E3 E4
D =




0.9864 ∗ 10−17
0 0 0
0 0.9862 ∗ 10−17
0 0
0 0 0.9859 ∗ 10−17
0
0 0 0 0.9855 ∗ 10−17




The eigenvectors are:
Ψ1 Ψ2 Ψ3 Ψ4
V =








−0.0016 0.0031 −0.0047 −0.0062
0.0031 −0.0062 0.0093 0.0124
−0.0047 0.0093 −0.0140 −0.0186
0.0062 −0.0124 0.0186 0.0247
. . . .
. . . .








For plotting, each wavefunction [Ψ1Ψ2Ψ3Ψ4] should be plotted VS. the width of the infinite well,
considering that Ψ0 = Ψ201 = 0 and the step value of x is equal to 0.04975nm.
3
Using plot function in MATLAB,the wavefunction vector:
Ψ1 =












0
−0.0016
0.0031
−0.0047
0.0062
.
.
0












can be plotted VS. the well distance: X =












0
0.0498
0.0995
0.1493
0.1990
.
.
10












Considering that Ψ1(x=0)
= Ψ1(x=10)
= 0 ;as these two points are at the walls of the infinite well.
2) Plot the probability density for the obtained wavefunctions.
The plot of the wavefunction of the electron in the first orbital and it’s probability are:
repeating the same steps for [Ψ2Ψ3Ψ4] resulting these plots:
For Ψ2:
4
For Ψ3:
For Ψ4:
3) For the ground state (n=1), calculate the probability of finding the electron between 0.25 <
x < 0.75 nm.
The trapz MATLAB function can be used to calculate the probability of finding the electron
between 0.25 < x < 0.75 nm for (n = 1).
The probability (0.25 < x < 0.75) = 0.05
e = [0.2488 : 0.04975 : 0.75]
y = transpose(V (:, N))
z = [0 y 0]
q = 10. ∗ z.2
v = q(1, 6 : 16)
5
trapz(e, v) = 0.0026
This is the GUI which can implement all these solutions:
6

More Related Content

What's hot

Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference InterpolationVARUN KUMAR
 
Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...Suddhasheel GHOSH, PhD
 
Solve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSolve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSuddhasheel GHOSH, PhD
 
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodFEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodSuddhasheel GHOSH, PhD
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation Meet Patel
 
Interpolation with unequal interval
Interpolation with unequal intervalInterpolation with unequal interval
Interpolation with unequal intervalDr. Nirav Vyas
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadraturesTarun Gehlot
 
Gaussian Integration
Gaussian IntegrationGaussian Integration
Gaussian IntegrationReza Rahimi
 
Integration
IntegrationIntegration
Integrationlecturer
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functionsTarun Gehlot
 
Lecture 11 systems of nonlinear equations
Lecture 11 systems of nonlinear equationsLecture 11 systems of nonlinear equations
Lecture 11 systems of nonlinear equationsHazel Joy Chong
 
Interpolation and Extrapolation
Interpolation and ExtrapolationInterpolation and Extrapolation
Interpolation and ExtrapolationVNRacademy
 
6.2 the indefinite integral
6.2 the indefinite integral 6.2 the indefinite integral
6.2 the indefinite integral dicosmo178
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
Core 2 differentiation
Core 2 differentiationCore 2 differentiation
Core 2 differentiationJJkedst
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidelarunsmm
 

What's hot (20)

Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference Interpolation
 
Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...Point Collocation Method used in the solving of Differential Equations, parti...
Point Collocation Method used in the solving of Differential Equations, parti...
 
Solve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSolve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares Method
 
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's MethodFEM Introduction: Solving ODE-BVP using the Galerkin's Method
FEM Introduction: Solving ODE-BVP using the Galerkin's Method
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation
 
Interpolation with unequal interval
Interpolation with unequal intervalInterpolation with unequal interval
Interpolation with unequal interval
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadratures
 
Conformal mapping
Conformal mappingConformal mapping
Conformal mapping
 
Gaussian Integration
Gaussian IntegrationGaussian Integration
Gaussian Integration
 
Interpolation
InterpolationInterpolation
Interpolation
 
Integration
IntegrationIntegration
Integration
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functions
 
11365.integral 2
11365.integral 211365.integral 2
11365.integral 2
 
Lecture 11 systems of nonlinear equations
Lecture 11 systems of nonlinear equationsLecture 11 systems of nonlinear equations
Lecture 11 systems of nonlinear equations
 
Interpolation and Extrapolation
Interpolation and ExtrapolationInterpolation and Extrapolation
Interpolation and Extrapolation
 
6.2 the indefinite integral
6.2 the indefinite integral 6.2 the indefinite integral
6.2 the indefinite integral
 
Section5 stochastic
Section5 stochasticSection5 stochastic
Section5 stochastic
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Core 2 differentiation
Core 2 differentiationCore 2 differentiation
Core 2 differentiation
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
 

Similar to Numerical solution of the Schr¨odinger equation

Physical Chemistry Assignment Help
Physical Chemistry Assignment HelpPhysical Chemistry Assignment Help
Physical Chemistry Assignment HelpEdu Assignment Help
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life OlooPundit
 
Multivriada ppt ms
Multivriada   ppt msMultivriada   ppt ms
Multivriada ppt msFaeco Bot
 
Litvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdfLitvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdfAlexander Litvinenko
 
Ph 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICSPh 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICSChandan Singh
 
Computer graphics LINE DRAWING algorithm.pptx
Computer graphics LINE DRAWING algorithm.pptxComputer graphics LINE DRAWING algorithm.pptx
Computer graphics LINE DRAWING algorithm.pptxR S Anu Prabha
 
Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential slides
 
The Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability DistributionThe Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability DistributionPedro222284
 
1 hofstad
1 hofstad1 hofstad
1 hofstadYandex
 
A series of maximum entropy upper bounds of the differential entropy
A series of maximum entropy upper bounds of the differential entropyA series of maximum entropy upper bounds of the differential entropy
A series of maximum entropy upper bounds of the differential entropyFrank Nielsen
 
Quantitative Techniques random variables
Quantitative Techniques random variablesQuantitative Techniques random variables
Quantitative Techniques random variablesRohan Bhatkar
 
Solution set 3
Solution set 3Solution set 3
Solution set 3慧环 赵
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Alexander Litvinenko
 

Similar to Numerical solution of the Schr¨odinger equation (20)

Physical Chemistry Assignment Help
Physical Chemistry Assignment HelpPhysical Chemistry Assignment Help
Physical Chemistry Assignment Help
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
 
Multivriada ppt ms
Multivriada   ppt msMultivriada   ppt ms
Multivriada ppt ms
 
Litvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdfLitvinenko_RWTH_UQ_Seminar_talk.pdf
Litvinenko_RWTH_UQ_Seminar_talk.pdf
 
Ph 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICSPh 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICS
 
Section2 stochastic
Section2 stochasticSection2 stochastic
Section2 stochastic
 
Statistical Method In Economics
Statistical Method In EconomicsStatistical Method In Economics
Statistical Method In Economics
 
Computer graphics LINE DRAWING algorithm.pptx
Computer graphics LINE DRAWING algorithm.pptxComputer graphics LINE DRAWING algorithm.pptx
Computer graphics LINE DRAWING algorithm.pptx
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
 
Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential
 
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
 
The Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability DistributionThe Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability Distribution
 
1 hofstad
1 hofstad1 hofstad
1 hofstad
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Section4 stochastic
Section4 stochasticSection4 stochastic
Section4 stochastic
 
A series of maximum entropy upper bounds of the differential entropy
A series of maximum entropy upper bounds of the differential entropyA series of maximum entropy upper bounds of the differential entropy
A series of maximum entropy upper bounds of the differential entropy
 
Quantitative Techniques random variables
Quantitative Techniques random variablesQuantitative Techniques random variables
Quantitative Techniques random variables
 
Section3 stochastic
Section3 stochasticSection3 stochastic
Section3 stochastic
 
Solution set 3
Solution set 3Solution set 3
Solution set 3
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Numerical solution of the Schr¨odinger equation

  • 1. Zewail city of science and Technology Assignment 1 Numerical solution of the Schr¨odinger equation Author Mohamed Ramadan 201400711 Supervisor Dr. Amr Bayoumi November 1, 2017
  • 2. Assignment 1. Numerical solution of the Schr¨odinger equation The time-independent Schr¨odinger equation describing a particle of mass m constrained to motion in a time-independent, one-dimensional potential V(x) is − ¯h2 2m ψ [x] + V [x]ψ[x] = Eψ[x] (1) and it can be written in terms of the Hamiltonian operator as ˆHψ[x] = Eψ[x] (2) where ˆH = − ¯h2 2m d2 dx2 + V [x] (3) E are energy eigenvalues, and Ψ are time-independent stationary states. To solve this equation numerically, one must first discretize the functions. A first approach sam- ples the wave function and potential at a discrete set of N + 1 equally-spaced points in such a way that position Xj = J × ∆, the index j = 0, 1, 2, 3, ..., N , and ∆ is the interval between adjacent sampling points. Thus, one may define Xj+1 ≡ Xj + ∆. Such sampling of a particle wave function and potential is illustrated Fig. 1. The region in which we wish to solve the Schr¨odinger equation is of length L = N∆. At each sampling point the wave function has value Ψj = Ψ(xj ). The potential Vj = V(xj ) = 0 for the infinite potential well, for which we are solving the Schr¨odinger equation. The first derivative of the discretized wave function Ψ(xj ) in the two-point finite-difference ap- proximation is: d dx Ψ(xj ) = Ψ(xj ) − Ψ(xj−1) ∆ (4) 1
  • 3. To find the second derivative of the discretized wave function, we use the three-point finite difference approximation,which gives: d2 dx2 Ψ(xj ) = Ψ(xj−1) − 2Ψ(xj ) + Ψ(xj+1) ∆2 (5) with boundary conditions Ψ(x0) = Ψ(xN ) = 0 The result is that the original PDE is replaced by a linear system for nodal values: −¯h2 m∆2    j = 1 Ψ(x0)−2Ψ(x1)+Ψ(x2) ∆2 = EΨ(x1) j = 2 Ψ(x1)−2Ψ(x2)+Ψ(x3) ∆2 = EΨ(x2) j = 3 Ψ(x2)−2Ψ(x3)+Ψ(x4) ∆2 = EΨ(x3) j = 4 Ψ(x3)−2Ψ(x4)+Ψ(x5) ∆2 = EΨ(x4)    In matrix form HΨ = EΨ, where:     d −u 0 0 −u d −u 0 0 −u d −u 0 0 −u d         Ψ1 Ψ2 Ψ3 Ψ4     =     E1 E2 E3 E4         Ψ1 Ψ2 Ψ3 Ψ4     where d = ¯h2 m∆2 and u = ¯h2 2m∆2 . We can use MATLAB to solve for the eigenvalues and eigenfunctions. 2
  • 4. Solution 1) Using the method outlined, write a MATLAB program to solve the Schr¨odinger wave equation for the first four eigenvalues and eigenstates of an electron confined to a rectangular potential well of width L = 10nm bounded by infinite barrier potential energy. Plot the wavefunctions. L = 10nm and N = 201 so ∆ = 0.04975nm Firstly,we will calculate the values of d and u which will be : d = ¯h2 m∆2 = (1.05457 ∗ 10−34 )2 (9.10938 ∗ 10−31) ∗ (0.04975 ∗ 10−9)2 = 4.9326 ∗ 10−18 (J.S)2 rad2.Kg.m2 u = ¯h2 2m∆2 = (1.05457 ∗ 10−34 )2 2 ∗ (9.10938 ∗ 10−31) ∗ (0.04975 ∗ 10−9)2 = 2.4663 ∗ 10−18 (J.S)2 rad2.Kg.m2 Substituting in the matrix form then: H =         4.9326 ∗ 10−18 2.4663 ∗ 10−18 0 0 . . 2.4663 ∗ 10−18 4.9326 ∗ 10−18 2.4663 ∗ 10−18 0 . . 0 2.4663 ∗ 10−18 4.9326 ∗ 10−18 . . . . . . . . . . . . . . . . . . 2.4663 ∗ 10−18 4.9326 ∗ 10−18         Using [V, D] = eigs(H), the eigenvalues,which are E, and eignvectors,which are Ψ can be calcu- lated. The eigenvalues are: E1 E2 E3 E4 D =     0.9864 ∗ 10−17 0 0 0 0 0.9862 ∗ 10−17 0 0 0 0 0.9859 ∗ 10−17 0 0 0 0 0.9855 ∗ 10−17     The eigenvectors are: Ψ1 Ψ2 Ψ3 Ψ4 V =         −0.0016 0.0031 −0.0047 −0.0062 0.0031 −0.0062 0.0093 0.0124 −0.0047 0.0093 −0.0140 −0.0186 0.0062 −0.0124 0.0186 0.0247 . . . . . . . .         For plotting, each wavefunction [Ψ1Ψ2Ψ3Ψ4] should be plotted VS. the width of the infinite well, considering that Ψ0 = Ψ201 = 0 and the step value of x is equal to 0.04975nm. 3
  • 5. Using plot function in MATLAB,the wavefunction vector: Ψ1 =             0 −0.0016 0.0031 −0.0047 0.0062 . . 0             can be plotted VS. the well distance: X =             0 0.0498 0.0995 0.1493 0.1990 . . 10             Considering that Ψ1(x=0) = Ψ1(x=10) = 0 ;as these two points are at the walls of the infinite well. 2) Plot the probability density for the obtained wavefunctions. The plot of the wavefunction of the electron in the first orbital and it’s probability are: repeating the same steps for [Ψ2Ψ3Ψ4] resulting these plots: For Ψ2: 4
  • 6. For Ψ3: For Ψ4: 3) For the ground state (n=1), calculate the probability of finding the electron between 0.25 < x < 0.75 nm. The trapz MATLAB function can be used to calculate the probability of finding the electron between 0.25 < x < 0.75 nm for (n = 1). The probability (0.25 < x < 0.75) = 0.05 e = [0.2488 : 0.04975 : 0.75] y = transpose(V (:, N)) z = [0 y 0] q = 10. ∗ z.2 v = q(1, 6 : 16) 5
  • 7. trapz(e, v) = 0.0026 This is the GUI which can implement all these solutions: 6