Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please USE Matlab. 3. The approximation of sine function can be evaluated using the following series: 23 + 25 .22n+1 sin(x) = 2 +(-1) 3!

Please USE Matlab.image text in transcribed

3. The approximation of sine function can be evaluated using the following series: 23 + 25 .22n+1 sin(x) = 2 +(-1)" 3! 5! (2n + 1)! Evaluate the above equation using 1 to 10 terms (i.e. n=0:9) and store the values in a variable 'sine'. Then calculate the percent relative error using the below equation: TrueValue - ApproximatedValue error x 100 TrueValue Plot percent relative error vs number of terms used in the approximation (i.e. error vs n). Take x = Hint: 100 Use a for loop to add the terms one by one to the approximation. After each term is added, store the value in a separate indexed variable (eg: approx(i) sine), so that all the information is stored even if the variable 'sine is overwritten ever time the for loop iterates. Matlab built in functions, a) to evaluate the true value, use true = sin(x) b) for factorial, 3! in matlab is written as factorial(3)

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

Modern Financial Markets And Institutions

Authors: Glen Arnold

1st Edition

0273730355, 9780273730354

More Books

Students also viewed these Accounting questions

Question

What is Wilks' A? For what purpose is it used?

Answered: 1 week ago