Math 230 Assignment 4 Due Date: May 19 5Pm
Total Page:16
File Type:pdf, Size:1020Kb
Math 230 Assignment 5 Submission is NOT REQUIRED. The answer will be provided on May 16. 1: Euler’s Method
(a) Given the initial-value problem 1 y' y ty 2 , 2 t 3, y(2) 2 t With exact solution y(t) (t 2 2 ee 2 ) 2
Use Euler’s method with h=0.25 to approximate the solution, and compare it with the actual value of y.
(b) Use answers generated in part (a) and linear interpolation to approximation the following value y(2.85) , and compare it with the actual value.
(c) Compute the value of h necessary for y(ti ) wi 0.01 using equation hM y(t ) w [e L(ti a) 1] in Theorem 5.9 (see page 261 of text book). i i 2L
2: Linear System of Equations
2.1: (a)Use Gaussian Elimination method to solve the following linear system, if possible, and determine whether row interchanges are necessary.
x1 +x2 +x4 = 2, 2x1 +x2 -x3 +x4 = 1, -x1 +2x2 +3x3 -x4 = 4, 3x1 -x2 -x3 +2x4 =-3.
2.2: Find the row interchanges that are required to solve the following linear system using (a) Gaussian Elimination with Backward Substitution; (b) Gaussian Elimination with Partial Pivoting; (c) Gaussian Elimination with Scaled Partial Pivoting and write its Algorithm.
5x1 +x2 -6x3 = 7, 2x1 +x2 -x3 = 8, 6x1 +12x2 +x3 = 9.
2.3: Solve the following linear system using matrix factorization technique.
1 0 02 1 1 x1 1 2 1 00 4 2 x2 0 3 0 10 0 5 x3 5 2.4 Factor the matrices into LU decomposition using the LU Factorization Algorithm with lii=1 for all i.
1 1 0 2 2 3 1 3 2
2.5. Using (a) Jacobi method and (b) Gauss-Seidel method to solve for the following || x K 1 x K || -3 linear system with TOL=10 in the l norm (i.e. K 1 TOL , K+1 is iterative || x || step required )
4x1 +x2 -x3 +x4 = -2, x1 +4x2 -x3 -x4 = -1, -x1 -x2 +5x3 +x4 = 0, x1 -x2 +x3 +3x4 =-1.
2.6. Find the first two iterations of the SOR method with 1.1 for the linear system, using x(0)=0
-2x1 +x2 +0.5x3 = 4, x1 -2x2 -0.5x3 = -4, x2 +2x3 = 0.
3: Discrete Least Squares
Find the least squares polynomials of degree 1 and 2 for the data in the following table. Compute the error E2 in each case. Graph the data and the polynomials.
xi 0 0.15 0.31 0.5 0.6 0.75 yi 1.0 1.0004 1.031 1.117 1.223 1.422 ______