Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. The value of function sin(2) can be approximated by the following formula sin(x) = 2 +}**==- .. for I near zero. (a) Write a

image text in transcribed

1. The value of function sin(2) can be approximated by the following formula sin(x) = 2 +"}**==- .. for I near zero. (a) Write a user-defined function (using a loop) that computes an approximation to sin(2) using the above formula. The factorial is calculated use built-in function factorial, for example, 4! is calculated use factorial(4). Your function must take r and n as input arguments to your user-defined function. n is the number of terms you want to keep in your approximation. The approximation will get more accurate if you keep more terms. (b) Write a M-file that determine the minimum number of terms you need to approximate sin(0.5) with tolerance=0.00000001

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_2

Step: 3

blur-text-image_3

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions