Question: PROBLEM STATEMENT: You are to write a program that wi compute the nh root of a number by using a numerical approximation. The program be



PROBLEM STATEMENT: You are to write a program that wi compute the nh root of a number by using a numerical approximation. The program be able to compute only the following roots VS, VS, VS, VS and VS, and these ones will be calculated based on just square and/or cubic roots Some of you will not have covered this topic in Mathematics as yet, but do not be perplexed by this - the numerical technique we will use can be easily implemented without any knowledge of calculus, just arithmetic will be required. BACKGROUND: There are several algorithms or methods of computing the square/cube root of a non-negative real number S, i.e. VS or VS. One of the first algorithms used for approximating VS or VS is the Babylonian method, or "Hero's method", named after the first-century Greek mathematician Hero of Alexandria who gave the first explicit description of the method. In this method, finding VS or VS is the same as, respectively, solving the equation f(x) = x2 S=0 or f(x)=x3-S=0 for a positive x. Therefore, any general numerical root-finding algorithm can be used and Newton's method, for example, is one of them. Newton's Method provides a convergent numerical approximation for finding roots, with the caveat that an initial guess must be chosen. You will use Newton's Method as follows 1. Begin with an arbitrary positive starting value Xo (the closer to the actual square root of S the better). In our case, the initial guess will be chosen according to the following formula 2 Let Xi+1=Xi-ft(xi) f (xi) 2. 3. Repeat step 2 until the desired accuracy is achieved. In our case, it will be 10. This means you will have to stop once x x-1l s 10-6. Note the absolute value function. It can also be represented as rCD PROBLEM STATEMENT: You are to write a program that wi compute the nh root of a number by using a numerical approximation. The program be able to compute only the following roots VS, VS, VS, VS and VS, and these ones will be calculated based on just square and/or cubic roots Some of you will not have covered this topic in Mathematics as yet, but do not be perplexed by this - the numerical technique we will use can be easily implemented without any knowledge of calculus, just arithmetic will be required. BACKGROUND: There are several algorithms or methods of computing the square/cube root of a non-negative real number S, i.e. VS or VS. One of the first algorithms used for approximating VS or VS is the Babylonian method, or "Hero's method", named after the first-century Greek mathematician Hero of Alexandria who gave the first explicit description of the method. In this method, finding VS or VS is the same as, respectively, solving the equation f(x) = x2 S=0 or f(x)=x3-S=0 for a positive x. Therefore, any general numerical root-finding algorithm can be used and Newton's method, for example, is one of them. Newton's Method provides a convergent numerical approximation for finding roots, with the caveat that an initial guess must be chosen. You will use Newton's Method as follows 1. Begin with an arbitrary positive starting value Xo (the closer to the actual square root of S the better). In our case, the initial guess will be chosen according to the following formula 2 Let Xi+1=Xi-ft(xi) f (xi) 2. 3. Repeat step 2 until the desired accuracy is achieved. In our case, it will be 10. This means you will have to stop once x x-1l s 10-6. Note the absolute value function. It can also be represented as rCD
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
