In [ ]: Many transcendental functions can be defined using infinite series. For example, the cosine...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In [ ]: Many transcendental functions can be defined using infinite series. For example, the cosine function is defined by the infinite series: (-1)kx2k (2k)! def cosine_terms (x, tol): # your code goes here where tol is the required accuracy. the required Sample output for your code is: series expansion: cos (0.001) exact value: 1 approx value with 2 terms: 1 relative error: 4.16e-14 For fixed x, the terms in the series xk/(2k)! 0 as k oo. This suggests that we can approximate the cosine function using a finite sum. Write a function that will evaluate the cosine function using a finite sum: def cosine_series (x,N): # your code goes here where there are N +1 terms (from k = 0 to k = N) included in the sum. Use your function to evaluate cos(47/5) with N+1 = 6 terms. Write a separate function to determine the N required to give a required accuracy (as compared to the cos function from math or numpy ). The general structure of the the function is: Eva tol=1e- cos(x) = = 7. k=0 In [ ]: Many transcendental functions can be defined using infinite series. For example, the cosine function is defined by the infinite series: (-1)kx2k (2k)! def cosine_terms (x, tol): # your code goes here where tol is the required accuracy. the required Sample output for your code is: series expansion: cos (0.001) exact value: 1 approx value with 2 terms: 1 relative error: 4.16e-14 For fixed x, the terms in the series xk/(2k)! 0 as k oo. This suggests that we can approximate the cosine function using a finite sum. Write a function that will evaluate the cosine function using a finite sum: def cosine_series (x,N): # your code goes here where there are N +1 terms (from k = 0 to k = N) included in the sum. Use your function to evaluate cos(47/5) with N+1 = 6 terms. Write a separate function to determine the N required to give a required accuracy (as compared to the cos function from math or numpy ). The general structure of the the function is: Eva tol=1e- cos(x) = = 7. k=0
Expert Answer:
Answer rating: 100% (QA)
a Which material is a good candidate to emit any of the visible light colors Why A good candidate to emit any of the visible light colors is a material with a band gap energy that is within the range ... View the full answer
Related Book For
Numerical Methods For Engineers
ISBN: 9780071244299
5th Edition
Authors: Steven C. Chapra, Raymond P. Canale
Posted Date:
Students also viewed these programming questions
-
2. In chapter 5, bias and random variation were discussed. Which one does safety stock try to reduce its impact upon the supply chain? 1. For cycle inventory, how is the level Q determined for an...
-
Has E-commerce changed uncertainty in the supply chain? How does information system growth affect uncertainty? Positive and/or negative.
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
AASB 102 prohibits the use of the LIFO method. What is the argument against the use of LIFO?
-
Determine the cumulative distribution function for the random variable in Exercise 3-15; also determine the following probabilities: (a) P(X < 1.25) (b) P (X < 2.2) (c) P (-1.1 < X < 1) (d) P (X > 0)
-
A car battery has a rating of 220 ampere hours (A h). This rating is one indication of the total charge that the battery can provide to a circuit before failing. (a) What is the total charge (in...
-
Water flows over a sharp-crested triangular weir with \(\theta=90^{\circ}\). The head range covered is \(0.20 \leq H \leq 1.0 \mathrm{ft}\) and the accuracy in the measurement of the head, \(H\), is...
-
Don Ball is a 55-year-old engineer. According to mortality tables, a male at age 55 has an average life expectancy of 21 more years. In prior years, Don has accumulated $48,500 including interest,...
-
1) Leadership and management are very important vital components to an effective functioning organization so that people in the organization are inspired, managed and guided towards a common vision....
-
The Alfredo Fragrance Company produces only one product, a perfume called Hint of Elegance. Hint of Elegance consists of two secret ingredients blended into an exclusive fragrance, which is marketed...
-
A. How would you go about establishing the center line on site? (B). If the intervals along the tangent TI is 2m, compute 3 three values of the offset from the tangent of a circular curve if the...
-
Construct an influence graph that shows that Tom influences Patricia, Tom influences Hope, Sandy influences Tom, Patricia influences Hope, Hope influences Sandy, Tom influences Amy, Marika influences...
-
Answer a and b GTO Incorporated is considering an investment costing $397,150 that results in net cash flows of $50,000 annually for 12 years. (PV of $1. EV of $1. PVA of $1, and EVA of $1) (Use...
-
What makes an act wrong?
-
1. Does the distance of the Earth to the Sun play a role in the seasonal changes we experience on Earth? 2. What affects the seasonal changes on Earth? (perikelion) B 3. Using diagram above, which...
-
a. Create an aged accounts receivable according to your senior's instructions. Assume there are no receivables still outstanding prior to January 1, 2020. Note that the data set includes all orders...
-
Is it important in India culture to have a family?
-
Ashlee, Hiroki, Kate, and Albee LLC each own a 25 percent interest in Tally Industries LLC, which generates annual gross receipts of over $10 million. Ashlee, Hiroki, and Kate manage the business,...
-
The displacement of a structure is defined by the following equation for a damped oscillation: y = 9 e kt cost wt Where k = 0.7 and = 4. (a) Use the graphical method to make an initial estimate of...
-
Recompute the concentrations for the five reactors shown in figure, if the flows are change to: Q01 = 5Q31 = 3Q25 = 2Q23 = 2 Q15 = 4Q55 = 3Q54 = 3Q34 = 7 Q12 = 4Q03 = 8Q24 = 0 Q44 = 10
-
Repeat Example 1.2, Compute the velocity to t = 10 s, with a step size of (a) 1 and (b) 0.5 s. Can you make any statement regarding the errors of the calculation based on the results?
-
What is the difference between real objects and virtual objects? Give an example for each.
-
Give a superclass for the following three classes: car, airplane, tank.
-
How do business classes differ from utility classes? Provide one example for each.
Study smarter with the SolutionInn App