Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2.4) Write an alogrithm as (a) structured flow chart and (b) code using MATLAB. The sine function can be evaluated by the following infinite series:

2.4) Write an alogrithm as (a) structured flow chart and (b) code using MATLAB.

image text in transcribed

The sine function can be evaluated by the following infinite series: sin x = x - x^3/3! + x^5/5! - x^7/7! + Write an algorithm to implement this formula so that it computes and prints out the values of sin x as each term in the series is added. In other words, compute and print in sequence the values for sin x = x sin x = x - x^3/3! sin x = x - x^3/3! + x^5/5! up to the order term n of your choosing. For each of the preceding compute and display the percent relative error as % error = true - series approximation/true times 100% Write the algorithm as (a) a structured flowchart and (b) pseudocode 2.5 Develop, debug, and document a program for Prob. 24 in either a high-level language or a macro language of your choice. Employ the library function for the sine in your value. Have the program print out the sense approximation and the computer to determine the true error h step. As a test case, employ the program to compute sin(1.5) for up to and including the term x^15/15!. Interpret your results

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions