2. In class we discussed a problem involving two reversible chemical reactions as an example of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. In class we discussed a problem involving two reversible chemical reactions as an example of a system of nonlinear equations. After simplifying, the equations can be written as f (C, C) = C + C k(ao 2c - C) (bo C) = 0, g (C, C) = = C + C - k(ao 2c c) (do c) = 0, - where C, C are the equilibrium product concentrations arising from the two reactions, k, k2 are the equilibrium reaction constants, and ao, bo, do are the initial concentrations of the reactants. Let ao = 20 mole/liter, bo = do = 10 mole/liter, k 1.63 10-4, k = 3.27 10-. The Matlab code on the back of this sheet applies Newton's method to solve for C, C. The code takes six steps starting from initial guess c = C2 = 0.5 mole/liter and it prints the results in a table with the following format. column 1: n (step index) column 2: C column 3: C column 4: f(c, C) column 5: g(C, C) = Your assignment is to run the code and present the table of results in your writeup. You may put the code into an M-file. In order to run the code, you must fill in the two functions f(C, C), g(C, C) and the Jacobian matrix. % % MTH 422, exercise on Newton's method for solving a nonlinear system % function Newton clear; format long; c1 = 0.5; c2 = 0.5; for n = 1:6 result (n, 1) = n-1; result (n, 2) = c1; result (n, 3) = c2; result (n, 4) result (n,5) = answer = f(c1, c2); g(c1, c2); [c1; c2] jacobian (c1, c2)\[f(c1, c2); g(c1, c2)]; c1 = answer (1); c2 = answer (2); end result % function ffun = f(c1, c2) a0 = 20; b0 = 10; d010; k1 = 1.63e-4; k2= 3.27e-3; ffun = % fill in 1st function % function gfun a0 = 20; bo gfun = % fill in 2nd function % function j = jacobian (c1, c2) a0 = 20; b0 = 10; d0 = 10; k1 = 1.63e-4; k2 = 3.27e-3; j11 % fill in 11 element = j12 % fill in 12 element g(c1, c2) = 10; do 10; k1 = 1.63e-4; k2 = 3.27e-3; j = j21 % fill in 21 element = j22 = % fill in 22 element [j11 j12; j21 j22]; = 2. In class we discussed a problem involving two reversible chemical reactions as an example of a system of nonlinear equations. After simplifying, the equations can be written as f (C, C) = C + C k(ao 2c - C) (bo C) = 0, g (C, C) = = C + C - k(ao 2c c) (do c) = 0, - where C, C are the equilibrium product concentrations arising from the two reactions, k, k2 are the equilibrium reaction constants, and ao, bo, do are the initial concentrations of the reactants. Let ao = 20 mole/liter, bo = do = 10 mole/liter, k 1.63 10-4, k = 3.27 10-. The Matlab code on the back of this sheet applies Newton's method to solve for C, C. The code takes six steps starting from initial guess c = C2 = 0.5 mole/liter and it prints the results in a table with the following format. column 1: n (step index) column 2: C column 3: C column 4: f(c, C) column 5: g(C, C) = Your assignment is to run the code and present the table of results in your writeup. You may put the code into an M-file. In order to run the code, you must fill in the two functions f(C, C), g(C, C) and the Jacobian matrix. % % MTH 422, exercise on Newton's method for solving a nonlinear system % function Newton clear; format long; c1 = 0.5; c2 = 0.5; for n = 1:6 result (n, 1) = n-1; result (n, 2) = c1; result (n, 3) = c2; result (n, 4) result (n,5) = answer = f(c1, c2); g(c1, c2); [c1; c2] jacobian (c1, c2)\[f(c1, c2); g(c1, c2)]; c1 = answer (1); c2 = answer (2); end result % function ffun = f(c1, c2) a0 = 20; b0 = 10; d010; k1 = 1.63e-4; k2= 3.27e-3; ffun = % fill in 1st function % function gfun a0 = 20; bo gfun = % fill in 2nd function % function j = jacobian (c1, c2) a0 = 20; b0 = 10; d0 = 10; k1 = 1.63e-4; k2 = 3.27e-3; j11 % fill in 11 element = j12 % fill in 12 element g(c1, c2) = 10; do 10; k1 = 1.63e-4; k2 = 3.27e-3; j = j21 % fill in 21 element = j22 = % fill in 22 element [j11 j12; j21 j22]; =
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
-
Calculating Manufacturing Overhead Rates Windsor Company, accumulated the following data for 2017: Milling Department manufacturing overhead $187,200 Finishing Department manufacturing overhead...
-
find one example from the news media that you can link --either videos, podcasts, articles, reports, television broadcasts, etc.--that exhibit what you take to be a valid and sound deductive argument.
-
Justin is considering majoring in bioinformatics. He is considering three career options: working for a Silicon Valley start-up, working for a large pharmaceutical firm, or working for a university...
-
In Exercises 7192, find and simplify the difference quotient f(x +h)-f(x) h -, h = 0
-
A researcher records the levels of attraction for various fashion models among college students. He finds that mean levels of attraction are much higher than the median and mode for these data. (a)...
-
When an organization decides to replace a legacy system, it usually chooses a contemporary database system over a relational file-based system. But each type of system has its own advantages and...
-
\(\frac{12}{\sqrt{40}}\) Rationalize the denominators of the fractions, and then simplify.
-
Sussex Company is authorized to issue 100,000 shares of common stock. On August 1, the company issued 5,000 shares at $25 per share. Prepare journal entries to record the issuance of stock for cash...
-
6.18 East Asiatic Company-Thailand. The East Asiatic Company (EAC), a Danish company with subsidiaries throughout Asia, has been funding its Bangkok subsidiary primarily with U.S. dollar debt because...
-
This comprehensive review problem requires you to complete the accounting cycle for Sherman Realty twice. This practice set allows you to review Chapters 1-5 while reinforcing the relationships...
-
Total Assets are 735,000; ROA is 0.11; Stockholders' equity is $425,000. Calculate ROE. Express your answer as a percentage (without using the % symbol) and round to 2 decimal places. (e.g. 14.05)...
-
Why do we need to allocation and apportioning of manufacturing overhead?
-
A. Apple Company installs aluminum ang glass windows and doors in customers' homes. Job A1 has direct materials of P19,000 and direct labor of P5,000. Overhead is applied at the rate of 140% of...
-
A company processes Chemical XD-1 through a pressure treatment operation. After the process is complete, there are two outputs: R and S. The monthly cost of processing XD-1 are 45,000 for materials...
-
The Shirt Works sells a large variety of tee shirts and sweatshirts. Steve Hooper, the owner, is thinking of expanding his sales by hiring high school students, on a commission basis, to sell...
-
What date determines the remittance period for Quebec statutory withheld from a manual cheque?
-
Last year OHaganBooks.com experimented with an online subscriber service, Red On Line ( ROL ) , for its e - book service. The consumer demand for ROL was modeled by the equation q = 1 , 3 0 0 e p 2 +...
-
As you rewrite these sentences, replace the cliches and buzzwords with plain language (if you don't recognize any of these terms, you can find definitions online): a. Being a jack-of-all-trades, Dave...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family. Ivan and Irene have the following investment income, in addition to that reported in Chapter 1: Dividends...
-
John Fuji (age 37) moved from California to Washington in December 2011. He lives at 468 Cameo Street, Yakima, WA 98901. John's Social Security number is 571-78-5974 and he is single. His earnings...
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
Investors purchase common stock as a way to increase their income. As stockholders, they earn the right to vote on company business.
-
What are the sources that you might use to evaluate stock investments?
-
What are the different types of stock investments?
Study smarter with the SolutionInn App