Question
NEED HELP QUICKLY Taylor Series of Sine (10 points): Representing complex mathematical functions is very difficult on a modern day computer. The computer has only
NEED HELP QUICKLY
Taylor Series of Sine (10 points): Representing complex mathematical functions is very difficult on a modern day computer. The computer has only a limited set of instructions, like addition, subtraction, multiplication, division, remainder, and some bit-wise, logical and relational operations. The computer can also only store values with limited precision using the float data type, and therefore cannot express irrational numbers or numbers that require precision more than that provided by the data type. These limitations have forced mathematicians to express approximations of higher order functions like sine and cosine using only the limited set of arithmetic operations. One such approximation is given by the Taylor series. The Taylor series expansion of the sine function is as follows: sin(x) = X i=0 (1)i (2i + 1)!x (2i+1) . Expanding the first few terms of the series, we get sin(x) = x x 3 3! + x 5 5! . The symbol ! refers to factorial, and x! is defined as the product of the first x natural numbers, i.e., 1 2 3 . . . x. Computing the above series only for 10 terms gives a very good approximation of the sine function. Note that the above formula uses only simple arithmetic operators. In this problem, we will compute the sine of a given real (floating-point) value using the above formula for exactly 10 terms (or iterations). Display the sum of the series in each iteration, and at the end of the computation compare the value that you computed against the Python math function math.sin. Name your program sine.py. Output all values to 6 decimal places of accuracy.
This is in python please help
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started