0% found this document useful (0 votes)
17 views8 pages

hw4 Soln

This document provides the solution to a homework problem involving a kinetic sequence of elementary reactions (A → B → C) and putting the system of differential equations describing the reaction into dimensionless form. The key steps are: 1) Writing the system of coupled differential equations and putting it in matrix-vector form. 2) Non-dimensionalizing the equations and variables. 3) Finding the eigenvalues and eigenvectors of the resulting matrix to solve for x(τ), y(τ), and z(τ) explicitly in terms of the eigenvalues. 4) Plotting the solution for y(τ) for different values of the parameter λ to show the effect of the reversibility of the A → B reaction

Uploaded by

Md Abid Afridi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

hw4 Soln

This document provides the solution to a homework problem involving a kinetic sequence of elementary reactions (A → B → C) and putting the system of differential equations describing the reaction into dimensionless form. The key steps are: 1) Writing the system of coupled differential equations and putting it in matrix-vector form. 2) Non-dimensionalizing the equations and variables. 3) Finding the eigenvalues and eigenvectors of the resulting matrix to solve for x(τ), y(τ), and z(τ) explicitly in terms of the eigenvalues. 4) Plotting the solution for y(τ) for different values of the parameter λ to show the effect of the reversibility of the A → B reaction

Uploaded by

Md Abid Afridi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

CHE 5310 – Homework 4 Solution

Joe Gauthier – Fall 2023


Due Friday 10/13 at 11:59 PM on Blackboard

Problem 1
Consider the following kinetic sequence:
k1 k
A−
↽−
−⇀ 2
− B −→ C (1)
k−1

(a) Write the set of coupled differential equations which describe the concentrations of A, B, and C for this
sequence assuming these are elementary reactions. Write the set of equations into a matrix-vector form.
(b) Put the system into dimensionless form using the following variables:

k−1 k1
x = A/A0 ; y = B/A0 ; z = C/A0 ; τ = k2 t; λ= ; ϵ= (2)
k1 k2
and solve explicitly for x(τ ), y(τ ), and z(τ ) assuming all rate constants are positive. Note that the initial
conditions are A(t = 0) = A0 and y(0) = z(0) = 0. Hint: Once you solve for the eigenvalues of the resulting
matrix system, you may leave your solution in terms of those eigenvalues r1 , r2 , r3 . You may find that
defining the parameter ν = ϵλ + ϵ + 1 is convenient.
(c) Plot y(τ ) for x(τ = 0) = 1, ϵ = 0.1, with λ being set to λ = 0.1, 1, 10. Your plot should have three
curves. Note that λ → 0 is the case with A → B being irreversible, identical to the case we worked out in
class. Comment on the effect of this reaction being reversible.

Solution

dA
= −k1 + k−1 B (3)
dt
dB
= k1 − k−1 B − k2 B (4)
dt
dC
= k2 B (5)
dt
or, in matrix-vector form,  dA    
dt −k1 k−1 0 A
 dB  =  k1 −k−1 − k2 0 B  (6)
dt
dC 0 k2 0 C
dt

To make these equations dimensionless, we divide each equation by A0 k2 , yielding,


dx
= −ϵx + ϵλy (7)

dy
= ϵx − (1 + ϵλ)y (8)

dz
=y (9)

or in matrix-vector form,  dx    
dτ −ϵ ϵλ 0 x
 dy  =  ϵ −(1 + ϵλ) 0 y  (10)

dz 0 1 0 z

1
Our next step is to find the eigenvalues of the above matrix. Since λ is already taken, we’ll denote the
eigenvalues as w. We find the eigenvalues by finding the roots of

−ϵ − w ϵλ 0
ϵ −(1 + ϵλ) − w 0 =0 (11)
0 1 −w
(−ϵ − w)(−(1 + ϵλ) − w)w − ϵλ(−wϵ) = 0 (12)
2
w(−(w + ϵ)(w + ϵλ + 1) + ϵ λ) = 0 (13)
2
w(w + (ϵ + ϵλ + 1)w + ϵ) = 0 (14)
2
w(w + νw + ϵ) = 0 (15)

Where, as the hint suggests, ν = ϵ + ϵλ + 1. So we have three distinct solutions,



−ν ± ν 2 − 4ϵ
w = 0, (16)
2
Next we solve for the eigenvectors associated with these eigenvalues. For w = 0:

0 β11
      
−ϵ ϵλ 0 0
 ϵ −(1 + ϵλ) 0 β21  = 0 ⇒ β (1) = 0 (17)
0 1 0 β31 0 1

−ν+ ν 2 −4ϵ
For the second eigenvalue, w2 = 2 ,
ϵλ
   2    
−ϵ − w2 ϵλ 0 β1 0 ϵ+w2
 ϵ −(1 + ϵλ) − w2 0  β22  = 0 ⇒ β (2) =  1  (18)
0 1 −w2 β32 0 1/w2

−ν− ν 2 −4ϵ
And for the final eigenvalue, w3 = 2 ,
ϵλ
   3    
−ϵ − w3 ϵλ 0 β1 0 ϵ+w3
 ϵ −(1 + ϵλ) − w3 0  β23  = 0 ⇒ β (3) =  1  (19)
0 1 −w3 β33 0 1/w3

Therefore we can write out our general solution,


     ϵλ   ϵλ 
x 0 ϵ+w2 ϵ+w3
x = y  = A 0 + Bew2 τ  1  + Cew3 τ  1  (20)
z 1 1/w2 1/w3

Now we solve for the unknown constants A, B, C using the initial conditions:
     ϵλ   ϵλ 
1 0 ϵ+w2 ϵ+w3
0 = A 0 + B  1  + C  1  (21)
1 1 1/w2 1/w3

When I worked this out, I got:

(ϵ + w2 )(ϵ + w3 )
A=− (22)
w2 w3 ϵλ
(ϵ + w2 )(ϵ + w3 )
B= (23)
ϵλ(w3 − w2 )
(ϵ + w2 )(ϵ + w3 )
C= (24)
ϵλ(w2 − w3 )

2
So then the final solution is given as
     ϵλ   ϵλ 
x 0 ϵ+w
(ϵ + w2 )(ϵ + w3 )   (ϵ + w2 )(ϵ + w3 ) w2 τ  2 (ϵ + w2 )(ϵ + w3 ) w3 τ  ϵ+w3 
x = y  = − 0 + e 1 + e 1
w2 w3 ϵλ ϵλ(w3 − w2 ) ϵλ(w2 − w3 )
z 1 1/w2 1/w3
(25)
The final task is to plot the solution y(τ ) with the given parameters and λ varying from 0.1 to 10.0. The
plot is given below in Figure 1. Favoring the reversal of B back to A (i.e., λ > 1) results in a significant
reduction in both the peak concentration of B and the timescale in which B is converted irreversible to C.

0.08 = 0.1
= 1.0
y( ) / dimensionless

0.06 = 10.0

0.04
0.02
0.00
0 5 10 15 20
/ dimensionless
Figure 1: Solution to the ODE, y(τ ), as a function of λ for ϵ = 0.1 and x(τ = 0) = 1.

3
Problem 2
(a) In class, we developed the framework for a generalized Fourier series expansion of functions. Using your
own words, explain how and why any function can be written as a sum of e.g. sin functions.

Solution
Answers will vary, but should contain some element of:
• Functions can be thought of as being a vector belonging to a particular vector space, e.g. L2 (0, 1).
• A set of n vectors that are linearly independent form a basis for a vector space of dimension n.
• The vector space of functions, L2 (a, b) is of infinite dimension, meaning we need an infinite sum of
linearly independent vectors.
• One such example is the set of vectors u(i) = sin(iπx) for i = 1, 2, 3, ...
• Then any function f (x) ∈ L2 (a, b) can be written as a linear combination of these vectors:

X
f (x) = An sin(nπx) (26)
n=1

with coefficients determined using the property of orthogonality.


(b) Using the software of your choice, plot the function f (x) = x, x ∈ (−1, 1) using a sum of functions
sin(nπx) for
1. n = 1
2. n = 10
3. n = 100
4. n = 1000
Make sure to include any code needed to reproduce your answer. The solution will be provided in Python3
and matplotlib.

Solution
The biggest hurdle with this problem is determining the coefficients An . We can do this by solving the
inner product:
(f (x), sin(nπx)
An = (27)
(sin(nπx), sin(nπx))
We’ll start with the numerator first.

Z 1
(f (x), sin(nπx)) = x sin(nπx)dx (28)
−1
1
sin(nπx) − πnx cos(nπx)
= (29)
π 2 n2 −1
−2 cos(nπ)
= (30)

Noting that cos(nπ) = (−1)n for n = 1, 2, ... we have the numerator,
2
(f (x), sin(nπx)) = (−1)n+1 (31)

Next we have the normalization, i.e. the denominator,
Z 1
sin(2nπ)
(sin(nπx), sin(nπx)) = sin2 (nπx)dx = 1 − =1 (32)
−1 2nπ
4
Giving us our coefficients,
2
An = (−1)n+1 (33)

Finally, we just need to write a simple program to plot the results for increasing n. When I plot this in
Python, I get the following:

1.0

0.5

0.0
y

0.5
n=1 n = 100
1.0 n = 10 n = 1000
1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00
x
Figure 2: Results of a Fourier sine series approximating y = x for increasing n.

5
For reference, the code needed to produce the above plot is given here:
import matplotlib.pyplot as plt
import numpy as np

def get_series(n,x):
series = np.zeros(1000) # initialize as all zeros
for i in range(n):
j = i+1 # python starts at 0, and we want to start at 1
an = 2.0/(j*np.pi)*(-1)**(j+1)
normalization = 1
series += an*np.sin(j*np.pi*x)/normalization
return series

edge = 0.1
x = np.linspace(-1-edge,1+edge,1000) # just fill a vector from -1 to 1,
# plus a little on the edges

fig = plt.figure(figsize=(5*1.618,5))
plt.plot(x,x,’k-’) # plot y=x

ns = [1,10,100,1000]
for n in ns:
series_approx = get_series(n=n,x=x)
plt.plot(x,series_approx,’--’,label=’$n=%i$’%n)

plt.xlim(-1-edge,1+edge) # set the x limits appropriately

plt.xlabel(’x’)
plt.ylabel(’y’)
plt.legend(ncol=2)
plt.tight_layout()
plt.show()

(c) Comment on the results of part (b). What is happening near the edges?

Solution
The approximation is increasingly excellent near the interior of the region, but consistently shows some
error near the edge. This phenomenon is known as the ‘Gibbs phenomenon’ – you can read more about it
on Wikipedia.

Problem 3
The dimensionless Schrödinger equation is of the form

(−∇2 + U (x))ψ(x) = Eψ (34)

where ψ is the wave function and E is the energy state (an eigenvalue). For a particle in a spherical shell
box over 1 ≤ r ≤ 1 + β, let

∞
 r < 1 so ψ = 0 at r = 1
U (x) = ∞ r ≥ 1 + β so ψ = 0 at r = 1 + β (35)

0 otherwise

6
Then ψ = ψ(r) and we can define a kinetic energy operator (assuming symmetry in ϕ and θ):
 
1 d 2 d
− 2 r ψ = Eψ . (36)
r dr dr

Find the normalized ψn (r) and the first five eigenvalues for β = 0.5. Note: write the expression for the
normalization constant, but do not attempt to evaluate the integral.

Solution
We’ve been tasked to solve the eigenvalue problem
 
1 d d
− 2 r2 ψ = Eψ . (37)
r dr dr

subject to boundary conditions given by the wavefunction ψ vanishing at the edges of the spherical shell box
r = 1, 1 + β,

ψ(1) = ψ(1 + β) = 0 . (38)

From our discussion in class of the particle in a spherical box, we know that the eigenfunctions of this
operator are the spherical Bessel functions. Note that the version of the spherical Bessel’s function equation
in the course reader is
x2 y ′′ + 2xy ′ + (λ2 x2 − ν 2 )y = 0 (39)
and the general solutions are the νth order spherical Bessel functions of the first and second kinds, i.e.

y = Ajν (λx) + Byν (λx) . (40)

To more clearly see the connection, we can rewrite our eigenvalue problem into a similar form by multiplying
both sides by r2 and expanding to yield

r2 ψ ′′ + 2rψ ′ + Er2 ψ = 0 (41)



So we see the equations match if λ = E and ν = 0, meaning that the general form of our solution is given
as √ √
ψ(r) = Aj0 ( Er) + By0 ( Er) (42)
Recall that these functions have a closed form representation,

sin(x) cos(x)
j0 (x) = , y0 (x) = (43)
x x
Therefore, our eigenfunctions have the form
√ ! √ !
sin( Er) cos( Er)
ψ(r) = A √ +B √ (44)
Er Er

Now, we use the boundary conditions to determine the eigenvalues. We begin with ψ(1) = 0 and solve for
one of the coefficients:
√ ! √ !
sin( E) cos( E)
ψ(1) = 0 = A √ +B √ (45)
E E
√ √
0 = A sin( E) + B cos( E) (46)

sin( E) √
B = −A √ = −A tan( E) (47)
cos( E)

7
Now we apply the second boundary condition:
√ ! √ !
sin( E(1 + β)) cos( E(1 + β))
ψ(1 + β) = 0 = A √ +B √ (48)
E(1 + β) E(1 + β)
√ √
0 = A sin( E(1 + β)) + B cos( E(1 + β)) (49)

In matrix form the two BCs are written,


 √ √    
1 sin( E) cos( E) A 0
√ √ √ = (50)
E sin( E(1 + β)) cos( E(1 + β)) B 0

In order to have non trivial solutions (i.e. A and B not both equal to zero), the determinant And we arrive
at the condition for the eigenvalues. The eigenvalues are energy levels En such that the following condition
holds:
p p
tan( En ) = tan( En (1 + β)) (51)
The normalized eigenfunctions are then given as
 √ √ 
sin( En r) p cos( En r)
ψn (r) = An √ − tan( En ) √ (52)
En r En r

In this vector space, the inner product is given as


Z 1+β
(u, v) = uvr2 dr (53)
1

so we can find the normalization constant An :

Z 1+β  √ √ 2 !−1/2
2 sin( En r) p cos( En r)
An = r √ − tan( En ) √ dr (54)
1 En r En r

In the case where β = 0.5, we have eigenvalues given by


p p
tan( En ) = tan(1.5 En ) (55)

which is true when En = (2nπ)2 for n = 1, 2, ..., so these are our first five values for En .

Problem 4
Write an exam level question that covers chapter 2 content, with a solution.

Solution
Answers will vary

You might also like