Question: The trigonometric sine function for angle x (in radian) can be computed using Taylor series with the following formula: sinE2where n-0toka-012... The different values for

 The trigonometric sine function for angle x (in radian) can be

computed using Taylor series with the following formula: sinE2where n-0toka-012... The different

The trigonometric sine function for angle x (in radian) can be computed using Taylor series with the following formula: sinE2where n-0toka-012... The different values for k produce different approximations of the sine value of the angle. You are to write a Python program to implement the trigonometric sine fiunction. Your program reads an angle in degrees and output both the sine value of that angle and the value ofk where the absolute difference between the sine values for k and k+1 is negligible (less than 10-2). k+1 (-) i- 0nequality () :4) For example, for an angle of 90 degrees, k 12 and sin 1.0000000000000. b) Demonstrate your nderstanding of modular program design and develop the program that outputs both the sine value for an input value of angle, x in degrees and the value ofk where inequality (1) holds. An example run of the function is shown below (characters in green are user input) Enter angle in degrees: 90 k-e, diff-0.6459640975062, sin(90.) k-1, diff-0.0796926262462, sin(90.) k 2, diff =e.ee46817541353, sin(90 ,0) k = 33 diff=.ee01604411848, sin(90 .) k-4, diff-0.0000035988432, sin(90.) k-5, diff-0.0000600569217, sin(90.) k 6, diff -e.eee0eeee6688, sin(9e.e) 1.5707963267949 0.9248322292887 1.ee45248555348 9998431013995 1.0060035425843 0.9999999437411 1.ee eeee e6628 : 73 diff 8.0000000000061, sin(98.0) 0.9999999999940 k 8, diff-e.eee0eeee eee, sin(9e.e) 1.ee eeee eeee sin(90.0) 1.00 eee0eeee0437, k value: 8 End Program (8 marks) c) Make a copy of your program in b) for part c). Modify the copy so that your program finds the smallest value for k for any angle, x between 0 and 360 such that inequality (1) holds. (4 marks) Copy and paste screenshots of your postings to the word document, making sure that your screenshots of the postings are readable. Copy andpaste the Python code for the parts b) and c) to the word document. Copy and paste ONE (1) screenshot for output obtained from each execution of the programs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!