This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: MEN, Sum met", 2W8
Midterm HamL—__._
Closed Hook Section I. {2 pts] What is meant by a direct algorithm? Give an example of a direct algorithm we have studied.
The 11‘me r31 ﬂickith t“ i" #:uijt‘t ﬂ 31"?P5J II}E~CA‘ we. a
' Gaucho elrmemlm
.. Fui‘jws mi ILI'. lu‘ib‘uukh‘L‘hh l 1.1.11.1. “ﬂlwhr
2‘ {Spits} ‘ ‘IEuj'i‘IEJUMFJ FIHrMj What are the two main sources of errors in numerical computations?I Give a brief
tie scri ptionitleﬁni tion of each. veg«A ‘GPGJ kglurtnlkeé “P! “Pr‘urLc wovcl lqﬂju— I‘m h. ._._, if}. £1...
‘ W / “was?
1"
rpm. W°¢i \ +'“'*Lu;'thw*. htjclnaL'ec bummulftel MPFWF‘
I'Wtﬂil'uel 1i»... Jigt 3. {3 pts}
A set of linear algebraic equations can be written in vectormatrix form as:
Ax=h
where at is the coefﬁcient matrix. at, the vector of unknowns. and b the vector of right hand
sirlcs. What does MATLAE return as a result of the following. statements? State clearly if E. S and e are scalars. Isectors or matrices. B:det[m 6=¢1¥E¢Miwt er} kp H tn Sturle S=ﬁrib S 1 JulvLim vista? I EHL ‘J'er'l'h
I "J‘ Lgﬂih+ Lenhi”, litI ‘
I: = InVIIA; C = k I a mu'} r7")!— grr terrain11 twihiﬁ
LLBEH, uniwt Haulr1}.
4. {2 pts} The exact answer to T sig ﬁgs for a certain problem is 3.23456". A. numerical calculation results
in an answer of 3.234244. How man}r significant ﬁgures does the approximate answer have? 21;: a l—Lﬁ'is'tﬂr I u“ at:
1:? At 3113 F1215 WHtJ— & in; L1: 5. [4 pts}
Below is a sketch of the first iterations of an algorithm that ﬁnds roots of a function. fix). What is this particular algorithm called? Show schematically and graphically how the rtext t}
iterate for the root is obtained. 2..  ma J 2. H's. 1:14? unthvujri r set s. {4 pts]
Here‘s a table of data. is it possible to generate a 5'“ order polynomial that goes through all the points? Explain. Elba +Lc kaG‘C' intiwisqtaiv’riwl
Wilyom it 1,.. .. 4 Zf’lﬁ. is it possible to fit a quadratic through these points in a leastrsquares sense‘iI Explain.
Yes as mums at at was
W lbw. LLQEE 991,, +b wk“? HIEq, 2. L 5gb?)wa *0 ‘F’E‘L "WVMHI fbgdgk RTE”, Summer, 2008
Midterm Open Book Section Djng Closed Book Score :18
Problem 1 1'15
Problem 2 1'10
Problem 3—1'10
Problem 4 £15
Total,—_i"68
15." Problem 1. [20 pts)
Consider the pipe network shown. There is a second order chemical reaction occurring in ti first tank. The second tank has a third order chemical reaction occurring in it. There is a
recycling stream. as shown. Q in
c_ Llntmrhoh Vim—Livws
i“
The mass balance law lich to the first tank gives: Qinctn+Q1C2_k{Cl [2:91:01 where k is the rate constan for the chemical reaction. It is a given constant. The mass bal nce on the seco tank gives where b is another chemical rate on tant. These give two equations in the two unknown concentrations. c. and c2. A. Is it possible to express these two equ ions in matriro'vector form? If so. do so. If not. explain why not. was“? cert “wmmlbﬁl’WiL ~E’ﬁ‘uicl‘iM. B. Suppose that we want to use the NewtonfRaphson method to find the concentrations in the tanks. Suppose that Qin : Q2 = Q3 = cm = i (which implies that Q. = 2} and the chemical rate
constants. it =U2 and b = H3. What is the Jacobian matrix for this problem“? Your answer
should he in symbols, i.e. it should be an analytical expression for each of the matrix elements.
Hint: the algebra is easier if you substitute in the values foe the Qs and k and b ﬁrst. new w ti» Wm W:
5( ) \+c1cLzc 70
l LULL * Z 3 I l; 3 _
4: Canal): ,ZC‘.It "lgclL ‘ZCL‘O golf
:5: 1‘
'1.
CzL Problem 2. (10 pts) Here is a table of X and y values. They are exact. Find the interpolating polynomial that goes
through these points. Use a Newton divided difference table and express your answer in the
Newton form. Show all your work. j"? W t Z 6—0) + 2000“ 0 1i 3 2x + MUM) Problem 3. (10 points) Consider the least squares fitting of a table of x and y values. Assume that there is no apparent
or consistent trend that suggests that y is a function of it (see sketch). Consider fitting a zero order polynomial (i.e. a constant) through the data using a least squares approach. Using the
"normal equations" as a starting point, prove that the zero order polynomial, (Le. the constant that minimizes the mean square error), is simply the arithmetic mean, i.e. the average, of all the
values, as suggested by the sketch. Problem 4. [15 pts} Consider the set of linear algebraic equations A x = I} where as usual. A is
the coefficient matrix. at the vector of unknowns. and h the vector of right hand sides. Consider the speciﬁc 2 x 2 system where A =  l 2; 3 lﬂl. and I} = II; 2!. ti} Verify by a direct calculation that 3?; L:[  {l :3 ll. U = [1 2:0 4] istheLUdecompositionefA.
ﬁtHLu'ﬂqlcul } W...
.5 we as t ' c5 1 z ttXrltutetto) (nutmeg) t3” «a ' a
(3 t ><e t > (an) we: (mom) 3 m
{ii} Consider the MATLAB statements
z=]_,‘t] LE: i'9 )(‘EDLﬂai '9'GYLu earl. Endrﬁisguffmt } x= Us”: gesture (ummsthtet law?“ What does the backslash operator signifyr in each of these expressions? (Hint: They are not the same}
4:“ [iii] Use these formulae to sol so the 23.2 system for a. Show at! your work, no matter how mmwe
<1 0mm ’3 nl ’Z‘L 2.. 321+2L12 Ez:—i ...
View
Full
Document
This note was uploaded on 08/06/2008 for the course ME 17 taught by Professor Milstein during the Summer '07 term at UCSB.
 Summer '07
 Milstein

Click to edit the document details