Q1. Subtractive cancellation occurs when two nearly equal numbers are subtracted. This is a common cause...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q1. Subtractive cancellation occurs when two nearly equal numbers are subtracted. This is a common cause of noticeable round-off error. Let's see how this affects numerical differentiation. a) Write a code to approximate the first derivative of f = e* at x = 0 using the forward difference formula (exth - e*)/h with h = 10-, 10-, 10-,..., 10-10. Tabulate the results and true errors. Plot true error vs. h. Comment on the drop rate of the error. b) Repeat part (a) using the central difference formula (exth ex-h)/(2h). Q1. Subtractive cancellation occurs when two nearly equal numbers are subtracted. This is a common cause of noticeable round-off error. Let's see how this affects numerical differentiation. a) Write a code to approximate the first derivative of f = e* at x = 0 using the forward difference formula (exth - e*)/h with h = 10-, 10-, 10-,..., 10-10. Tabulate the results and true errors. Plot true error vs. h. Comment on the drop rate of the error. b) Repeat part (a) using the central difference formula (exth ex-h)/(2h).
Expert Answer:
Answer rating: 100% (QA)
The problem presented is about numerical differentiation and the effects of subtractive cancellation on the accuracy of numerical derivatives Let me walk you through both parts of the question one by ... View the full answer
Related Book For
Computer organization and architecture designing for performance
ISBN: 978-0136073734
8th edition
Authors: william stallings
Posted Date:
Students also viewed these mechanical engineering questions
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
ttth Suppose that the sequence of bags {Bn | n N} is recursively enumerated by the computable function e(n, x) = fn(x), [7 marks] Hence prove that the set of all recursive bags cannot be recursively...
-
Did you have imaginary friends when you were a young child? What do you remember about them and their value to you?
-
Each court of appeals has approximately 20 judges. How many of these judges hear a typical case?
-
Fernandez Motors, a motorcycle manufacturer, had the following contingencies. a. Fernandez estimates that it is reasonably possible but not likely that it will lose a current lawsuit. Fernandezs...
-
The statement of cash flows segregates cash inflows and outflows by: (a) Operating and financing activities. (b) Financing and investing activities. (c) Operating and investing activities. (d)...
-
Lang Enterprises is interested in measuring its overall cost of capital. Current investigation has gathered the following data. The firm is in the 40% tax bracket. Debt. The firm can raise an...
-
MacMillan Supply chain Group What are impacts of natural disasters, weather conditions, accidents, political unrest, financial instability and terrorist activities on quality recalls and customer...
-
Wayland Custom Woodworking is a firm that manufactures custom cabinets and woodwork for business and residential customers. Students will have the opportunity to establish payroll records and to...
-
Refer to the lab protocol for Lab Project B: Determination of the Concentration of Fluorescein in an Unknown Sample Using Beer-Lambert Law. 1. Based on the protocol, your knowledge of the...
-
Where is the image located when an object is placed 25 cm in front of a convex mirror with a focal length of 11 cm?
-
We supply 132 J of heat to an engine with 11.2 % efficiency. (a) How much work (J) can the engine do? (b) How much heat (J) must the engine exhaust?
-
Compute the total work done by a gas system shown in figure below following expansion processes: P (KPA) 500- 0 A 0.3 B 0.6 PV.4 = C 0.9 V (m)
-
1. Consider the following algorithm: Algorithm rec Fun(x, y, n) ifn <1 else if n-1 return Null return x + y else return (x + y) * rec Fun(x, y, n-1) a. What is the base condition? b. How do the...
-
A nearsighted man uses his ideally prescribed eyeglasses that have a refractive power of -2.20 diopters. He would like a prescription for contact lenses. What is the correct contact lens prescription...
-
6.3. A 50 Hz, three phase, 275 kV, 400 km long transmission line has resistance 0.035 /km, inductance 1 mH/km and capacitance 0.01 F/km. If the line is supplied at 275 kV, find out the MVA rating of...
-
For the data in Exercise 17-19, use the FIFO method to summarize total costs to account for, and assign these costs to units completed and transferred out, and to units in ending work in process....
-
What are the differences among UMA, NUMA, and CC-NUMA?
-
A microprocessor has a memory write timing as shown in Figure 3.19. Its manufacturer specifies that the width of the Write signal can be determined by T - 50, where T is the clock period in ns. a....
-
Consider the following code: for (i = 0; i < 20; i++) for ( j = 0; j < 10; j++) a[i] = a[i]* j a. Give one example of the spatial locality in the code. b. Give one example of the temporal locality in...
-
The following table shows the interest rates on the fixed and floating borrowing choices available to three firms. Firms A and B want to be exposed to a floating interest rate while Firm C would...
-
Explain why trading derivatives on centralized exchanges rather than in over-the counter markets helps reduce systemic risk. Can you think of a way in which more trading on centralized exchanges...
-
Futures contracts are standardized contracts for the delivery of a specified quantity of a commodity or financial instrument on a prearranged future date, at an agreed- upon price. They are a bet on...
Study smarter with the SolutionInn App