ME 218-Exam1_Spring2008_Pryor, M

ME 218-Exam1_Spring2008_Pryor, M - ® 1 /: 0 Exam 1 ME...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ® 1 /: 0 Exam 1 ME 218-Engineering Computational Methods Spring 2008 Name” Lab Time ‘/ Directions: This exam is closed book, closed note. You may only use a V2 page cheat and a non- graphing calculator. Show all work and write neatly. Since the algorithms are what you are being tested on, be sure to show all steps in a clear and orderly fashion. Budget your time. Good luck! Problem 1 (50 points): To find the floating depth of a wooden ball of radius 1 foot and a density that is 1/3 that of water, we can solve the equation f (x) = x3 — 3x2 +§ = O for the appropriate root. fietermine which of the following are mathematically valid initial brackets for the bisection rmethod: [-1 0], [-1 1], [0 2], and {-1 3]. (8 pts.) @ Even if more than one of the above brackets is mathematically valid, only one bracket makes hysical sense. State which one and why. (2 pts) c) What is a valid function g(x) to use if we wanted to solve this problem using fixed-point ,iteration? (4 pts) /@ Complete one iteration of the fixed point iteration method using your answer in (c) with an initial starting point of x=2. (6 pts) /07 ( sing an initial guess of x0: 1, complete one iteration of the Newton—Raphson Method. (10 pts) L Mathematically determine two bad initial guesses to avoid when using the Newton Raphson Me 0d. (5 pts) (g sing the bracket you selected in part (b) complete one iteration of the false-position method. What would be the correct bracket for the second iteration? (10 pts) sing the bracket found in part (b), how many iterations of t ' ection method must be ’l completed in order to know the solution within at least $0.5 'nche [.15 pts) Problem 1 workspace. Izgfw, fixxj‘: "L A455} m2 r :w m "t Problem 2 (30 points): Consider each of the following m-files or short c programs. In the column on the right, recreate the console output for the given code snippet. If there is an error in the code, simply write ERROR, and circle the error in the code. Optionally, you may use the scratch column to show intermediate steps not printed to the console for partial credit. If the code snippet is in c, assume all the necessary #include files are included. clear all; t(1) = 3 for k=2z4 t (k) =t (k-l) +1; end t main(){ int i=0; for( i=0; i<2; i++ ) printf(“%d\n",i*i); Cfiector = [l 2 3]; sum( 3vector ) Problem 3: (20 Points) ‘ T 4 Consider the following matrices: ! _ l 0 2 L g, 1 3 2 0 4 3 -3 H A: ,B= ,C= 2 —1 3 ,d= ,e= ~ ‘ ' a -2 —1 3 -2 6 —1 2 418 Which of the following MATLAB onerations are valid will not return an error? (do not solve, just mark YES or NO. If NO, briefly explain your answer.) (2 pts each) ‘ cm \/ l r 3" \-. ,z t l , B’ . *B A] l'jJF' » W4C " , c - :zrj‘x‘Er‘a‘ttr («Meg A. “ is r W" car-Wynn VV\:ncfi.\-.;a‘1'rté~izr.-h Q “ inf .» " '~ ‘( 9"];75‘ (if: r A e.*d+e det(B) N a & (A(2,= Ci )’ +d ‘V ) A] ) . ‘“ mi: «ct/3? *"“ c::‘,-~,;m“. ...
View Full Document

Page1 / 4

ME 218-Exam1_Spring2008_Pryor, M - ® 1 /: 0 Exam 1 ME...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online