Question: Sammy has worked for a company with a retirement program, and today is retiring from her job with the amount of $ 115 in her
Sammy has worked for a company with a retirement program, and today is retiring from her job with the amount of $115 in her retirement account. She decides to withdrawal an equal amount from this account, once a year, beginning immediately, and ending 17 years from today (for a total of 18 payments). If the interest rate is 5.75%, solve for the annuity amount such that she uses up her full accumulation.
Remember: You must write MATLAB code and then execute your code to produce output that solves this problem. You must show both your program and your program output in a screenshot(s) to receive full credit for this exercise. You must also include a handwritten MATLAB program! Exercise 8 (6 pts): INTRODUCTION: The Babylonian algorithm for computing the square root of a number is a simple iterative technique that can be surprisingly accurate:_(This algorithm is also known as a "Taylor Series' to compute the square root.) Xn+1 (Equation 8-1) where: S is the number you wish to find the square root of; Xn is the current guess for the square root of S; and Xa+1 is the updated (computed), next guess for the square root of S. n is the iteration step number If we let x; be our initial guess for the square root of S in Equation 8-1, and plug it in for x, on the right hand side of Equation 8-1 (i.e., let n = 1), then we can compute x2, the first, updated (computed) guess for the square root of S, on the left hand side of Equation &1 to become: (Equation 8-2) %3D And now, if we use x that we just computed on the right-hand side of equation 8-2 (i.e., now let n = 2), then we can compute x3, the second, updated guess for the square root of S: (Equation 8-3) %3D So x3 (Equation 8-3) will be the second, updated guess for the square root of S. In a similar way, we can keep using Equation 8-3, in an iterative fashion, to compute the third (x:), fourth (x3), fifth (x) updated guesses for the square root of S. Each updated guess gets closer and closer to the actual value of the square root of S. This is an example of an iterative process where a starting 'guess' is updated to a new guess, then another guess update and another and another until the answer is close to the correct answer. Many mathematical functions use iterations to calculate the needed values. Even with high powered modern computers, calculating nt to many-many decimal places is one such calculation. PROBLEM: Write a MATLAB program that uses Equation 8-1 inside a for loop to repeatedly calculate updated guesses for the square root of each number S given in the data table below. (Using the dot-operator method will NOT be accepted). Let the value computed in the fifth iteration (i.e., x6) be your final value for the square root S. For each number S in the table, use the given value of x, as your starting initial guess for the square root. Your program must print out ONLY the final value assigned to xg, and also the "true" value of the square root of S obtained by using MATLAB's sqrt function. Report your findings ONLY to the fourth decimal place in the data table below. DATA TABLE: Your computed x; MATLAB's sgrt (S) 12.34 4 3.5128 3.5128 1,234 40 35.1283 35.1283 155,765 200 394.6707 394.6707 155,765 -300 -394.6707 394.6707 NOTE: This data table will contain your answers for this MATLAB programming problem, must be accompanied by a single sereenshot showing your program and output for the first S and x, value pair (13 & 4.0). DO NOT show screenshots for every value pair of S and x. However, your program MUST show the values for x, that you provide as output in the above table.
Step by Step Solution
3.51 Rating (158 Votes )
There are 3 Steps involved in it
The short summary of given information in the question are ... View full answer
Get step-by-step solutions from verified subject matter experts
