DOC PREVIEW
CR MATH 45 - Matlab Exam #1

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Solutions to ExercisesCollege of the RedwoodsMathematics DepartmentMath 45 — Linear AlgebraMatlab Exam #1David ArnoldCopyrightc 2002 [email protected] Revision Date: October 6, 2002 Version 1.002Essay QuestionsRead Carefully! This part of the exam is closed book, closed notes, closed activity, etc. The only onlinematerials you may use are the Matlab help files. The exam must be completed at one sitting in the lab.Once you start the exam, you must finish the exam before you leave. You cannot start the exam, leave, thenreturn later to work on the exam. Please follow directions exactly.Exercise 1. This activity requires that you find two fourth degree interpolating polynomials passing througheach of the following points.(1, 2), (3, −4), (5, 5), (6, −1) (1)(a) On a sheet of college ruled paper, use the data points in (1) to set up a system four equations in fiveunknowns.(b) On your college ruled paper, set up the augmented matrix for the system crafted in part (a).(c) Use Matlab to place the augmented matrix in part (b) in reduced row echelon form. Copy the resultonto your college ruled paper.(d) On your college ruled paper, write down the system of equations represented by the reduced form of theaugmented matrix in part (c). Solve each equation for the pivot variable in terms of any free variable(s)1.Write these solutions on your college ruled paper.(e) Select a particular value(s) for the free variable(s) in part (d) to find one instance of an interpolatingpolynomial passing through each data point in (1). Clearly state the equation of this polynomial on yourcollege ruled paper. Use Matlab to craft a single plot the contains each of the following items.1. The data points in (1) plotted as discrete points.2. The graph of the interpolating polynomial.3. Appropriate labels for each axis and a title containing the equation of your interpolating poly-nomial.Print the resulting figure window and include the printout with your examination results.(f) Select a second particular value(s) for the free variable(s) in part (d) to find a second instance of aninterpolating polynomial passing through each data point in (1). Clearly state the equation of thispolynomial on your college ruled paper. Use Matlab to craft a single plot the contains each of thefollowing items.1. The data points in (1) plotted as discrete points.2. The graph of the interpolating polynomial.3. Appropriate labels for each axis and a title containing the equation of your interpolating poly-nomial.Print the resulting figure window and include the printout with your examination results.1When we write variable(s), we mean that it could be either “variable” or “variables.” Thus we are not forced to revealwhether there is only one free variable or perhaps there is more than one free variable. You, of course, have to determine thison your own.Solutions to Exercises 3Solutions to ExercisesExercise 1(a) We wish to find a fourth degree polynomialy = ax4+ bx3+ cx2+ dx + e (2)that passes through each of the data points (1, 2), (3, −4), (5, 5), and (6, −1). Substituting each of thesepoints in (2) leads to the following system of equations.2=a(1)4+ b(1)3+ c(1)2+ d(1) + e−4=a(3)4+ b(3)3+ c(3)2+ d(3) + e5=a(5)4+ b(5)3+ c(5)2+ d(5) + e−1=a(6)4+ b(6)3+ c(6)2+ d(6) + e(3)Exercise 1(b) The augmented matrix for system (3) is14131211 234333231−454535251 564636261−1. (4)Exercise 1(c) The augmented matrix (4) is easily entered in Matlab. Begin by entering the data points invectors x and y.>> x=[1;3;5;6]x=1356>> y=[2;-4;5;-1]y=2-45-1Now, enter the augmented matrix as follows.>> M=[x.^4,x.^3,x.^2,x,ones(size(x)),y]M=1111128127931-4625125255151296 216 36 6 1 -1Reduce.>> R=rref(M)R=1000-1/90 -107/36001001/6203/600010-77/90 -1349/119000117/10 41/4Solutions to Exercises 4Exercise 1(d) The augmented matrix from part (c) represents the following system of equations.a −190e = −107360b +16e =20360c −7790e = −1349119d +1710e =414e =free(5)Solve each equation in (5) for the pivot variable.a = −107360+190eb =20360−16ec = −1349119+7790ed =414−1710ee =free(6)Exercise 1(e) Substitute e = 0 in the system (6) to obtaina = −107360b =20360c = −1349119d =414e =0.(7)This gives an interpolating polynomialy = −107360x4+20360x3−1349119x2+414x. (8)Note that the plot of this polynomial passes through each of the given data points in Figure 1.Exercise 1(f ) Substitute e = 10 in system (6) to obtaina = −67360b =10360c = −29781071d = −274e =10.(9)Solutions to Exercises 50 2 4 6 8−15−10−50510y=−(107/360)x4+(203/60)x3−(1349/119)x2+(41/4)xx−axisy−axisFigure 1: An interpolating polynomial must pass through each data point.This leads to the interpolating polynomialy = −67360x4+10360x3−29781071x2−274x +10. (10)Note that the plot of this polynomial passes through each of the given data points in Figure 2.Solutions to Exercises 60 2 4 6 8−15−10−50510y=−(67/360)x4+(103/60)x3−(2978/1071)x2+(−27/4)x+10x−axisy−axisFigure 2: An interpolating polynomial must pass through each data


View Full Document

CR MATH 45 - Matlab Exam #1

Documents in this Course
Load more
Download Matlab Exam #1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Matlab Exam #1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Matlab Exam #1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?