Computers, which can add/subtract, divide/multiply, and do powers, use techniques such as series or products to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Computers, which can add/subtract, divide/multiply, and do powers, use techniques such as series or products to calculate special functions. Here we will calculate the sine function via the series sin z=k=0 100 (-1)k2k+1 (2k+1)! 23 =Z- 3! 5! and the product series sin z = z [1 (+27)] = z [1 ( -9)] [1 ( ) ] [1 ()] ... A. Write a program that accepts a value z from the user (using the input command) and asks the user how many terms n in the Taylor series and in the product series the user wants (another input). Use a "for" loop to do these series. Have the program display sin z calculated via the Taylor series, and sin z calculated via the product series to 7 digits after the decimal point. Repeat this for the same z but a use a larger value of n (another input). B. Compare your sine values from A to a value calculated using Matlab's built in sine function, displayed to 7 digits after the decimal point. C. Now use a "while" loop to include terms in the respective series. Continue to add terms to the Taylor series and multiply more terms to the products until sin z from these methods is accurate to within 7 digits after the decimal point (compare to the Matlab result of B). Answer the following parts separately: a. how many terms are needed for 7 digits accuracy after the decimal point for the Taylor series,? b. how many terms are needed for 7 digits accuracy after the decimal point for the product series? Computers, which can add/subtract, divide/multiply, and do powers, use techniques such as series or products to calculate special functions. Here we will calculate the sine function via the series sin z=k=0 100 (-1)k2k+1 (2k+1)! 23 =Z- 3! 5! and the product series sin z = z [1 (+27)] = z [1 ( -9)] [1 ( ) ] [1 ()] ... A. Write a program that accepts a value z from the user (using the input command) and asks the user how many terms n in the Taylor series and in the product series the user wants (another input). Use a "for" loop to do these series. Have the program display sin z calculated via the Taylor series, and sin z calculated via the product series to 7 digits after the decimal point. Repeat this for the same z but a use a larger value of n (another input). B. Compare your sine values from A to a value calculated using Matlab's built in sine function, displayed to 7 digits after the decimal point. C. Now use a "while" loop to include terms in the respective series. Continue to add terms to the Taylor series and multiply more terms to the products until sin z from these methods is accurate to within 7 digits after the decimal point (compare to the Matlab result of B). Answer the following parts separately: a. how many terms are needed for 7 digits accuracy after the decimal point for the Taylor series,? b. how many terms are needed for 7 digits accuracy after the decimal point for the product series?
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
What particular strengths of the relational model have led to the pre-eminent position that it holds today as a vehicle for database management? [8 marks] Identify any weaknesses in the model,...
-
Vito Co.'s next dividend is expected to be $4.50. Dividend growth is estimated at 20%, 15%, 8% for the following three years, and then stabilize to 2%. How much are you willing to pay to buy one...
-
Kyle Inc. incurred a net operating loss of $580,000 in 2014. Combined income for 2011, 2012, and 2013 was $460,000. The tax rate for all years is 35%. Prepare the journal entries to record the...
-
Enter sample data of your own choosing into QtyOnHand in the Product_T table. Test the modification you made in Problem and Exercise 16 by attempting to update a product by changing the inventory to...
-
The Cooper Furniture Company of Potomac, Maryland, assembles two types of chairs (Recliners and Rockers). Separate assembly lines are used for each type of chair. Classify each cost item (AI) as...
-
For the year ended December 31, 2017, Denkinger Electrical Repair Company reports the following summary payroll data. Ross earnings: Administrative salaries ...... $200,000 Electricians wages...
-
Te If you have $90,000 in a bank account that is paying an interest rate of 6 percent that is being compounded annually, how many years will it take to double your investment if the interest rate...
-
Use cases: A company have PCU, GTI, Zelio, Regalia, iCruze Inverters, All Inverters have a Power rating which is determined by ( Current * Operating Voltage ) Only PCU, GTI, and Regalia are solar...
-
You are considering how to invest part of your retirement savings. You have decided to put $200,000 into three stocks: 68% of the money in GoldFinger (currently $29/share), 17% of the money in...
-
In the 1978 Tellico Dam decision (TVA v. Hill, 437 U.S. 187), the U.S. Supreme Court declared that the Endangered Species Act (ESA) defines the value of endangered species as "incalculable," and that...
-
Refer to the facts in Problem 36 and assume that the office building purchased in January 2018 and the car purchased in 2018 were both sold in June 2019. How much depreciation can be claimed as a...
-
Classify the following pollutants as uniformly distributed, concentrated, or nonuniformly distributed: a) Belching (and other CO2emissions) from cattle b) Noise pollution from rock band rehearsals c)...
-
Suppose that in order to reduce the amount of smog, the city where you live is contemplating either (1) requiring everyone to ride a moped to work, or (2) providing each family with 10 gallons of gas...
-
Find the uncertainty in the moment of inertia. Moment of inertia of a disk depends on mass and radius according to this function l( mr) = 1/2 mr 2 . Your measured mass and radius have the following...
-
Use critical values to test the null hypothesis H0: 1 2 = 20 versus the alternative hypothesis H0: 1 2 20 by setting a equal to .10, .05, .01, and .001. How much evidence is there that the...
-
Diane is a single taxpayer who qualifies for the earned income credit. Diane has two qualifying children who are 3 and 5 years old. During 2012, Diane's wages are $17,100 and she receives dividend...
-
For each of the following cases, indicate the filing status for the taxpayer(s) for 2012 using the following legend: A - Single B - Married, filing a joint return C - Married, filing separate returns...
-
Walter, a single taxpayer, purchased a limited partnership interest in a tax shelter in 1985. He also acquired a rental house in 2012, which he actively manages. During 2012, Walter's share of the...
-
Supposing that all systems in Figure 1.27 are linear and time invariant, compute \(y(n)\) as a function of the input and the impulse responses of each system. x(n) h(n) h(n) h(n) Fig. 1.27. Linear...
-
Find one solution for each of the difference equations below: (a) \(y(n)+2 y(n-1)+y(n-2)=0, y(0)=1\) and \(y(1)=0\) (b) \(y(n)+y(n-1)+2 y(n-2)=0, y(-1)=1\) and \(y(0)=1\).
-
We define the even and odd parts of a sequence \(x(n), \mathcal{E}\{x(n)\}\) and \(\mathcal{O}\{x(n)\}\) respectively, as \[\begin{aligned}\mathcal{E}\{x(n)\} & =\frac{x(n)+x(-n)}{2}...
Study smarter with the SolutionInn App