
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
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 nowThis is a popular solution!
Step by stepSolved 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.Similar questions
- python we have a package, Shapes, that contains the modules square.py, rectangle.py, and circle.py. choose correct statement to import rectangle.py? import Shapesimport rectangle import Shapes.rectangle import rectangle.py import Shapes.rectangle.pyarrow_forwardWhat is Encapsulation as it pertains to OOP?arrow_forwardWrite the python3 code for the given problem.... Please write C++ code also.... It's urgent!!!!!!!!!!arrow_forward
- What is the difference between Dictionaries, List, Sets, and Tuple in Python?arrow_forwardExplain the concept of natural ordering and how it relates to the Comparable interface in Java. Provide an example.arrow_forwardCreate a java for loop that maps denotational semantics Please walk me through this step by step!!!arrow_forward
- How do you use isempty?arrow_forward2. Problem 2: In this problem you will test our "in class" version of Gaussian elimination against the version in numpy. Use both codes to solve some randomly chosen linear systems of size N 10, 20, 40, 80, 160, 320, 640, 1280, 2560, and 5120. Depending on your computer, the last two may or may not work. If they don't, just say so in your report. If you computer can do N- 10240 then try this as well. Note that in cach case N 10 * 2k for k = 1,..., 10. That is, each time we are doubling the size of the matrix. abone Plot the results as two curves. Our code in red and numPy in bluc. (Or whatever colors you prefer). Can you guess the function which governs the runtime? Based on this guess, how long would it take to do N 40960 using numPy? N=81920?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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