MAE284 Final UAH 150 Questions with Correct Answers
Suppresses outputs to the command window and separates rows in an array. -Answer- Semicolon A student is attempting to create a function file named quiz1_quiestion4.m After three tries, they type a function header that work correctly. All four attempts are listed below. Which one of the listed function headers is error-free? -Answer- function [d, e] = quiz1_question4(a, b, c) The false position method is based on the false assumption that the function can be approximated by a(n) ? -Answer- Straight Line Bracketing methods always require two initial estimates. -Answer- True The Bisection method is a bracketing method. -Answer- True For the bisection algorithm, the number of iterations required to attain a particular error cannot b calculated in advance. -Answer- False One disadvantage of the Newton-Raphson method is that it requires the user to analytically find the derivative of the function. -Answer- True Inflection points and local maximums and minimums greatly increase the speed at which the Newton-Raphson method converges. -Answer- False The main disadvantage of the Newton-Raphson method is that it may not converge. - Answer- True In the Newton-Raphson method, the new estimate at x(i+1) is the intersection of the tangent line and the x-axis. -Answer- True The main advantage of the Newton-Raphson method is that it always converges. - Answer- False Suppose you are given a matrix A, which commands will calculate the inverse of A? - Answer- A^(-1) A^-1 inv(A) Suppose you are given the following function: [a,b]=mae284(p,q,r,s) If the user does not specify the input value for 's', which line of code can be used to define a default value of s=100 within the function? -Answer- if nargin < 4, s=100; end can separate both array elements and multiple commands. -Answer- , comma Anonymous functions need to be defined before being used. -Answer- True MATLAB can solve problems without closed-form solutions. -Answer- True If the function values of a bracket have the same sign, there are guaranteed to be no roots in the bracket. -Answer- False Tangent points in a function can cause an opposite-valued bracket to contain an even number of roots. -Answer- True Bracketing methods always converge, but usually do so more slowly than open methods. -Answer- True The main disadvantage of the False Position method is that it can diverge. -Answer- False For the fourth iteration in the Newton-Raphson method, you will use the estimated root location from the third iteration as the new initial point. -Answer- True The main advantage of the modified secant method is that it does not require specifying a value for Delta(x). -Answer- False MATLAB's built-in fzero function uses a combination of a search algorithm, bisection, and inverse quadratic interpolation. -Answer- True For the third iteration in the Newton-Raphson method, you will use the estimated root location from the first iteration as the new initial point. -Answer- False The main advantage of the secant method is that it is guaranteed to converge. -Answer- False Which of the following functions can be used to find the number of roots of a function between a specified lower and upper bound. -Answer- incsearch All mathematical problems have a closed-form solution (i.e. they can be solved for a variable without having to make guesses) -Answer- False A NASA intern is writing a function with a single input in MATLAB to help detect sunspots automatically, but unfortunately they never payed attention in numerical methods and can't remember how. Help them out by selecting the appropriate component from the dropdown menu. -Answer- (telescopeData) The incremental search method is typically very fast, even when employing a high degree of precision. -Answer- False The False Position algorithm is identical to the bisection algorithm, except for the calculations for the estimated root location. -Answer- True For the bisection algorithm, the number of iterations required to attain a particular error cannot be calculated in advance. -Answer- False Another name for the False Position method is the regula-falsi method. -Answer- True The secant method is similar to the Newton-Raphson method, but.... -Answer- it does not require the derivative of the function to be known What is the first step if you are asked to find all real roots of a function? -Answer- Graph the function Select all the root-finding methods that require only one initial guess. Check all that apply: -Answer- Newton-Raphson Modified Secant When it converges, the Newton-Raphson method does so very quickly. -Answer- True Given two vectors a and b, which comand would you use to calculate the cross product of a and b? -Answer- cross(a,b) Which of the following commands generates an array of equally spaced elements? - Answer- x=0:0.1:10 The function name MUST be the same as the filename -Answer- True A student wants to skip the next three MAE284 labs, and is writing some MATLAB code to see what that will do to their GPA. They need to name a variable, but for some reason can't remember which names are valid. Of the potential variable names below, which one is valid? -Answer- GPA_no_skipping How many inputs are in the following function? [a,b] = quiz1(c,d,e,f,g) -Answer- 5 Newton-Raphson is not an iterative method. -Answer- False For the bisection algorithm, the number of iterations required to attain a particular error cannot be calculated in advance. -Answer- False Select bracketing methods. Check all that apply. -Answer- Incremental Search Bisection In mathematics, a root (a zero) of a function f(x) is a value for x that produces f(x)=0. - Answer- True The secant method requires two initial estimates, but they are not required to bracket the root. -Answer- True The secant method requires two initial estimates of x, but does not require an analytical expression of the derivative. -Answer- True Which command can be used to calculate the factorial of m? -Answer- factorial(m) Which of the following methods can be used to find the list of the lower bound and upper bound that bracket a root? -Answer- incsearch The incremental search method uses input values spaced at spaced intervals. -Answer- evenly Discontinuous functions can result in a bracket with opposite-signed function values having an even number of roots. -Answer- True The False Position method determines its next guess by drawing a straight line between the function elvaluated at the two brackets and seeing where it intersects the x-axis. - Answer- True MATLAB's built-in fzero function is based of the Newton-Raphson method. -Answer- False Select the Bracketing method(s). Check all that apply: -Answer- False Position Bisection In the method, the interval is divided in half and the function is evaluated at the midpoint. -Answer- Bisection The Bisection method is most effective when there are multiple roots inside a bracket. - Answer- False The Secant method and the Modified Secant method require the same number of initial guesses. -Answer- False The Secant method is similar to the method. Check all that apply: -Answer- Newthon-Raphson False Position Given the following function. function xr = newtraph(m) Which line of code can be used as a "check" to ensure that the user specifies an input, and if not set the input to 1. - Answer- if nargin<1 || isempty(m), m=1; end MATLAB's fminbnd function can be used to find the minimum value of a function of a single independent variable -Answer- True The parabolic interpolation method is usually faster than the golden section method. - Answer- True Every eigenvector is associated with two eigenvalues -Answer- False The key to Gauss Quadrature is to balance the positive and negative errors. -Answer- True The Trapezoidal rule approximates the function by a . -Answer- Straight Line Gauss Quadrature is a class of techniques for evaluating the area under a straight line by joining the function values at any two points on a curve (rather than the function at the endpoints) -Answer- True Romberg Integration involves multiple applications of which rule? -Answer- Trapezoid The Trapezoid Rule can be used to calculate the integral of a function or data with unequal-width segments. -Answer- True How many points would we need to determine a double integral using Simpsons 3/8 rule? -Answer- 16 Given a system of equations Ax=b, if det(A)=/ 0 and the number of equations equals the number of unknowns, there is a unique solution. -Answer- True In this class, if the determinant of a matrix is zero, the inverse of the matrix is not defined. -Answer- True Naive Gauss elimination can fail due to division by zero. -Answer- True If one row of a matrix is a linear combination of two other rows, then the determinant is zero. -Answer- True The second derivative of a function must be at a minimum. -Answer- Positive The goal of the golden section method is to reduce the range over which the search is conducted at each iteration. -Answer- True The golden section method helps to minimize computational costs in finding a maximum/minimum. -Answer- True MATLAB's fminsearch function can be used to find the minimum value of a function of two or more independent variables. -Answer- True The golden section method divides the interval into two sections -Answer- False MATLAB's mesh function can be used to visualize a function of two independent variables. -Answer- True The Trapezoid rule can be derived from the method of undetermined coefficients. - Answer- True The Trapezoid rule can be used to calculate the integral of a function or data with unequal-width segments. -Answer- True One way to increase the accuracy of Newton-Cotes integration techniques is to increase the order of the approximating polynomial. -Answer- True A straight line is a order polynomial. -Answer- First Numerical differentiation is not particularly susceptible to errors in data. -Answer- False The error for the "normal' accuracy versions of the forward, backward, and centered finite difference approximations is O(h2) -Answer- False For small step size h, decreasing the step size by half will result in less error than using a more accurate version (e.g using an O(h2) method instead of an O(h) method) - Answer- False The "stencil" size of a finite-difference approximation to a derivative is the number of function values required. -Answer- True The determinant of the 2x2 matrix [a b;c d] is ab-cd. -Answer- False In this class, if the determinant of a matrix is zero, the inverse of the matrix is not defined. -Answer- True If the determinant of a matrix is zero, the matrix is NOT singular. -Answer- False The Gauss Quadrature formulas we discussed in class are called Gauss-Legendre formulas. -Answer- True If the error of an integration technique is proportional to h2, we say the error is of order h2, which we write as O(h2) -Answer- True Simpsons 1/3 Rule can be used to calculate the integral of a function or data with unequal-width segments -Answer- False A single application of the Trapezoidal Rule requires computing the value of the function at how many points? -Answer- 2 How many points would we need to determine a double integral using Simpsons 3/8 rule? -Answer- 16 If two rows of a matrix are interchanged, the determinant changes sign. -Answer- True Only square matrices have determinants. -Answer- True Romberg's method is NOT a Newton-Cotes method. -Answer- False Romberg's method is a Newton-Cotes method. -Answer- True Double Integration can be thought of as calculating the volume under a surface defined by a function of two independent variables. -Answer- True Gauss Elimination is the systematic process of removing unknowns using forward elimination followed by back substitution to obtain the unknown values. -Answer- True Tangent points in a function can cause an opposite-value bracket to contain an even number of roots. -Answer- True The main advantage of the bisection algorithm is that it converges quickly. -Answer- False Eigenvalues are related to the mode shape. -Answer- False The principle of superposition works even if the equations are non-linear. -Answer- False Using an explicit method on a stiff system will, in general, take less time to run than an implicit method. -Answer- False The shooting method is used to solve initial value problems -Answer- False What are the two methods we have discussed that are used to solve boundary value problems? -Answer- Shooting Method Finite Difference MATLAB's ode45 function is an adaptive algorithm -Answer- True Which of the following is the simplest Runge-Kutta method? -Answer- Euler The only way to increase the accuracy of a numerical approximation of a derivative is to decrease the step size h. -Answer- False What will be the output of the following MATLAB code? x=[7 6 5 4 3 2 1]; x(3) -Answer- 5 MATLAB's fminbnd function uses both the golden section and parabolic interpolation methods. -Answer- True Numerical Integration can NOT be used to calculate the integral of the discrete data points -Answer- True Simpsons 3/8 Rule will result in zero error for a . Select all that apply. -Answer- 1st 2nd 3rd order polynomial The Trapezoidal rule can be used to obtain the integral over an interval divided into n=5 segments. -Answer- True If two rows of a matrix are identical, the determinant is zero. -Answer- True The determinant of ill conditioned systems is zero or nearly zero. -Answer- False Eigenvectors are related to the mode shape. -Answer- True MATLAB functions for stiff systems use Implicit methods -Answer- True The shooting method is based on guessing a value for one of the initial conditions and using an initial value algorithm. -Answer- True Which of the following are types of Boundary Conditions we discussed in class. - Answer- Neumann Gauss MATLAB's odeset function can be used to set various parameters for the ode45 function. -Answer- True When solving the Initial Value Problems, accuracy is the same thing as stability. - Answer- False Huens method is a first order Runge Kutta method -Answer- False Eulers is a first order Runge Kutta method. -Answer- True For C=[1 2;3 4] C./2 will divide each element in C by 2. -Answer- True The golden section search interval is reduced at every iteration by comparing the function values at x1 and x2, the interior points. -Answer- True Increasing the damping decreases the magnitude of the response at the resonance frequency -Answer- True Eigenvalues are the solutions to the equation: | A-(lambda)*I | = 0 -Answer- True Partial differential equations have a single independent variable. -Answer- False Partial differential equations have more than one independent variable. -Answer- True The error for the lower accuracy versions of the forward and backward finite-difference approximations is O(h) -Answer- True MATLABS's gradient function takes a vector of length n and returns a vector of length n. The first element is a forward difference while the last element is a backwards difference. The remaining elements are central differences. -Answer- True The error for the lower accuracy versions of the forward, backward, AND CENTERED finite difference approximations is O(h). -Answer- False ODE stands for Ordinary Differential Equation. -Answer- True The only difference between Euler's, Huen's, and the Midpoint methods for solving ODEs is the increment function. -Answer- True Propagated truncation error can result from using a large step size. -Answer- True In general, which of the following will take more time to calculate the solution for a stiff system? -Answer- An explicit adaptive algorithm (e.g. ode45) The method of elimination involves eliminating unknowns by combining equations. - Answer- True If A and B are the same size, then det(A*B)=det(A)*det(B). -Answer- True If one row of a matrix consists of entirely of zeros, then the determinant is zero. - Answer- True An upper triangular matrix is an echelon matrix. -Answer- True Simpson's 3/8 Rule approximates the function by a . -Answer- Cubic Polynomial Two applications where numerical integration is used are integrating discrete data points and when it is difficult or impossible to obtain an analytic solution. -Answer- True Simpson's 3/8 Rule approximates the function by a order polynomial. -Answer- Third One way to increase the accuracy of Newton-Cotes integration techniques is to increase the number of segments. -Answer- True The method of undetermined coefficients is a method to calculate the integral of a function. -Answer- True Adaptive Quadrature uses more segments in regions where the function changes slowly. -Answer- False The roots of a function f(x) are located at the points where the function crosses the x- axis. -Answer- True
Written for
- Institution
- MAE284 F
- Course
- MAE284 F
Document information
- Uploaded on
- May 22, 2023
- Number of pages
- 12
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- they type a f
-
suppresses outputs to the command window and separates rows in an array answer semicolon a student is attempting to create a function file named quiz1quiestion4m after three tries