Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Username: Approximate values for sine and cosine of an angle, x (radians), can be obtained from the following infinite series equations: sinx = x -+

image text in transcribed
Username: Approximate values for sine and cosine of an angle, x (radians), can be obtained from the following infinite series equations: sinx = x -+ - + Eq. 1 cos x = 1 -+ + Eq. 2 1. Develop a procedure for iteratively determining values for sine and cosine using this relationship 2. Based on your algorithm, program a simultaneous solution to each equation in C or C++ to determine "sin x" and "cosx", then solve the Pythagorean Identity, (sin x)2 + (cos x)? = 1.000 for each iteration, using your approximate values, for a given value of x=2 radians that is input by the user. Implement and run your program on the DMC supercomputer. The results should display to screen in a tabular format. Include the % error obtained for each iteration by comparing your approximate result to the true value of "1.000". Deliverables Live demonstration of working program from your account on the supercomputer (20 pts.] (Class time on Thursday, February 6th, Rm. 272) A stapled hardcopy write-up (brief is OK) on the project is due by 5:00pm on Thursday, Feb 6, Rm. 201. Should include the following: This project sheet as the cover. Illustration of your developed algorithm using either a flowchart, or pseudo-code description. [10 pts.] Hard copy of your source code (5 pts.] Results: o A table [5 points) of at least 20 iterations for side by side comparison of the approximate value, the absolute error, and the percent error. O An X-y plot [5 points) with fitted curves for approximate values for sin x2 + cos x as compared to the true value of 1. Conclusions. [5 pts.] How many iterations are required for less than 1% absolute relative frue error? How many iterations are required for less than 7% absolute relative approximate error

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions