Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

1. The function sin(x) can be approximated by summing the first n terms of the infinite series sin(x)x-x/3! + x/5!- x77!+- where x is expressed

image text in transcribed

1. The function sin(x) can be approximated by summing the first n terms of the infinite series sin(x)x-x/3! + x/5!- x77!+- where x is expressed in radians (Note: radians = 180). Write a C program that can be used to answer the following questions during the lab: a) For a value of x = 0.1, how many terms do you need in the power series so that th result from the series equals the result from the sin(x) library function up to the 6 decimal place. b) For a value of x - 1.3, how many terms do you need for achieving the same accuracy as in (a)? Assume that there exists a function double fact(int n) that returns the factorial value of ar integer as a double. This function will be given to you. There is a standard C function double pow(double x, double y) that returns the result ofx to the power y as a double type. You will need to include math.h to use this functioninclude )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago