midterm_solution_2008

midterm_solution_2008 - MEN Sum met" 2W8 Midterm...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the 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- flickith t“- i-"--- #:uijt‘t fl 31"?P5J II}E~CA‘ we. a ' Gaucho elrmemlm .. Fui‘jws mi ILI'. lu‘ib‘uukh‘L‘h-h l 1.1.11.1. “fllwhr 2‘ {Spits} ‘ ‘IE-uj'i-‘IEJUMFJ FIHrM-j What are the two main sources of errors in numerical computations?I Give a brief tie scri ptionitlefini tion of each. veg-«A ‘GPGJ kglurtnlkeé “P! “Pr‘urLc w-ovcl lqflju— I‘m h. --._._, if}. £1...- ‘ W / “was? 1" rpm. W°¢i \ +'“'*Lu;'thw*. htjclnaL'ec bummulftel MPFWF‘ I'Wtflil'u-el 1i»... Jig-t 3. {3 pts} A set of linear algebraic equations can be written in vector-matrix form as: Ax=h where at is the coefficient 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=firib S 1 Julv-Lim vista? I EHL ‘J'er'l'h I "J‘ Lgflih+ Len-hi”, lit-I ‘ I: = InVIIA; C = k I a mu'} r7")!— grr terrain-11 twihifi LLB-EH, uni-wt Haul-r1}. 4. {2 pts} The exact answer to T sig figs for a certain problem is 3.23456". A. numerical calculation results in an answer of 3.234244. How man}r significant figures does the approximate answer have? 21;: a l—Lfi'is'tflr I u“ at: 1:? At 31-13 F1215 WHtJ— & in; L1: 5. [4 pts} Below is a sketch of the first iterations of an algorithm that finds 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 Wily-om it 1,.-. -.. 4 Zf’lfi. 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“? HIE-q, 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 1-5." 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 “wmmlbfil’WiL ~E’fi‘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 first. new w- ti» Wm W: 5( )- \+c-1cL-zc 7-0 l LULL * Z 3- I l; 3 _ 4: Canal): ,ZC‘.It "lg-clL ‘ZCL‘O golf :5: 1‘ '1. -Cz-L 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) + 20-00“ 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 specific 2 x 2 system where A = | l 2; 3 lfll. and I} = II; 2!. ti} Verify by a direct calculation that 3?; L:[ | {l :3 ll. U = [1 2:0 4] istheLUdecompositionefA. fitH-Lu'flqlcul } 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 )(‘ED-Lflai '9'GYLu earl. Endrfiisgu-f-fm-t } 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.

Page1 / 7

midterm_solution_2008 - MEN Sum met" 2W8 Midterm...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online