Solution:
True. (Because I said so.)
Solution:
False. (If you do, you face the Student Honor Council.)
Solution:
True. (I post stuff on the class web to help you. Everyone has
access to the same material; thus, there is no question of
fairness.
Solution:
False. (You get a grade of "XF" meaning failure due to academic dishonesty.)
p(x) = a0 + a1*x + a2*x2 + ... + an*xn
Solution:
The many parts of this problem enforce the concept that at interpolation
points, the interpolating polynomial passes through the given
points exactly. In other words, there is no error.
p(0) = exp(-02) = 1
p(0) = a0
Thus, a0 = 1
Solution:
Same as in Part a). a0 = 1
Solution:
The given function exp(-x2) is symmetrical with
respect to x=0 (i.e., in math jargon, it is an even function),
and it does not contain any odd power terms, such as x,
x3, and x5. Thus,
a1=a3=a5=0
Solution:
Same idea as in Part a), namely, at interpolation points
(which include the two end points), the interpolating polynomial
passes through the given points exactly.
p(-5) = exp(-52)
Solution:
p(-5) = exp(-52)
Solution:
Answer is "vii) None of the above". Never extrapolate.
Solution:
For an n-th degree polynomial, there are n roots in
general (although some of the roots may be repeated).
Solution:
Yes. The interpolating polynomial can oscillate up and down
and crosses the x-axis.
Solution: No, more points do not necessarily yield closer estimates.
Solution:
Yes, interpolating polynomial will work at x=4, but the
validity of the Taylor's series expansion may not reach as far as
x=4.
| 0 2 3 |
A = | 1 2 2 |
| 1 2 1 |
Solution:
In finding inverse, we look for a solution to the following: A*x=I
Pivoting: A22 already has the largest
magnitude; there is not need to swap rows.
| 0 2 3 | | 1 0 0 |
A = | 1 2 2 | I = | 0 1 0 |
| 1 2 1 | | 0 0 1 |
Combine A and I (just to save space).
Original matrix: | A | I |
| 0 2 3 | 1 0 0 | (1.1)
| 1 2 2 | 0 1 0 | (1.2)
| 1 2 1 | 0 0 1 | (1.3)
Pivoting: swap rows 1 and 2 to bring the row with the largest element (in the absolute value sense) in
column 1 to the top row.
| 1 2 2 | 0 1 0 | (1.2)
| 0 2 3 | 1 0 0 | (1.1)
| 1 2 1 | 0 0 1 | (1.3)
Multiply (1.2) by 0/1 and subtract it from (1.1) --> (2.2)
Multiply (1.2) by 1/1 and subtract it from (1.3) --> (2.3)
| 1 2 2 | 0 1 0 | (2.1)
| 0 2 3 | 1 0 0 | (2.2)
| 0 0 -1 | 0 -1 1 | (2.3)
You are asked to perform Gaussian Elimination up to this point...
(The rest of the steps comprise of eliminating the second column,
then work backwards to eliminate the third column, followed by
the second column. The matrix A now should be diagonal.
Finally, we divide each row by the diagonal element...)
Multiply (2.2) by 0/2 and subtract it from (2.3) --> (3.3)
| 1 2 2 | 0 1 0 | (3.1)
| 0 2 3 | 1 0 0 | (3.2)
| 0 0 -1 | 0 -1 1 | (3.3)
Now, perform the elimination process in reverse direction.
Multiply (3.3) by 3/(-1) and subtract it from (3.2) --> (4.2)
Multiply (3.1) by 2/(-1) and subtract it from (3.1) --> (4.1)
| 1 2 0 | 0 -1 2 | (4.1)
| 0 2 0 | 1 -3 3 | (4.2)
| 0 0 -1 | 0 -1 1 | (4.3)
Multiply (4.2) by 2/2 and subtract it from (4.1) --> (5.1)
| 1 0 0 | -1 2 -1 | (5.1)
| 0 2 0 | 1 -3 3 | (5.2)
| 0 0 -1 | 0 -1 1 | (5.3)
Divide each row by the corresponding diagonal element.
| 1 0 0 | -1 2 -1 | (6.1)
| 0 1 0 | 1/2 -3/2 3/2 | (6.2)
| 0 0 1 | 0 1 -1 | (6.3)
Thus, the second part gives the answer to the linear equation A*x=I
| -1 2 -1 |
x= inv(A)= | 1/2 -3/2 3/2 |
| 0 1 -1 |
AH2 --> AH- + H+ K1=10-pK1=[AH-]*[H+]/[AH2] (1) AH- --> A= + H+ K2=10-pK2=[A=]*[H+]/[AH-] (2)In addition, conservation of mass means that all three possible fractions (concentrations) must add up to unity (total concentration):
[AH2]+[AH-]+[A=]=Atotal (3a) [AH2]+[AH-]+[A=]=1 (3b)
Solution:
The three equations are rearranged as:
K1*AH2 - H*AH- = 0 (1)
K2*AH- - H*A= = 0 (2)
AH2 + AH- + A= = 1 (3)
The equations are linear with respect to the three fractions of A.
In the standard Ax=b format, the matrix A is:
x = [ AH2 AH- A= ]T ... three fractions
[ K1 -H 0 ] ... (1)
A = [ 0 K2 -H ] ... (2)
[ 1 1 1 ] ... (3)
In the standard Ax=b format, the column vector b is:
[ 0 ]
b = [ 0 ]
[ 1 ]
pH ----Concentration (M)-- value AH2 AH- A= ---------------------------- 1.5 3.999 0.001 0.000 2.3 1.980 0.001 0.002 2.3 2.180 0.003 0.001 (repeated reading) 2.6 2.38 0.004 0.005 : : : : : : : :
Solution:
This is a regression problem. Since the equations that
relates the different variables are already given, the most
prudent is to use them.
There are several ways of doing regression, depending on how we regard
each variable (or combinations thereof) as dependent or independent.
If we simply place the independent variables on the LHS and dependent variables
on the RHS, we have directly from Eqns (1) and (2),
[AH-]*[H+]/[AH2] = K1*1 (1)
[A=]*[H+]/[AH-] = K2*1 (2)
Thus, perhaps the simplest is to regress the quantity
[AH-]*[H+]/[AH2] versus a basis
function of 1, and the coefficient resulting from this regression
will be the best estimate of K1. In other words,
based on the defining equations (1) and (2), form the "measured"
values of K1 and K2. Take the average
(which is another way of saying regress the "measured" values of
K1 and K2 against a basis variable of 1).
K1 = a0*1
pH ----Concentration (M)--
value AH2 AH- A= K1 K2
--------------------------------------------
1.5 3.999 0.001 0.000 : :
2.3 1.980 0.001 0.002 : :
2.3 2.180 0.003 0.001 : :
2.6 2.38 0.004 0.005 : :
: : : : : :
: : : : : :
----------------------------------------------
Average1 Average2
Here is another scheme where we regress
[AH-] against [AH2]/[H+].
[AH-] = K1*[AH2]/[H+]
The coefficient resulting from this regression will also yield an estimate
of K1...
Solution:
There is no problem in taking averages. However, we would
face singularity problems, had we not given the defining equation
for K1 and regressed against each of the three
fractions, like the following.
y = a0 + a1*AH2 + a2*AH- + a3*A= +...
(What is the dependent variable y in this equation anyway?)
The problem comes from the linearly dependent columns of the
supposedly independent matrix (i.e., the set of independent
variables). The three variables [AH2],
[AH-], and [A=] are linearly correlated, as
described by Eqn (3).
Solution:
There is no problem in having additional data points measured
at identical pH values. The problem (which does not apply to
this question) comes from linearly correlated independent
variables, not more data points. (Remember the homework problem
on regressing viscosity versus wt%, where an identical wt% value
appeared in many data points.) In fact, the whole idea of
regression is built on having lots of data points.
k1
Reaction #1: CH4 + H2O <---> CO + 3 H2 K1 = equilibrium constant
k2
k3
Reaction #2: CO + H2O <---> CO2 + H2 K2 = equilibrium constant
k4
Initially, 10 moles of gas containing 20% CH4 and 80%
H2O is present at 1 atmospheric pressure. Let
e1 and e2 be the extent of reaction for the
1st and 2nd reaction, respectively. The mass fractions of the
various component present in the system are:
YCO = (e1-e2)/ntotal YH2 = (3e1+e2)/ntotal YH2O = (8-e1-e2)/ntotal YCO2 = e2/ntotal YCH4 = (2-e1)/ntotal where Total number of moles: ntotal = 10 + 2e1Therefore, the equilibrium constant expressions are:
(e1-e2)(3e1+e2)3
K1 = ------------------------ P2 (1)
(2-e1)(8-e1-e2)(10+2e1)2
e2(3e1+e2)
K2 = --------------- (2)
(e1-e2)(8-e1-e2)
Solution:
Nonlinear. Simply shift the K1 and K2
terms from the LHS to the RHS of the equations.
(e1-e2)(3e1+e2)3
f1(e1,e2) = K1 - ------------------------ P2 = 0 (1)
(2-e1)(8-e1-e2)(10+2e1)2
e2(3e1+e2)
f2(e1,e2) = K2 - --------------- = 0 (2)
(e1-e2)(8-e1-e2)
Solution of the f(e)=0: start with an initial guess of, say,
e<0>=[1,1]T, then iterate with Newton's method.
e<j+1> = e<j> - fe-1(e<j>)*f(e<j>)
where fe(e<j>) is a 2x2 matrix of derivatives
of the two algebraic equations f1 and f2 wrt the two
unknown variables e1 and e2 evaluated at the jth iteration
of e, e<j>.
t -------Concentration (atm)--------- (nsec) YCO YH2 YH2O YCO2 YCH4 ----------------------------------------- 10 0.000 0.000 0.800 0.000 0.200 20 0.001 0.001 0.794 0.000 0.198 : : : : : : : : : : : :From these measurements, find the reaction rate constants k=[k1, k2, k3, k4]T
Solution:
This is a linear regression problem of the form y=X*k
where y is a 5nx1 vector of the difference of concentrations,
e.g., YCO(t)-YCO(0);
X is a 5nx4 matrix of the various integrated concentrations,
e.g., integral from 0 to t of YCH4*YH2O(t)*dx;
and k is a 4x1 vector defined in the problem statement.
Normal equation gives the solution.
k=(XT*X)-1*XT*y
T k1 k2 k3 k4 ------------------------------- 1000 : : : : 1200 : : : : : : : : : : : : : :Find activation energy for the first reaction Ea1. Activation energy for a reaction is defined as:
k(T)=k0*exp(-Ea/RT)
Solution:
Form the quantity to be minimized (sse), which is a function
of two parameters: k0 and Ea
Although less desirable, alternatively, we can find Ea1 from linear
regression of ln(k1) against 1/T.
sse(k01,Ea1) = Si [ k1i - k01*exp(-Ea1/RTi) ]2
We find minimum where the derivatives wrt to the parameters to be minimized are 0.
0 = d(sse)/dk01
0 = d(sse)/dEa1
Finally we find the solution to the above two nonlinear algebraic equations.
ln(k1) = ln(k10) - Ea/R*(1/T)
n=n0 + s*ewhere n and n0 are vectors of number of moles of the various species present at time t and that at t=0, respectively; e=[e1 e2]T is a vector of extents of reaction. What is s? Provide s (in vector/matrix notation) for the above system of two coupled reactions.
Solution:
The matrix s contains the stoichiometric coefficients of the reactions,
with the convention of negative signs for reactants and positive signs for products.
n = [nCH4 nH2O nCO nH2 nCO2]T
s = [ -1 -1 1 3 0 ]T ... Reaction #1
[ 0 -1 -1 1 1 ] ... Reaction #2
Solution:
Yes, they are linearly independent. Reason: two vectors sin(x)
and cos(x) are linearly independent if
a1*sin(x) + a2*cos(x) = 0
means a1=a2=0. In other words we cannot
express sin(x) as a linear combination of cos(x). Do not
confuse linear independence with the fact that we can express one
function in terms of another, e.g., sin(x+p/2)=cos(x) or
sin2(x)=1-cos2(x)
Solution:
Yes, they are linearly independent.
Again, the trig identity does not make them linearly dependent.
Solution:
Yes, they are linearly independent.
x2y" + x*y' + x2*y = y for x=[0,1] B.C.: y'(0)=0 y(1)=1
dy/dx ==> 0.5(yi+1-yi-1)/Dx d2y/dx2 ==> (yi+1-2yi+yi-1)/(Dx)2where Dx=1/n is the step size and n is the number of divisions.
Solution:
Substituting the finite difference approximation into the given ODE yields,
0 = (xi2-Dx/2*xi)*yi-1
+ (Dx2*xi2-2*xi2-a*Dx2)*yi
+ (xi2+Dx/2*xi)*yi+1 ... for all the internal points i=1,2,...,n-1
Boundary conditions:
y0-y1=0
yn=1
We can express these equations in the compact linear form A*y=b, where the matrix A's elements are:
For all the internal points i=1,2,...,n-1
Ai,i-1 = xi2-Dx/2*xi
Ai,i = Dx2*xi2-2*xi2-a*Dx2
Ai,i+1 = xi2+Dx/2*xi
For two end points,
A0,0=1 A0,1=-1
An,n=1 bn=1
Finally, we take the inverse of A to obtain a solution.
y=A-1*b
Solution:
Change n and see if the solution remains unchanged. For
example, double the number of divisions. If the solutions remain
unchanged (within some acceptable tolerance level), we have
converged to a solution.
Solution:
We have a linear algebraic equation of the form A*y=b;
thus, the solution is unique.
|