Show how this looks on python programming 1. So far in class the only implicit method we
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. So far in class the only implicit method we have discussed is the Backward-Euler method, but there are many more (infinitely many!). For example, consider the second-order Adam's Moulton method, At Yk+1=Yk+(f(tk+1, Yk+1) + f(tk, yk)) 2 (can you tell why it's implicit?). In this problem, we will solve the stiff ODE discussed in Activity 7, y' (t) = (5 x 105)(-y+sin(t)), 0≤t≤ 2π y (0) = 0, using 100 equally spaced points between 0 and 2. (a) To solve using the Adam's Moulton method given above, you will need to solve a root-finding problem, g(2) = 0, at each step. To make sure that you are setting this up correctly, create an anonymous function g at t = 0 and evaluate 9(3)]. Save the result to A1. (You can define g(z) up to constant. So submit A1 as the absolute value of g(z)). (b) Implement the Adam's-Moulton method given above to solve the IVP at the 100 equally spaced points between 0 and 2. Save the resulting array of 100 elements to the array A2. 2. In this problem we will compare the built-in explicit solvers that implement RK45 scipy. integrate.solve.ivp with the implicit solvers, scipy. integrate. solve ivp with method = 'BDF'. The Belousov-Zhabotinsky (BZ) reaction is a chemical reaction that gives rise to a nonlinear chemical oscillator. The BZ reac- tion has many important applications, but most importantly for me, it looks cool. Really, I highly recommend looking it up on YouTube. A model for the BZ reaction is given by y(t) = s(y2-y1y2 +9₁ - 94²) 1 3/₂2 (1) = (-y2-y1y2 + Y3) 8 y(t) = w(y1 - y3). Here y₁ corresponds to the concentration of Bromous Acid, (HBrO2), 1/2 corresponds to the concen- tration of Bromide (BR), y3 corresponds to the concentration of Cerium (Ce¹+), and s, w, and q are dimensionless parameters relating to the rate of conversions between compounds. Here we will take s = 77.27, and w= 0.161, and we will change q to see how it changes the behavior of the so- lutions (changing q changes the stiffness of the ODE). Throughout, we will use the initial condition 31 (0) = 1, 92 (0) = 2, y3 (0) = 3 and solve for 0 < t < 30. 1. So far in class the only implicit method we have discussed is the Backward-Euler method, but there are many more (infinitely many!). For example, consider the second-order Adam's Moulton method, At Yk+1=Yk+(f(tk+1, Yk+1) + f(tk, yk)) 2 (can you tell why it's implicit?). In this problem, we will solve the stiff ODE discussed in Activity 7, y' (t) = (5 x 105)(-y+sin(t)), 0≤t≤ 2π y (0) = 0, using 100 equally spaced points between 0 and 2. (a) To solve using the Adam's Moulton method given above, you will need to solve a root-finding problem, g(2) = 0, at each step. To make sure that you are setting this up correctly, create an anonymous function g at t = 0 and evaluate 9(3)]. Save the result to A1. (You can define g(z) up to constant. So submit A1 as the absolute value of g(z)). (b) Implement the Adam's-Moulton method given above to solve the IVP at the 100 equally spaced points between 0 and 2. Save the resulting array of 100 elements to the array A2. 2. In this problem we will compare the built-in explicit solvers that implement RK45 scipy. integrate.solve.ivp with the implicit solvers, scipy. integrate. solve ivp with method = 'BDF'. The Belousov-Zhabotinsky (BZ) reaction is a chemical reaction that gives rise to a nonlinear chemical oscillator. The BZ reac- tion has many important applications, but most importantly for me, it looks cool. Really, I highly recommend looking it up on YouTube. A model for the BZ reaction is given by y(t) = s(y2-y1y2 +9₁ - 94²) 1 3/₂2 (1) = (-y2-y1y2 + Y3) 8 y(t) = w(y1 - y3). Here y₁ corresponds to the concentration of Bromous Acid, (HBrO2), 1/2 corresponds to the concen- tration of Bromide (BR), y3 corresponds to the concentration of Cerium (Ce¹+), and s, w, and q are dimensionless parameters relating to the rate of conversions between compounds. Here we will take s = 77.27, and w= 0.161, and we will change q to see how it changes the behavior of the so- lutions (changing q changes the stiffness of the ODE). Throughout, we will use the initial condition 31 (0) = 1, 92 (0) = 2, y3 (0) = 3 and solve for 0 < t < 30.
Expert Answer:
Answer rating: 100% (QA)
It looks like youve provided a detailed problem statement with multiple subparts Each part of the problem requires specific calculations and implementations in Python Ill guide you through each step p... View the full 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
-
The article So Close, Yet So Far: Predictors of Attrition in College Seniors (Journal of College Student Development [1998]: 343348) examined the reasons that college seniors leave their college...
-
You are currently 55 years old and you plan to retire at 65. To make your retirement easier, you intend to start a retirement account: At the beginning of each year 1, 2, 3, 4, 5 (that is, starting...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Explain why a production quota is inefficient.
-
At the balance sheet date Clarkson Company held title to goods in transit amounting to $214,000. This amount was omitted from the purchases figure for the year and also from the ending inventory ....
-
What features do all connective tissues have in common?
-
The induced emf in an inductor of inductance \(L\) varies with time according to \(\mathscr{E}_{\text {ind }}(t)=-2 C t\), where \(C\) is a positive constant. (a) If there is no current through the...
-
Forrester Fashions has annual credit sales of 250,000 units with an average collection period of 70 days. The company has a per-unit variable cost of $20 and a per unit sale price of $30. Bad debts...
-
Mr. Mutwiri opened a business in Meru town at the beginning of the year. During the first month of operation the following transactions were completed. 2014. January 1 Deposited sh 20,000 in the bank...
-
The isotope technetium-99m is used by doctors to image the skeleton and heart muscles. Fol- lowing injection, the concentration of this isotope decays exponentially in the body. a. Let N(t) represent...
-
There is no difference of construction between a DC generator and a DC motor. In fact, the only difference is that in a generator that generated emf is greater than the terminal voltage, whereas in a...
-
What happens to the debit and credit column when the cost of completed jobs is transferred from the work-in-process inventory to the finished goods inventory?
-
Define equivalent unit of production
-
How do overhead costs flow through the job order costing before the period?
-
How is the accounted for section in the production cost report calculated?
-
How do service companies use a job order costing system? List two ways they do this.
-
Krypton difluoride, KrF 2 , decomposes at dry icetemperature to Kr and F 2 . However, several salts of the[KrF] + ion are relatively stable. Draw valence bondpictures for KrF 2 and [KrF] + ,...
-
Air pollution generated by a steel mill is an example of a) a positive production externality. b) a negative production externality. c) a public good. d) the free-rider problem. State and local taxes...
-
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...
-
Steve Jackson (age 51) is a single taxpayer living at 3215 Pacific Dr., Del Mar, CA 92014. His Social Security number is 465-88-9415. In 2012, Steve's earnings and income tax withholding as the...
-
Harold Conners (Social Security number 785-23-9873) lives at 13234 DeMilo Drive, Houston, TX 77052, and is self-employed for 2012. He estimates his required annual estimated tax payment for 2012 to...
-
A ball rolls off a table and lands on the floor. The horizontal distance between the position at which the ball lands and the edge of the table is \(0.50 \mathrm{~m}\), and the tabletop is \(0.80...
-
A rifle is aimed horizontally at a target \(100 \mathrm{~m}\) away, and the bullet leaves the rifle barrel at \(650 \mathrm{~m} / \mathrm{s}\). If the gun is aimed right at the bull's-eye, by how...
-
On a rifle that has a telescopic sight, the telescope is usually not parallel to the barrel of the rifle. The angle the telescope makes with the barrel has to be adjusted for the distance to the...
Study smarter with the SolutionInn App