rt numpy as np import scipy.integrate as si import matplotlib.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
need help with python by using
import numpy as np
import scipy.integrate as si
import matplotlib.pyplot as plt

Transcribed Image Text:Q2. Refer to https://en.wikipedia.org/wiki/Hydrogen_atom
Repeat Q1 for the hydrogen in the 2s state, 2s = W2,0,0-
ymin, ymax= 0.0 489806111.1768066
xinit,xlast= 0.0 1.06e-10
count, Np, A = 1539 3000 0.0519194477847415
I = A*count/Np =
0.026634676713572388
le9
P(r) vs. r/a
175
150
125
100
0.75
0.50
0.25
0.00
6
rla0
integrated value from stochastic method = 0.026634676713572388
Your output should be similar to that as displayed in the sample. integrated value by scipy = 0.026326508671855577
Remark: To answer this question, you have to figure out yourself what is the wave function fo the hydrogen atom in the 2s state from the
wikipedia link.
(1)d

Transcribed Image Text:Stochastic integration
Q1. Refer to https://en.wikipedia.org/wiki/Hydrogen_atom
Read through the wiki page. The radial part of the ground state solution to the 3D Schrodinger equation for hydrogen atom is given by the
express Y1s(r) :
-e-rla0, where r is the position variable measured from the center of the hidrogen atom, and ao the Bohr radius. The
total probability P(r)dr of the electron being in a shell at a distance r and thickness dr is P(r)dr = 4ar² |y1s(r)[² dr.
(i) Use stochastic integration method to calculate the probability of finding an electron in the region 0 < r < 2ao. To this end, you must find
out what is the numerical value for the Bohr radius, ao in Sl unit.
(ii) Use scipy.integrate.quad() to perform the calculation in (i) and display on the screen that the methods in (i) and (ii) return consistent answer
of 20.76.
(iii) Plot the curve of P(r) vs. rla0 for 0 < r< 5a0. Display the stochastic dots in (i) that are bounded between the curve and the r-axis in the
region 0 <r < ao. Your output should be similar to that as displayed in the sample.
Remark: This is a 'tricky' question in the sense that the x-axis is not in SI unit but in ao.
ymin, ymax= 0.0 10213942675.451843
xinit,xlast= 0.0 1.06e-10
count, Np, A = 2148 3000 1.0826779235978954
I = A*count/Np =
0.775197393296093
le10
P(r) vs. r/a
10
0.8
0.6
0.4
0.2
0.0
4
5
6
r/a0
integrated value from stochastic method = 0.775197393296093
integrated value by scipy =
0.7618966944464558
(1)d
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education