Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Maclaurin series expansion for the sine function is: https://drive.google.com/file/d/0BwwLB5_Kft3dYXprbm1KT0xoMWs/view?usp=sharing where x is in radians. This function can be used to approximate the sine of

The Maclaurin series expansion for the sine function is:

https://drive.google.com/file/d/0BwwLB5_Kft3dYXprbm1KT0xoMWs/view?usp=sharing

where x is in radians. This function can be used to approximate the sine of x with increasing accuracy as terms are added to the summation. Write a function that accepts two scalar inputs (in order):

  1. A value for x (in radians).
  2. The number of series sums, N , to use in the series approximation of sin(x).

Your function should generate the following three outputs (in order):

  1. A column vector of the first N series summations. Consider the first summation to be x-x^3/3!.
  2. A column vector of the magnitude (i.e. absolute value) of the approximate relative error values associated with the first N series summations. Note the "previous approximation" for the first value in this vector will be x.
  3. A column vector of the true relative error values associated with the first N series summations. Use MATLAB's built-in sine function to compute the true value for this error calculation.

Note: The first two test cases test the results for the first and second series sums respectively to aid in your debugging process.

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions