Math128AFinalExamSpring2024Solutions (1)

.pdf
School
University of California, Berkeley**We aren't endorsed by this school
Course
MATH 128A
Subject
Mathematics
Date
Dec 20, 2024
Pages
10
Uploaded by riskestsmile
Prof. Ming Gu, 861 Evans, tel: 2-3145Email: mgu@math.berkeley.eduMath128A: Final ExamThis is a closed book exam, with the exception of a one-page cheatsheet on one side only.You are allowed to cite any results, up toSection 6.6 but excluding those in the exercises, from the textbook.Results from anywhere else will need to be justified.Completelycorrect answers given without justification will receive little credit.Partial solutions will get partial credit.ProblemMaximum ScoreYour Score112.5212.5312.5412.5512.5612.5712.5812.5Total100Your Name and SID:
Background image
Math128A: Numerical Analysis Final Exam21. Letg(x) =35x+ 3.Show thatg(x) has a fixed point atpprecisely whenf(p) = 0, wheref(x) =x35x3.Show thatg(x)[2,3] for anyx[2,3].Consider the fixed point iterationxk+1=g(xk)fork= 0,1,· · ·withx0[2,3].Show that this iteration converges.Solution:(a)g(x) has a fixed point atpif and only ifp=g(p), which is equivalenttop3= 5p+ 3,orp35p3 = 0,i.e.,f(p) = 0.(b) For anyx[2,3], we havex2 andx3.For anyx2, we haveg(x)35×2 + 3>2For anyx3, we haveg(x)35×3 + 3<3Thereforeg(x)[2,3] for anyx[2,3].This shows there must bea fixed point atp[2,3].(c) Since for anyx[2,3], we haveg(x) =53(5x+ 3)2353(5×2 + 3)23<1,it follows from fixed point iteration convergence theorem that thisiteration converges.
Background image
Math128A: Numerical Analysis Final Exam32. Determine constantsa, bandcthat will produce a quadrature formulaZ10f(x)dxa f(0) +b f(1) +c f13that has degree of precision 2.Solution:To reach degree of precision 2, we must make sure the quadra-ture is exact forf(x) = 1, x, x2:1 =Z101dx=a+b+c(1)12=Z10x dx=b+c3(2)13=Z10x2dx=b+c32(3)(2)(3),16=2c9,=c=34From (2),b=12c3=14From (1),a= 1bc= 0Only need to work out the equations, not necessarily the exact values fora, b, c.
Background image
Math128A: Numerical Analysis Final Exam43. Consider a quadrature of the formZ11f(x)dx5Xj=1cjf(xj)(1)for nodesx1,· · ·, x5[1,1] and constantsc1,· · ·, c5.Assume thatquadrature (1) is exact forf(x) = 1, x. Show that the following quadra-tureZbaf(x)dx5Xj=1bcjf(bxj)(2)withb > aandbcj=ba2cj,bxj=b+a2+ba2xjforj= 1,· · ·,5is exact forf(x) = 1, x.Solution:From given conditions, (1) implies2 =Z101dx=5Xj=1cj0 =Z10x dx=5Xj=1cjxjThereforeforf(x) = 1,ba=Zba1dxand5Xj=1bcj=ba25Xj=1cj=baforf(x) =x,b2a22=Zbax dxand5Xj=1bcjbxj=ba25Xj=1cjb+a2+ba2xj=ba2b+a2×2 =b2a22
Background image
Math128A: Numerical Analysis Final Exam54. LetA=110131011Show that the matrixAis symmetric positive definite.Compute the LU factorization ofAwithout partial pivoting.Solution:Ais symmetric. Letx=x1x2x3non-zero. ThenxTAx=x21+ 2x1x2+ 3x222x2x3+x23=(x1+x2)2+x22+ (x2x3)20ForxTAx= 0, we must have(x1+x2) =x2= (x2x3) = 0,which meansx1=x2=x3= 0,which is impossible.ThereforeAissymmetric positive definite. For the LU factorization ofAwithout partialpivoting,A=100110001110021011=10011001211100210012
Background image
Math128A: Numerical Analysis Final Exam65. Show that the initial value ODEy=t|y|+ 1,for0t1,y(0) = 1.is well posed onD={(t, y)|0t1,−∞< y <∞}.Solution:Letf(t, y) =t|y|+ 1. It is straightforward to argue thatf(t, y) is continuous for alltandyonD. To show the ODE is well posed,we only need to showf(t, y) is Lipschitz continuous for alltandyonD.To this end, note that for anyu,|f(t, y)f(t, u)||−t|y|+t|u|| ≤t|yu| ≤ |yu|Thus the Lipschitz constant forf(t, y) onDis 1.
Background image
Math128A: Numerical Analysis Final Exam76. LetA=11103α012∈ R3×3.Compute the determinant ofA.For what values ofαdoesA1exist?ComputeA1when it exists.Solution:Compute the LU factorization ofAwithout partial pivoting,A=100010013111103α002α3The determinant ofA= 3(2α3)= 6αA1exists if only only if the determinant ofA̸= 0. ThusA1existsif only only ifα̸= 6.Forα̸= 6,A1=100010013111103α002α31100010001=11103α002α3110001001311100010001=11103α002α311000100131=116αα36α026αα6α016α36α
Background image
Math128A: Numerical Analysis Final Exam87. Consider the piece-wise functionP(x) =1,forx(1,0],a+b x+c x2,forx[0,1)Find conditions on constantsa, b, cso thatP(x) is second order continu-ously differentiable on (1,1).Solution:P(x) is smooth in (1,1) except atx= 0.We must haveP(0+) =P(0),P(0+) =P(0),P′′(0+) =P′′(0)forx <0,we haveP(x) = 1, P(x) = 0, P′′(x) = 0forx >0,we haveP(x) =a+b x+c x2, P(x) =b+ 2c x, P′′(x) = 2cTherefore, we must have1 =a,0 =b,0 = 2cHencea= 1, b=c= 0.
Background image
Math128A: Numerical Analysis Final Exam98.(a) Let functionf(t, y1, y2) =t y12sin(y2)+t21.Find the Lipschitzconstant forf(t, y1, y2) on the domainDdef={(t, y1, y2)|0t1,−∞< y1<,−∞< y2<∞}(b) Convert the following second order initial value differential equationinto a system of first order initial value differential equationsy′′+y=t et,0t1,y(0) = 1,y(0) =1.Solution:We will use the following trigonometric identitysinαsinβ= 2sinαβ2cosα+β2and therefore|sinαsinβ| ≤2αβ2≤ |αβ|(a) For anyu1, u2,f(t, y1, y2)f(t, u1, u2) =t(y1u1)2 (sin(y2)sin(u2))and|f(t, y1, y2)f(t, u1, u2)|t|y1u1|+ 2|sin(y2)sin(u2)||y1u1|+ 2|y2u2| ≤2 (|y1u1|+|y2u2|)Thus the Lipschitz constant forf(t, y1, y2) onDis 2.(b) Define a vector functionu=u1u2def=yyThenu=u1u2=yy′′=u2t etu1def=f(t,u)Thus the system of first order initial value differential equations isu=f(t,u),0t1,u(0) =11.
Background image
Math128A: Numerical Analysis Final Exam10Your Name and SID:
Background image