Repeat the exercises of Module 6.2, Euler's Method, using the Runge-Kutta 4 method. Compare the relative...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Repeat the exercises of Module 6.2, "Euler's Method," using the Runge-Kutta 4 method. Compare the relative errors with those of the corresponding exercises from Module 6.2, "Euler's Method," and Module 6.3, "Runge-Kutta 2 Method." 6. Download the file simplePendulum from the text's website in one of the sys- tem dynamics tools. Figure 3.3.3 of Module 3.3, "Tick Tock-The Pendu- lum Clock," shows a plot of a simple pendulum's angle, angular velocity, and angular acceleration versus time that is the result of the simulation with At = 0.01 and Runga-Kutta 4 integration. Run the simulation with At = 0.01 using, in turn, Runga-Kutta 4, Runga-Kutta 2, and Euler's methods or what- ever methods are available with your system dynamics tool. Describe any anomalies in the graphs. Repeat the simulations and description for At = 0.1. Discuss the implications of your findings. Reasoning behind Euler's Method In Module 2.2, "Unconstrained Growth and Decay," to simulate with P,= 100, we employ the following underlying equations with INIT meaning "initial" and dt rep- resenting a small change in time, Ar: growth_rate= 0.10 INIT population = 100 growth = growth_rate * population population = population + growth * dt These equations, which we enter explicitly or implicitly with a model diagram, rep- resent the following finite difference equations using Euler's method: growth_rate=U.IU population (0) 100 growth(t) = growth_rate* population(t-At) population (t) = population (t - At) + growth(t) * At The population at one time step, population (1), is the population at the previous time step, population (t-Ar), plus the estimated change in population, growth(t) * Ar. The derivative of population with respect to time is growth, and growth(t) = growth_rate * population(t - At) = 0.10 * population (1 - At) or dPldt = 0.10P. The change in the population is the flow (in this case, growth) times the change in time, Ar; and the flow (growth) is the derivative of the function at the previous time step, t-At. Figure 6.2.1 illustrates Euler's method used to estimate P₁ = P(8) for the preced- ing differential equation by starting with P, = P(0) = 100 and using At = 8. In this situation, t = 8,1- Ar=0, and the derivative at that time is P'(0) = 0.1(100) = 10, which, as Figure 6.2.1 depicts, is the slope of the tangent line to the curve P(t) at (0. 100). We multiply Ar, 8, by this derivative at the previous time step, 10, to obtain the estimated change in P, 80. Consequently, the estimate for P, is as follows: estimate for P₁ = previous value of P + estimated change in P = P₁+ P'(0)Ar = 100 + 10(8) = 180 In Module 2.2, "Unconstrained Growth and Decay," we discovered analytically that the solution to the preceding differential equation is P = 100e. Because the graph of the actual function is concave up, this estimated value, 180, is lower than the ac- tual value at t = 8, 100 223. 300 250 200 150 100 50 (8, 223) 4 (8, 180) 80 6 100 4 -2 8 10 12 Figure 6.2.1 Actual point, (8, 223), and point obtained by Euler's method, (8, 180) I [ Algorithm for Euler's Method Following the preceding description, Algorithm 1 presents Euler's method. Algorithm 1: Euler's Method P(to) -Po Initialize SimulationLength while 1 < SimulationLength do the following: 1+1+ Ar P(1)=P(1-A1) + P'(r-Ar) Ar Thus, this simulation uses a sequence of times-1₁.12-and calculates a cor- responding sequence of estimated populations-Po. P₁, P₂,... In Algorithm 1, 1₁ =1-1+Af or 1-1=1,- Ar, and P, = P + P()AL. However, as illustrated in Module 5.2, "Errors," repeatedly accumulating Ar into I usually produces an accumulation error. To minimize error, we calculate the time as the sum of the initial time and an integer multiple of Ar. Using the functional nota- tion ft. P-1) to indicate the derivative dPldt at Step n-1, Algorithm 2 presents a revised Euler's Method that minimizes accumulation of error. Repeat the exercises of Module 6.2, "Euler's Method," using the Runge-Kutta 4 method. Compare the relative errors with those of the corresponding exercises from Module 6.2, "Euler's Method," and Module 6.3, "Runge-Kutta 2 Method." 6. Download the file simplePendulum from the text's website in one of the sys- tem dynamics tools. Figure 3.3.3 of Module 3.3, "Tick Tock-The Pendu- lum Clock," shows a plot of a simple pendulum's angle, angular velocity, and angular acceleration versus time that is the result of the simulation with At = 0.01 and Runga-Kutta 4 integration. Run the simulation with At = 0.01 using, in turn, Runga-Kutta 4, Runga-Kutta 2, and Euler's methods or what- ever methods are available with your system dynamics tool. Describe any anomalies in the graphs. Repeat the simulations and description for At = 0.1. Discuss the implications of your findings. Reasoning behind Euler's Method In Module 2.2, "Unconstrained Growth and Decay," to simulate with P,= 100, we employ the following underlying equations with INIT meaning "initial" and dt rep- resenting a small change in time, Ar: growth_rate= 0.10 INIT population = 100 growth = growth_rate * population population = population + growth * dt These equations, which we enter explicitly or implicitly with a model diagram, rep- resent the following finite difference equations using Euler's method: growth_rate=U.IU population (0) 100 growth(t) = growth_rate* population(t-At) population (t) = population (t - At) + growth(t) * At The population at one time step, population (1), is the population at the previous time step, population (t-Ar), plus the estimated change in population, growth(t) * Ar. The derivative of population with respect to time is growth, and growth(t) = growth_rate * population(t - At) = 0.10 * population (1 - At) or dPldt = 0.10P. The change in the population is the flow (in this case, growth) times the change in time, Ar; and the flow (growth) is the derivative of the function at the previous time step, t-At. Figure 6.2.1 illustrates Euler's method used to estimate P₁ = P(8) for the preced- ing differential equation by starting with P, = P(0) = 100 and using At = 8. In this situation, t = 8,1- Ar=0, and the derivative at that time is P'(0) = 0.1(100) = 10, which, as Figure 6.2.1 depicts, is the slope of the tangent line to the curve P(t) at (0. 100). We multiply Ar, 8, by this derivative at the previous time step, 10, to obtain the estimated change in P, 80. Consequently, the estimate for P, is as follows: estimate for P₁ = previous value of P + estimated change in P = P₁+ P'(0)Ar = 100 + 10(8) = 180 In Module 2.2, "Unconstrained Growth and Decay," we discovered analytically that the solution to the preceding differential equation is P = 100e. Because the graph of the actual function is concave up, this estimated value, 180, is lower than the ac- tual value at t = 8, 100 223. 300 250 200 150 100 50 (8, 223) 4 (8, 180) 80 6 100 4 -2 8 10 12 Figure 6.2.1 Actual point, (8, 223), and point obtained by Euler's method, (8, 180) I [ Algorithm for Euler's Method Following the preceding description, Algorithm 1 presents Euler's method. Algorithm 1: Euler's Method P(to) -Po Initialize SimulationLength while 1 < SimulationLength do the following: 1+1+ Ar P(1)=P(1-A1) + P'(r-Ar) Ar Thus, this simulation uses a sequence of times-1₁.12-and calculates a cor- responding sequence of estimated populations-Po. P₁, P₂,... In Algorithm 1, 1₁ =1-1+Af or 1-1=1,- Ar, and P, = P + P()AL. However, as illustrated in Module 5.2, "Errors," repeatedly accumulating Ar into I usually produces an accumulation error. To minimize error, we calculate the time as the sum of the initial time and an integer multiple of Ar. Using the functional nota- tion ft. P-1) to indicate the derivative dPldt at Step n-1, Algorithm 2 presents a revised Euler's Method that minimizes accumulation of error.
Expert Answer:
Related Book For
Elementary Linear Algebra with Applications
ISBN: 978-0471669593
9th edition
Authors: Howard Anton, Chris Rorres
Posted Date:
Students also viewed these programming questions
-
You can discover which fonts are available on your system by using the ______________. a. GetAvailableFontFamilyNames() method of the GraphicsEnvironment class b. GetFonts() method of the Graphics...
-
Figure 2.24 shows a plot of velocity versus time for an object in linear motion. (a) Compute the acceleration for each phase of motion. (b) Describe how the object moves during the last time segment....
-
Figure 2.24 shows a plot of velocity versus time for an object in linear motion. (a) What are the instantaneous velocities at t = 8.0 s and t = 11.0 s? (b) Compute the final displacement of the...
-
[15] Which register transfer statement is equivalent to WRITE microopeation: a) DRAC b) DR M[AR] c) M[AR] DR d) AC DR
-
For the ER diagrams created in the following exercises, map the ER diagram into a relational schema and do the following: a. For exercise E2.2a, show several records in each relation and mark those...
-
Using data from the previous problem, find the increase in rotational kinetic energy, given the cores mass is 1.3 times that of our Sun. Where does this increase in kinetic energy come from? Data...
-
Why might a plaintiff want to seek a provisional remedy?
-
The class date Type was designed to implement the date in a program, but the member function set Date and the constructor do not check whether the date is valid before storing the date in the member...
-
Randy's Restaurant Company (RRC) entered into the following transactions during a recent year. April 1 Purchased equipment (a new walk-in cooler) for $8,800 by paying $2,900 cash and signing a $5,900...
-
Toyota Motor Corporation (TM) uses target costing. Assume that Toyota marketing personnel estimate that the competitive, average selling price for the Rav4 in the upcoming model year will need to be...
-
HW06 7 40 points eBook Print References 3.1500000000000004% 3.2% Given the following term structure, what is the forward rate of a 3-year treasury bond issued 1 year from now? What is the forward...
-
The following selected transactions relate to liabilities of United Insulation Corporation. United's fiscal year ends on December 31. 2024 January 13 Negotiated a revolving credit agreement with...
-
How much heat (in kJ) is released or absorbed in the reaction of 10.0 grams of SiO2 (quartz) with excess hydrofluoric acid? You must calculate the enthalpy of the reaction first. 1 SiO 2 (s) + 4 HF...
-
In recent decades, economic inequality (both income inequality and wealth inequality) has become a prominent topic in American politics. If it is a problem, given our discussion of Fiscal and...
-
Blossom, Inc., has 16300 shares of 4%, $100 par value, cumulative preferred stock and 59100 shares of $1 par value common stock outstanding at December 31, 2026. There were no dividends declared in...
-
Can you explain why the bottom one is preferred? We are studying security vulnerabilities. Noncompliant void readData() throws IOException{ BufferedReader br = new BufferedReader(new...
-
Riverside Incorporated makes one model of wooden canoe. Partial information for it follows: Number of Canoes Produced and Sold Total costs Variable costs Fixed costs Total costs Cost per unit...
-
How do the principles of (a) Physical controls and (b) Documentation controls apply to cash disbursements?
-
Express z1 = i, z2 = 1 - 3i, and z3 = 3 + i in polar form, and use your results to find z1z2/z3. Check your results by performing the calculations without using polar forms.
-
Use Formula 11 to show that date-a- sino=e16-e-m and
-
Find the standard matrix for the linear operator T: R3 R3 that (a) Rotates each vector 90 counterclockwise about the z-axis (looking along the positive z axis toward the origin) (b) Rotates each...
-
Define a financial forecast.
-
How does a financial projection differ from a financial forecast?
-
What is the CPA's purpose in examining a financial forecast or projection?
Study smarter with the SolutionInn App