
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































Question 1. Fixed Point Convergence Correct Answer: If g is continuously differentiable, g(r)=r, and ‖g'(r)‖<1, then the fixed point iteration converges linearly with rate S to the fixed point r. S=‖g'(r)‖
Question 2. Newton's Method Correct Answer: Approximates the root of non-linear functions by finding the root of the tangent line. In the second iteration, plug in the approximation from the first iteration as "x_n". Repeat recursively.
Question 3. Newton's Method Convergence Correct Answer: Newton's Method converges quadratically to a root x if f'(r)≠ at rate M. M=lim(e_(i+1))/e_i²
Question 4. Derivation of Newton's Method Correct Answer: f'(x_0)(x-x_0)=0-f(x_0) x-x_0=-f(x_0)/f'(x_0) x=x_0-f(x_0)/f'(x_0)
Question 5. Secant Method Correct Answer: Approximates the root of the function by taking the secant line through the last two approximation. The new guess is the point in which the secant line intersects the x-axis. Start with two initial approximations p₀ and p₁. The next guess, p₂, is the x-intercept of the line joining (p₀,f(p₀) and (p₁,f(p₁). The approximation p₃ is the x-intercept of the line joining (p₁,f(p₁)) and (p₂,f(p₂)), and so on.
Question 6. Method of False Position Correct Answer: Combination of the Secant Method and the Bisection Method. It uses the Bisection Method to ensure that the two previous approximations used for the secant line have opposite signs. Choose initial guesses p₀ and p₁ with opposite sides (p₀p₁ < 0). The next guess, p₂, is the x-intercept of the line joining (p₀,f(p₀) and (p₁,f(p₁). Use p₀ and p₂ or p₁ and p₂ as your next guesses. Use p₀ and p₂ if f(p₀) and f(p₂) have opposite signs. Else, use the other option. Continue until f(p_n)=0.*
Muller's Method
Correct Answer: A root-finding method that draws a parabola through the three previous approximations and looks at where it intersects the x-axis. It generally intersects at 0 or 2 points. If there are two points, then the point nearest the last point is chosen as the newest approximation. If there are 0 points, then there are complex solutions.
IQI (Inverse Quadratic Integration)
Correct Answer: A root-finding method that draws a parabola in the form x=p(y) through 3 approximations.
LU Factorization
Correct Answer: A=LU Lc=b Ux=c
Decimal to Binary Conversion
Infinity Norm
Correct Answer: The _____________ of a vector is the maximum of the absolute values of the components of the vector.
Matrix Norm of a Square matrix
Correct Answer: Maximum absolute row sum of the matrix
partial pivoting
Correct Answer: The largest entry of the first column is located, and its row is swapped with the pivot row.
Error magnification error
Correct Answer: Relative forward error/Relative backward error
Symmetric Matrix
Correct Answer: A symmetric matrix is a square matrix that is equal to its transpose.
Positive Definite
Correct Answer: A matrix is _________ if x^(T)(Ax) is positive for all non-zero vectors x.*
Cholesky Factorization Theorem
Correct Answer: If A is a symmetric positive-definite n x n matrix, then ∃ an upper triangular n x n matrix R such that A=R^(T)(R) We can use this theorem to solve for Ax=b.*
Conjugate Gradient method
Correct Answer: x_k = approximate solution at step k r_k=residual of x_k b-Ax) d_k=new direction to update x_k Each residual is arranged to be orthogonal to the other residuals. ventually, the residual should be 0.
Lagrange Interpolation
Newton's Divided Difference
Correct Answer: A method of finding the Interpolating polynomial of a data set with less calculations required. P₂(x)=f(x)+fx₁,x₂+fx₁,x₂,x₃(x-x₂)
Chebyshev Interpolation
Correct Answer: Instead of using evenly spaced points as the x_i's (base points), we choose the Chebyshev nodes that minimize the error by minimizing (x-x1)(x-x2)...(x-xn)
Cubic Spline Interpolation
Correct Answer: Set of cubic polynomials that interpolate a data set.
Properties of cubic splines
Correct Answer: S_i(x_i)=y_i and S_i(i+1)=y_(i+1) for i=0,1,..,n- S'(i)(x(i-1))=S'(i+1)(x_(i-1)) for i=0,1...,n-2 S''(i)(x(i-1))=S''(i+1)(x_(i-1)) for i=0,1,...,n-
Natural cubic spline
Correct Answer: Splines such that S''1(x_i)=0 and S''(n- 1)(x_n)=0.
Two-Point Difference Formula
Correct Answer: f'(x₀)=(f(x₀+h)-f(x₀))/h (for small values of h) This is based on the definition of derivative. The disadvantage is round- off error.
Intermediate Value Theorem
Correct Answer: If f is continuous on [a,b] (a1+...+a_n)f(c)=a_1f(x_1)+a_2f(x_2)+...
Extrapolation
Correct Answer: Q=(2^(n)F(h/2)-F(h) ÷ 2^n - 1) Q=N₁(h)+K₁(h)+K₂h²+K₃h³+...
Trapezoid Rule
Simpson's Rule
Correct Answer: b∫a f(x) dx ≈ (b - a)/6 [f(a) + 4f((a+b)/2) + f(b)]
an integral using _______, use coefficients c_i's and plug 'x' in as the "x_i's".
Euler formula
Root of unity
Correct Answer: ∑w^(jk) = n if (k/n) is an integer or 0 if (k/n) is not an integer.
Discrete Fourier Tr
Correct Answer: form (DFT) Answer: The n-dimensional vector that interpolates a set of data points under the assumption that the data is periodic. y_k = (1/√n)∑x_j It requires n^2 operations
Fast Fourier Tr
Correct Answer: form (FFT) Answer: y_k = (1/√n)M(vector x)**
Fixed Point Iteration
Correct Answer: A root-finding method in which you find a point (x, f(x)) where x=f(x). Rewrite f(x)=0 as g(x)=x, using algebra. Start with a guess x₁ and find g(x₁). Use g(x₁) as your next guess. In other words, if g(x₁)=x₂, try g(x₂). Repeat this process until you find a point x_n such that x_n=g(x_n).
cubic spline formula
Correct Answer: S₀(x)=a₀+b₀(x-x₀)+c₀(x-x₀)²+d₀(x-x₀)³ for [x₀,x₁] S₁(x)=a₁+b₁(x-x₁)+c₁(x-x₁)²+d₁(x-x₁)³ for [x₁,x₂] ...
Absolute error
Correct Answer: Let p be an approximation for p. Then ‖p- p‖ is the ___________.**
Relative error
Correct Answer: Let p be an approximation for p. Then ‖p- p‖÷‖p‖ is the ____________.**
Romberg Integration matrix terms
Correct Answer: R₁₁=h₁/2(f(a)+f(b)) R₂₁=h₂/2(f(a)+2f((a+b)/2) and so on, where h₂=(h₁/2). R₂₂ is extrapolation applied to the R₁₁ and R₂₁ approximations. R₂₃ is extrapolation applied to the R₂₁ and R₃₁ approximations.
Taylor's Theorem Exp
Correct Answer: ions Answer: f(x+h)=f(x)+hf'(x)+(h²/2)f''(x)+(h³/3!)f'''(x)... f(x-h)=f(x)-hf'(x)+(h²/2)f''(x)-(h³/3!)f'''(x)... f(x+2h)=f(x)+2hf'(x)+(4h²/2)f''(x)+(8h³/3!)f'''(x)...
Composite Simpson's Rule
Correct Answer: n=number of steps h=step size=(b-a)/n
Taylor's Theorem Error Bound
h (in Simpson's Rule and Trapezoid Rule)
Correct Answer: (b-a)/n
Error formula for polynomial interpolation
For the following conditions: x = 0:0.25:10; y(1) = 5; dydx = @(y) tanh(y); which of the following for loops could be make to work with Euler's Method?
Correct Answer: Both of them
Which symbolic command is used to solve differential equations?
Correct Answer: dsolve
A mathematical model can be broadly defined as a formulation or equation that expresses the essential features of a physical system or process in mathematical terms. In a very general sense it can be represented as a functional relationship of the form Dependent variable = f(stuff) where stuff is:
Correct Answer: forcing functions All of these (This one) independent variables parameters
Differential equations often can not be solved analytically
Correct Answer: True
Consider the following differential equation dxdt=t+x Is this a function of:
Correct Answer: both the dependent and independent variables
A differential equation is written in terms of the differential rate of change of the variable we are interested in predicting, and is generally a function of both the dependent and independent variables dydt=f(t,y) In this formulation, is y the dependent or independent variable?
Correct Answer: dependent
To calculate the relative true error as a percentage you could use the following MATLAB code, assuming true_value and approximation are variables that have already been defined.
Correct Answer: **et = (true_value - approximation)/true_value ***
When calculating an approximate value for a series we need to decide when to quit executing the loop. One strategy is to define a stopping criteria, es, and compare it to the approximate error. If ea is calculated as ea = (present_approx-previous_approx)/present_approx*100 The loop should be executed until
Correct Answer: *|ea| It can be shown (Scarborough, 1966) that if the following criterion is met, we can be assured that the result is correct to at least n significant figures. es=(0.5×102−n)% Which of the following code snippets can be used to cause MATLAB to exit a loop once the criterion is met? Assume that n (the number of significant figures) and ea (approximate error as a percentage) have been previously calculated as ea = (present_approx-previous_approx)/present_approx100 and that the code snippet occurs inside an infinite while loop.
Correct Answer: **if abs(ea) It is possible to calculate a numerical value of et if you do not know the true value of the unknown, when you are using a series exp
Correct Answer: ion to create an estimate. Answer: False
In MATLAB NaN
Correct Answer: stands for Not a number
From a coding perspective, which of the below is true for "for" loops and "while" loops? Select all that are true.
Correct Answer: -for loops automatically update the index, while loops do not -for loops run for a fixed number of runs, while loops don't necessaril
Which is a valid way to create a loop that runs until the solution converges, assuming everything is defined in advance? Select all that could work.
A. for n = 1:max_iterations calculate approx, ea if (abs(ea) < es) break end end B. while (1) calculate approx, ea if (abs(ea) < es) break end n = n+1; end C. while (abs(ea) > es) calculate approx, ea n = n+1 end
Correct Answer: b) (while (1)) a) (for loop) c) (while loop) All of these*
What would you need to add to the following code snippet to get it to fix it so it works sig_fig = 5;es = 0.5*10^(2-sig_fig);x = 0.5;approx = 0;n = 0;while (~exist('ea') | abs(ea) > es) old = approx; approx = approx + x^n/factorial(n); ea = (old - approx) / approx * 100;end
Correct Answer: increment n inside the loop
If a single real root exists between the specified bounds, the bisection technique will find it
Correct Answer: True
You can always predict in advance if the Fixed Point Iteration method will converge
Correct Answer: True
You can always predict in advance if the Newton_Raphson technique will converge.
Correct Answer: False
The bisection technique and the False- Position method (regula-falsi) are examples of
Correct Answer: bracketing methods
Assume that for some function the absolute magnitude of the desired error in the solution obtained using bisection is 10-4 and the original difference between the upper and lower bounds is 2... how many iterations are necessary? In other words Lk=10-4 and L0=2 and k is the number of iterations Lk=2/2k
Correct Answer: 15
The false position method is always faster than the bisection method
Correct Answer: False
The Newton-Raphson Technique is based on the Taylor series exp
Correct Answer: ion Answer: True
The secant method is a variation of the Newton-Raphson technique. It requires that you be able to analytically define the first derivative of the function
Correct Answer: False
Unlike the Newton-Raphson technique, the secant method always converges.
Correct Answer: False
Which of these is not an open method for finding the root of a nonlinear equation?
Correct Answer: Regula Falsi
While using the bisection method, which of the following code segments would mean the solution is on the left side of the midpoint, assuming xm is midpoint, xr is x at right end of the segment, and xl is x at the left end of the segment?
Correct Answer: if (f(xl)f(xm) < 0)*
A root-finding algorithm (such as the bisection method or Secant Method) can be used to find where a function has a constant, non-zero value.
Correct Answer: True
What type of inputs does the built-in function "solve" expect?
Correct Answer: A symbolic expression
Although in a general sense optimization is the process of creating something that is as effective as possible, from a mathematical perspective optimization deals with finding
Correct Answer: extremes
If you can find the derivative of a function analytically, you can use root finding techniques to determine the maximum or minimum
Correct Answer: True
Consider the following formula f(x)=−x2+8x−10 One way to find the extreme is to take the derivative and find the root... and the corresponding function value dfdx=−2x+ Setting the derivative equal to 0 results in an x value of 4, and a corresponding function value of f(x) = 6 How do you know if this is a maximum or a minimum?
Correct Answer: Find the second derivative, which is equal to -2. Since it is negative the extreme is a maximum
One dimensional optimization problems involve functions
Correct Answer: that depend on a single variable
Most techniques for finding optimums (extremes) are designed for finding
Correct Answer: a single extreme
A technique used to find a minimum can also be used to find a maximum by
Correct Answer: multiplying the function by -1 and finding the location of the minimum of the modified function.
The fminbnd function is built into MATLAB and uses a combination of the Golden Section Method and the Parabolic Method. It is an example of
Correct Answer: a one dimensional constrained optimization method
The Golden Section method is an example of
Correct Answer: a one dimensional constrained optimization method
Consider the following code which defines and plots a MATLAB function clear,clc,clff=@(x) -3 -5x + x.^2 + x.^3 - 0.5x^4fplot(f,[- 2,2])xlabel('x'), ylabel('y'), title('A 4th order polynomial'), grid on and creates this figure Which of the following pieces of code an be used to find the location of the maximum, and the maximum function value?
Correct Answer: g=@(x) -f(x) x=fminbnd(g,-2,2) fx=f(x)
Our textbook defines the golden ratio as ϕ=(1+5)2=1.618... but the course PowerPoint and video presentations use an alternate definition ϕ2=(5−1)2=0.618... You can convert between the two definitions by
Correct Answer: either approach
If a one-dimensional function has multiple local minima and maxima which of the following can be used to determine the global extreme (either minimum or maximum)
Correct Answer: Both strategies are appropriate
Correct Answer: x=linspace(-5,5); y=x; [x,y]=meshgrid(x,y); z=f(x,y);[maximum,element]=max(z(:)) max_x=x(element) max_y=y(element)
clear, clc, clff = @(x,y) 3(1-x).^2.exp(-(x.^2) - (y+1).^2) ... - 10(x/5 - x.^3 - y.^5).exp(-x.^2-y.^2) ... - 1/3*exp(-(x+1).^2 - y.^2) subplot(1,2,1) fsurf(f,[-3,3,-3,3])title('Visualizing a Two Dimensional Function')xlabel('x'), ylabel('y'), zlabel('z')subplot(1,2,2) fcontour(f,[- 3,3,-3,3])title('Contour of a Two Dimensional Function')xlabel('x'), ylabel('y'), zlabel('z'), colorbar which generates this figure Which of the following code snippets could be used to find the maximum and it's location?
Correct Answer: f = @(x) 3(1-x(1)).^2.exp(- (x(1).^2) - (x(2)+1).^2) ...- 10(x(1)/5 - x(1).^3 - x(2).^5).exp(-x(1).^2- x(2).^2) ...- 1/3exp(-(x(1)+1).^2 - x(2).^2) g = @(x) -f(x)location=fminsearch(g,[1,1]) maximum=f(location)*
The advantage of using the Golden Ratio (R) when doing the the Golden Section Technique (other than the name) is
Correct Answer: It is very efficient because it only ever has to calculate 1 new x-location, and 1 new y-value
Which of the following statements are true about what we call the "Brute Force" method? (Pick all that apply)
Correct Answer: It will always find a minimum or maximum value of the data It will only look at the data that is used to generate the plot, not the function generally The more points you use to create your point, the closer your answer will be to the "true" answer The answer it returns should be a good starting point for "fminsearch"
If you used the Golden Section technique to find the minimum with limits from 2.5 to 3. on the function that created the following graph: It would return an x-value of
Correct Answer: x = 3.
The multiplication of a matrix by its inverse is equal to the identity matrix.
Correct Answer: True
Consider a simple 3x3 matrix called A. The result of multiplying A by its inverse A * inv(A) is
Correct Answer: a 3 x 3 matrix of zeros with ones down the diagonal
How do you find the inverse of a square matrix in MATLAB, assuming the matrix is named A? There may be multiple answers... select all that are
Correct Answer: inv(A) A^(-1)
Assume you have a system of equations that can be represented in matrix notation as Ax=B if you know both A and B, how do you solve for x? There may be multiple
Correct Answer: s... select all that are correct Answer: x=A\B x = inv(A)B*
Two strategies for solving linear systems of equations that are built into MATLAB are left division using the matrix inverse Which is more efficient?
Correct Answer: left division
The built-in MATLAB operator \ (left-division) uses a solution strategy for systems of linear equations based on Gaussian elimination with partial pivoting
Correct Answer: True
Will naive Gaussian elimination always work if the system of equations has a solution?
Correct Answer: No
Raising a matrix to a power requires it to have the same number of rows and columns
Correct Answer: True
All matrices have an inverse
Correct Answer: False