In a chemical reaction, one molecule of A combines with one molecule of B to for
ID: 3603348 • Letter: I
Question
In a chemical reaction, one molecule of A combines with one molecule of B to form one molecule of the chemical C. It is found that the concentration y(t) of C at time t is the solution to the Initial Value Problem (IVP) y'-k(a - y)(b-y) th (0)-0; where k is a positive constant and a and b are the initial concentrations of A and B, respectively. Find the solution for the concentration y(t) of C in the time interval [0, 20] using Matlab and hand calculations for k-0.01, a-70 millimoles/litre, and b-50 millimoles/litre To find solution using Matlab you are required to perform the following tasks: * 1. Write a function fun ode.m in which you define your ordinary differential equation (1) (Refer to an example in Week 10 Example.zip) 2. Write another function in which you will solve equation (1) defined in fun ode.m (a) By using Euler's method (function euler.m is available in week10.zip) with At -2s and M=1 s. (b) By using Heun's Method (you will need to modify euler.m to implement Heun's method) with At -2s. (c) By using ode45 Matlab function based on Runge-Kutta method with M-2s (d) Compare results obtained in (a), (b) and (c) with the exact solution yt) 350e7-5e by plotting the solutions on the same graph (e) Find the percentage errors for the results obtained in (a), (b) and (c) by comparing with the exact solution and plot them on separate graph. Comment on accuracy of the methods. In calculation of the error exclude initial point t-0 * To find solution using hand calculations you are required to perform the following 3. use Euler's method with 1-2s over [0 4] and compare your solution with results 4.use Heun's method with At-ls over [0 4] and compare your solution with results tasks: obtained using Matlab function in 2(a) obtained using Matlab function in 2(b)Explanation / Answer
PROBLEM 1-1 (1/1 point) Suppose x = "pi" and y = "pie". The line of code x, y = y, x will swap the values of x and y, resulting in x = "pie" and y = "pi". True <code>True</code> - correct ## False ##