The arcsine function is a trigonometric arcfunction that is the inverse of the sine function. As we have discussed in class, there are a number of functions that your calculator or computer will perform which, under the hood, are actually determined by ad

computer science

Description

The arcsine function is a trigonometric arcfunction that is the inverse of the sine function. As we have discussed in class, there are a number of functions that your calculator or computer will perform which, under the hood, are actually determined by adding terms from a series. This is the case with the arcsine function. The series that defines the arcsine function is as follows: arcsin(x) = ∑ (2n)! (2 n n!)2 x 2n + 1


However, there is a catch to this series. It will only work for inputs between (and including) −1 and 1. (Recall that the output of the sine function is never greater than 1 or less than −1. Therefore, the inputs to the inverse function (arcsine) can never be outside that region, either. In other words, if you were to input an x greater than 1 or less than −1, you would likely find a diverging series. 


Write a MATLAB code that: 

1. Prompts the user for an input value x; 

2. Prompts the user for the number of digits of accuracy desired in the output; 

3. Calculates the arcsine of the value x to the level of accuracy specified. 

4. Outputs a message to the user stating the calculated value


Related Questions in computer science category