QuestionQuestion

Transcribed TextTranscribed Text

D Question 1 Convert the given binary number into decimal: (110000)2 0 64 0 34 0 46 0 48 3 ptsD Question 2 4 pts For the function when it is hard to compute, which equivalent function would you rather use to compute f ( x) accurately? 0 f(x) == - ✓4x2 + 1 - 2lx l 0 None of the other answers. 0 f(x) == ✓4x2 + 1- 2lxl 0 f(x) - 1 ~ 2lx l + ✓4x2 + 1D Question 4 Write a Matlab script to plot the function on the interval O -< x -< 2. 0 x=0:0.01:2; y=x/(x+1); plot(x,y) 0 x=0:0.01:2; y=x./(x+1); plot(x,y) 0 x=0:0.01:2;y=x./(x+1); plot(y,x) 0 x=0:0.01:2;y=x/(x+1);plot(y,x) X y= x+ l 3 ptsD Question 5 4pts Let f ( x) be a function which has a Taylor series about x == -1, and let f 4 ( x) be the partial sum of the first 5 terms. What is an estimated bound for the error E5 == If ( x) - f 4 ( x) I ? 0 E5 < ;, f (5) (~)(x + 1)5 for some ~ between x and -1 0 E5 < ;, f (4) (~)(x + 1)4 for some ~ between x and -1 0 E5 < ;, f (5) (~)(x + 1)5 for some ~ between x and -1 ) Question 6 Consider the data set: X i 1 2 3 Yi 4 0 - 1 4 pts Let p( x) == a 2 x 2 + a 1 x + a0 be a polynomial that interpolates the data set. Which of the following linear system would give the solution for ( a0 , a1 , a2 )? 0 0 0 1 a2 0 4 2 1 a1 4 9 3 1 ao -1 0 1 1 1 a2 -1 4 2 1 a1 0 9 3 1 ao 4 0 9 4 1 a2 0 4 2 1 a1 0 2 3 1 ao 0 0 1 1 1 a2 4 4 2 1 a1 0 9 3 1 ao -1 D Question 7 4 pts Given the interpolating points at ( - 1, 1, 2, 4), which of the following is the cardinal function associated with the point x == - l ? O 1 1 2 (x + l)(x - 2)(x - 4) Q - 1 1 2 ( X + 1) ( X - 1) ( X - 2) Q - 1 1 2 ( X + 1) ( X - 1) ( X - 2) 0 _ _!__(x - l)(x - 2)(x - 4) 30D Question 8 The polynomial p( x) == x4 + x2 - 8 has the values shown. X 1-21-1 I O 11 12 p(x) 12 - 6 - 8 - 6 12 Find a polynomial q( x) of degree 5 that takes these values X 1-2 1-l I O 11 I 2 I 4 q(x) 12 -6 -8 -6 12 -96 0 q(x) == p(x) - ~ (x + 2)(x + l)x(x - l)(x - 2) 0 q(x) == p(x) + ! (x + 2)(x + l)x(x - l)(x - 2) 0 q(x) == p(x) + ! (x + 2)(x + l)(x - l)(x - 2)(x - 3) 0 q(x) == p(x) 4 ptsD Question 9 3 pts Let li ( x) be the cardinal function associated with the point X1 for a given set interpolating points ( x0 , x 1 , x 2 , x 3 ) . Then we must have li ( x 3 ) == 1. 0 True 0 FalseD Question 10 4 pts Which code will assign value 2 to t only if x is bigger than O? 0 if t>01 x=2; end "'- - ' if x=O ' t=2·' end 0 if x>O, t=2; end 0 if x>=O, t=2D Question 11 Consider the piecewise polynomial, S(x) < to < X < t1, t1 < X < t2, Which of the following statement will make S( x) NOT a quadratic spline? 0 S' ( x) is a continuous function. 0 For some i , we have Si ( x) == constant. Q For some i , we have S? ( ti+l) == 0, s;~l ( ti+l) == 1. 0 S' ( x) is a discontinuous function. 4 ptscD Question 13 If S( x) is a cubic spline function, then S" ( x) is a linear spline function. 0 True 0 False 3 ptsD Question 15 Find the value a that will make the following a linear spline: S(x) = {x, X - a, O a = O n Such value does not exist. 0 a= - 2 0 < X < 1, 1 < X < 2. 4ptsD Question 16 4pts Consider the integral fl 1 Jo 2x+l dx. What is the value you would get if you compute the integral with Simpson's rule using only the values at x = 0, 0.25, 0.5, 0. 75, 1, using 4 decimal places? 0 0.5500 0 0.6897 0 1.1023 0 1.5634D Question 17 Consider the integral fl 1 Jo 2x+2 dx. To compute the integral with trapezoid rule with error tolerance of 10- 6, approximately how many points are needed? 0 812 0 290 0 443 0 40 4ptsD Question 18 4 pts Find the degree of precision for the following rule. J2 1 f(x) dx = 2f(O) 0 2 n 3 Q o n 1D Question 19 We use Simpson's rule to computer an integral I ( h) ~ S == f0 2 f ( x) dx where h is the sub-interval length. Assume that the error is estimated by E(h) == I(h) - S ~ C1h4 + C2h6 + · · · Given that J(0.2) == 5.4678, J(O.l) == 5.4076 Find a better approximation to the integral. 0 5.4327 0 5.4098 0 5.4036 0 5.4670 4 ptsD Question 20 Given the Matlab code for the function function v=fv(x) v=(x+l).A(-1); end 4 pts ---------------------------' Will the following Matlab script compute the integral from Oto 2 using n + 1 points, using trapezoid rule? I a=0; b=Z; h=(b-a)/n ; x=[a:h :b]; V=sum(fv(x)))*h; 0 True 0 FalseD Question 21 The function f(x) = x - ex+ 2 has a zero on the interval [-2, O]. 0 True 0 False 3 ptsvD Question 22 4 pts We consider bisection method for finding the root of the function f ( x) == x 3 - 6 on the interval [-2, 2], so x 0 == 0. We perform 2 steps, and our approximations X1 and x2 from these two steps are: C X1 == 0D Question 23 Perform 1 step of secant iteration to find the root of f ( X) === ex - 2 with xo === 2, x 1 === 1, we would get: 0 X2 === 1.7459 0 X1 === 0.8462 0 X2 === 0. 7358 Q X2 === 0.5820 4 ptsD Question 24 Fixed point iteration sometimes has linear convergence. 0 True 0 False 3 pts.3, X2 == 0.6 D Question 25 4pts Assuming that we are performing a fixed point iteration which converges linearly. Let ek be the absolute error of iteration step k. Which of the following could be possible errors for the first 3 iterations? n e0 = 0.04, e1 = 0.02, e2 = 0.04 0 eo = 0.005, e1 = 0.005, e2 = 0.005 0 eo = 1.2, e1 = 0.6, e2 = 2.3 C1 eo = 0.11, e1 = 0.055, e2 = 0.0275D Question 26 3 pts What is the solution to the following 2 x 2 system of linear equations? 0 X = 3, y= - 2 0 X = 2, y=4 C'1 X = l, y= - 1 0 X = 2, y= - 5D Question 27 3 pts The following matrix is tri-diagonal: -5 1 0 0 0 1 -5 1 0 0 0 1 -5 1 0 0 0 1 - 5 1 0 0 0 1 - 5 0 True 0 FalseD Question 28 Consider the system of linear equations { 4x + y x + 4y 5 5 3 pts Performing one step Jacobi iteration with initial guess x0 = 0, y0 = 0 , we will get: 0 x1 = 1.25, y1 = 1.25 0 x1 = 2.2, y1 = 4.5 0 x1 = 1 ' yl = 1 0 x1 = 0.25, yl = 1D Question 29 The largest condition number for a matrix is 1. 0 True 0 False 4 ptsD Question 30 4pts Let x == ( x1 , x2 , • • • , Xn )t be a column vector and A == { aij} be an n x n square matrix. Let llxll denote certain vector norm and IIAII be the associated matrix norm. Then IIAII == maxllx ll=l IIAx ll 0 True 0 FalseD Question 31 Consider the system of linear equations { 3x + y x + 3y 9 6 4pts Performing one step Jacobi iteration with initial guess x0 = 0, y0 = 0, we will get: 0 x1 = 2, yl = 3 0 x1 = 3, y 1 = 3.5 0 x1 = 2.2, y 1 = 4.5 0 x1 = 3, yl = 2D Question 32 Consider the system of linear equations 4x + y+ z = 8 X + 5y+ Z = 4 X + y + 6z = 2 Which of the following is the Gauss-Seidel iteration for step k ? 0 ~ 4xk+ l = 8 + yk + zk ◄ 5yk+ 1 = 4 + xk + zk "6zk+ l = 2 + xk + yk 0 ~ 4xk+ l = 8 - yk - zk ◄ 5yk+l = 4 - xk - zk "6zk+ l = 2 - xk - yk 0 ,.. 4xk+ l = 8 + yk+ l + zk+ l ◄ 5yk+ 1 = 4 + xk+ 1 + zk \. 6zk+ l = 2 + xk+ l + yk+ l 0 ,.. 4xk+l = 8 - yk - zk ◄ 5yk+ 1 = 4 - xk+ 1 - zk , 6zk+ l = 2 _ xk+l _ yk+ l 4 ptsD Question 33 4 pts Given the splitting of a square matrix A = L + D + U where L is lower triangular, D is diagonal, and U is upper triangular. The Jacobi iteration can be written in the general form with which choice of ( M, y)? 0 M = -(D + L)-1U, y = (D + L)-1b n M = (D + L)-1L, y = (D+L)-1b 0 M = -D- 1(L + U), y = D-1b 0 M = D-1(L-U), y = D-1bD Question 34 3 pts Consider the iteration of the form where Xk, b are column vectors of length n , and M is an n x n matrix. If IIM II > 1 in some matrix norm, then the iteration always converges with any initial guess. 0 True C FalseD Question 35 3 pts If A == tri-diag( -1, -4, 1) , then solving Ax == b with SOR iteration with w == l.2 will always converge for any initial guess. (; True 0 FalseD Question 37 4 pts Find a linear function y == ex that best fits the data with least square error X i 1 4 Yi -2 2 8 0 y == 17x 0 y == 197 X 0 10 ITX 0 y == 167 XD Question 38 4 pts Given the error function the normal equations that will find the values of ( a, b) which minimize the error will look like: 0 m m a · L ( sin x k) + b · L sin x k - 0, k=O k=O 0 m m a· L(sin x k)2 + b · L sin Xk = 0, k=O k=O 0 m m a · L ( sin x k) + b · L sin x k = 0, k=O k=O 0 m a · L sin Xk + mb - 0. k=O m a· L sinxk + (m + l)b = 0. k=O m a·Lsinxk + (m + l)b = O k=OD Question 39 3 pts In the linear least squares method, there are as many normal equations as there are basis functions. 0 True Q FalseD Question 40 The functions f(x) = ~ x and g(x) =cos(! x) are orthogonal on [- 1r, 1r], such that J:1r f(x)g(x)dx = 0 0 True 0 False 4ptsD Question 41 Which of the following is for sure a uniform grid for time { t k} f O ? 0 to < t1 < · · · < t N C1 tk+l - tk = 0.lk n tk+l - tk = 0.1 0 t3 = to + 0.03 3 ptsD Question 42 4 pts Consider the ODE X1 ( t) == X - 2t To solve it with Taylor Series method of m == 1 with uniform grid size h , which of the following will be the iteration step? 0 Xk+l == Xk + h(xk - 2k)D Question 43 3 pts Consider the system of OD Es x' == Ax, where A is an n x n symmetric matrix and x is a vector of length n . Then, if the eigenvalues of the matrix A satisfy Ai == 0.01, A2 == 1890, the system is rather stable with respect to perturbation and thus easy to solve numerically. C True 0 FalseD Question 44 4 pts Consider the following ODE with initial condition X 1 = X + t, x(l) = 1 We solve it with implicit backward Euler method, with uniform time step h and initial values t0 = 1, x0 = 1. Which of the following is the formula for step n ?D Question 45 Given the ODE with initial condition X 1 ( t) == X + t, x(l) == - 1 We solve it with Heun's method, using time step h == 0.02. What is the approximate solution for x(l.02)? 0 -0.9998 0 -0.9908 0 -1.0000 0 -1.0002 4 ptsD Question 46 Let y(x) and y(x) solve the equations y"' + xy' = ex , Then, the function solves which equation? 0 y"' + xy' = ex 0 y"' + 2xy' = ex 0 None of the other answers here. 0 y"' + xy' = 2ex 3 pts f/" + 2xy' = ex .D Question 48 The following finite difference method Xi == ih, Yi-l - 2yi + Yi+l == h2 Xi (1 - Xi ). for the equation is first order. 0 True 0 False y" == x(l - x), y(O) == 0, y(l) == 0 3 ptsD Question 49 Consider the two-point boundary value problem y" ( X) == y + x2 , y' (0) == 1, y(2) == 2. To solve it with shooting method, we let y(.x) be the solution of j} 11 ( X) == j} + x2 , and let fj ( x) be the solution of f} 11 ( X) == fj + x2 , Let now y' (0) == 1, y(O) == 0, y' (0) == 1, fj(0) == 2. y == ,,\y + (1 - --\)fj 4pts For what value of A will this y be the solution of the two-point boundary value problem? 0 None of these functions. 0 ,,\ == -2- y~2) . y(2)-y(2) -, 0 A == -1-y ~2) . y(2)- y(2) 0 ,,\ == 2- y(2) . -, -, y (0)-y (0)D Question 50 4 pts Consider the two-point boundary value problem y"(x) -y'(x) == 2xy, y(O) == 0, y(l) == 1. We discretize the equation using central finite difference, with uniform grid of mesh size h == l , such that y0 == 0, Yn == l, X i == ih. Which of the n following is the correct discretization, for i == 1, 2, • • • , n - l ?D Question 51 The following computational stencil is for Finite difference method for Heat equation Ut = Uxx with CrankNicholson time step. 0 True 0 False 3 ptsD Question 52 Consider the discrete equation U·-1 · - 2u · · + U ·+1 · 'l, ,J i,J 'l, ,J h2 2u·i, J· -1 - 4ui·, J· + 2u·i, J· + 1 + h2 Which PDE could correspond to this discretization? 0 U xx + Uyy - 4ux + U == 0. 0 U xx + 2uyy - U x + U == 0 . 0 U xx + Uyy - 2ux + U == 0. 0 U xx + 2uyy - 2ux + u == 0. 4 pts Ui+l,j - Ui-1,j ___2_ h _ + Ui,j = 0.D Question 53 3 pts We solve the heat equation with finite difference method using forward Euler time step. What is the CFL stability condition? 0 1 ~t < -~x. - 8 0 1 ~t < 2(~x)2. 0 1 ~t < -~x. - 2 0 1 ~t < 8(~x)2.D Question 54 4 pts Consider the equation with the numerical scheme u~+l - u": 1, 1, u": 1 - 2u7: + u":+1 u~+l - 2u~+l + u~+l i - i i + i -1 i i +l 2(~x)2 2(~x)2 What method is this? Q Forward Euler, an explicit method 0 Backward Euler, an implicit method Q None of these 0 Crank-Nicolson schemeD Question 55 The forward Euler step for solving heat equation is unconditionally stable. 0 True 0 False 3 pts

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

1 d
2 a
3 a
4 b
5 b
6 d
7 d
8 a...
$50.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available MATLAB for Computer Science Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats