Chem5-F22
Homework8
数学代码代写 Instructions: Complete the following exercises showing ALL your code unless explicitly asked to suppress output. When complete export a freshly
Instructions:
Complete the following exercises showing ALL your code unless explicitly asked to suppress output. When complete export a freshly evaluated notebook of your code and save it as a pdf. Upload that pdf to Gradescope by the due date indicated above. To receive credit for a homework question, you MUST assign the page(s) of the PDF that contains your answer when submitting in Gradescope. Failure to do so will result in a zero. Submit your assignment no later than 11pm Pacific Time on the date above to receive full credit.
Exercise 1: 数学代码代写
Charge transfer or donor-acceptor (DA) reactions are a very general class of reactions in chemistry of the form: D + A ⇄ D-A. They are typical of redox reactions for organic and inorganic compounds.
Fig 1. Reduction/Oxidation of tetracyanoethylene (TCNE), an example of a DA Reaction. “Inorganic Chemistry”, Miessler, Fischer, Tarr, 2020.
A simple two state Hamiltonian can be used to model the energetics of DA reactions
where EA is the energy of the acceptor state, ED is the energy of the donor state, and Δ is the coupling between them. A 2 x 2 matrix U can be diagonalized by the matrix formed by it eigenvectors L =(u1, u2) where ui are column eigenvectors of U according to
where λi are U’s eigenvalues. Use this information to diagonalize the Hamiltonian for the donor acceptor system and determine its eigenenergies. You may use the Eigenvectors, but not Eigenvalues or Eigensystem.
In[]:= Text["Your Code Here :)"] Out[]= Your Code Here :)
Exercise 2: 数学代码代写
Mean, average, and expectation value are essentially synonymous with the latter emphasizing the probabilistic interpretation of an average. Recall that the discrete probability of an outcome xi in a sample set X=(x1, …, xN) is defined as
where p(x) normalized over x in [a,b] and f(x) is a general function of x. In quantum mechanics expectation values are measurements where f(x) is some property (called an observable) and p(x) is the square modulus of the wavefunction.
p(x) = ∣ ψ* (x) ψ(x) ∣
In[]:= $Assumptions = {Element[{r, θ, ϕ, a0}, Reals], a0 > 0}; AL[n_, l_, x_] := ((n + l)!) * LaguerreL[n, l, x]; In[]:= Rnl[n_, l_] := Sqrt[((2 / (n * a0))^3) * ((n - l - 1)! / (2 * n * (((n + l)!)^3)))] * Exp[-r / (n * a0)] * (((2 * r) / (n * a0))^l) * AL[n - l - 1, 2 * l + 1, ((2 * r) / (n * a0))] // FullSimplify; In[]:= Ylml[l_, m_] := SphericalHarmonicY[l, m, θ, ϕ]; psiatomic[n_, l_, m_] := Rnl[n, l] * Ylml[l, m] // FullSimplify;
(a). Compute the expectation value of the radius of an electron in a 1s orbital (n = 1, l = 0, ml =0). Is this the same its most probable radius?
In[]:= Text["Your Code Here :)"] Out[]= Your Code Here :)
(b). Compute the expectation value of the radius of an electron in a 3d orbital (n = 3, l = 2, ml =0)
In[]:= Text["Your Code Here :)"] Out[]= Your Code Here :)
Exercise 3: 数学代码代写
Monte Carlo (named after an the casino in Monaco) or Importance Sampling is an algorithm which uses random numbers to approximate areas/integrals. It was originally used to integrate neutron diffusion equations during the Manhattan Project (the U.S. Department of Defense’s secret development of the atomic bomb) during WWII. It has since been applied to a nearly every quantitative discipline. For example, the paper which introduces the Metropolis algorithm (a popular variant of Monte Carlo) remains one of the most highly cited chemistry articles of all time ( Metropolis, N.; Rosenbluth, A.W.; Rosenbluth, M.N.; Teller, A.H.; Teller, E. (1953). “Equation of State Calculations by Fast Computing Machines”. Journal of Chemical Physics. 21 (6): 1087–1092, cited 43,148 times as of 12/3/20).
You will write a basic Monte Carlo script to calculate π to two decimal places (a textbook example of MC).
Consider the diagram above: a circle inscribed
(a).
Write a Monte Carlo function to approximate π called littlemontecarlo[n_] where n is the number of points in your approximation. It will be a Module with three local variables x, y, pointsin. pointsin will be initialized to zero. Then loop over x, y up to n times. The loop should generated a new random real real number within the square by assigning RandomReal[{-1,1}] into both x and y separately for each iteration of the loop. The final line of code within that loop will be a conditional indicating whether the point formed by the current value of x and y lies within circle (x^2+y^2≤1). If so increment pointsin by one, otherwise pointsin remains its current value. littlemontecarlo[n_] will then return the ratio of pointsin/n times four (ratio of points in the circle to total number of points in the square times four).
In[]:= Text["Your Code Here :)"] Out[]= Your Code Here :)
(b). 数学代码代写
Feed littlemontecarlo n = 5, 50, 500, 5000, and 50,000. What do you observe?
In[]:= Text["Your Code Here :)"] Out[]= Your Code Here :)
(c).
Table over littlemontecarlo[50,000] ten times and store the values obtained in a variable, sampleset. Compute the mean and standard deviation of the values in sampleset.
Use this to report your Monte Carlo approximation to π with error bars (viz. mean ± standard deviation )
In[]:= Text["Your Code Here :)"] Out[]= Your Code Here :)
(d).
We’ve seen MC can be used to approximate relative ratios of areas and thus can be applied to numerical integration. When might MC (random sampling) be advantageous over quadrature (a numerical integration which adds up boxes under a curve)?
Text["Your Code Text :)"] Out[]= Your Code Here :)
更多代写:Cs final quiz代考 gre代考一亩三分地 英国Chemistry化学包网课 coursework论文代写 演讲稿代写 工作简历代写