For the following first order ODE, dy dt = y + t for t= 0 to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For the following first order ODE, dy dt = y + t for t= 0 to t = 1.5 with the initial value of y(0) = 1. This ODE has the analytical solution, y = 7et t-3t-6t-6 Write a MATLAB script to do the following, (a) (4m) Use the function odeEuler to solve using the first order Euler explicit method using h = 0.5. (b) (4m) Write a MATLAB function called odeMidPoint to solve the ODE using the second order mid-point method using h = 0.5. Call this function from your script to solve the ODE. (c) (1m) Use the function odeRK4 to solve using the classical fourth-order Runge-Kutta method using h = 0.5. (d) (3m) Plot the four solutions on a single annotated graph using different markers/colours for the different solutions. (e) (3m) For each method, calculate the mean relative error and the approximate number of accurate digits. For the following first order ODE, dy dt = y + t for t= 0 to t = 1.5 with the initial value of y(0) = 1. This ODE has the analytical solution, y = 7et t-3t-6t-6 Write a MATLAB script to do the following, (a) (4m) Use the function odeEuler to solve using the first order Euler explicit method using h = 0.5. (b) (4m) Write a MATLAB function called odeMidPoint to solve the ODE using the second order mid-point method using h = 0.5. Call this function from your script to solve the ODE. (c) (1m) Use the function odeRK4 to solve using the classical fourth-order Runge-Kutta method using h = 0.5. (d) (3m) Plot the four solutions on a single annotated graph using different markers/colours for the different solutions. (e) (3m) For each method, calculate the mean relative error and the approximate number of accurate digits.
Expert Answer:
Answer rating: 100% (QA)
Given below are the codes and screenshots of the for the functions odeEuler odeMidPoint odeRK4 function ty odeEulerfIy0h ODEEULER Computes the solutio... View the full answer
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these computer network questions
-
Assuming Ant has fully met the regulator's needs, how would this affect the IPO value? Also re-evaluate the new value.
-
A business starts this year with P1,000,000 assets with no debt. The expected ROE equals 10%. Suppose the firm decides to have a payout of 40% for this year. How much is the expected total dividends...
-
(a) Which is a better measure of risk, standard deviation or semi-standard deviation? (b) Under what conditions would standard deviation and semi-standard deviation be equally good measures of risk?...
-
Discuss what you see as the role of ethics as it pertains to management and managers. Does management, in your view, help shape the values and ethics of an organization? What about an organization's...
-
Why is whitewash sometimes applied to the glass of florists' greenhouses in the summer?
-
New West Company recently hired a new accountant whose first task was to prepare the financial statements for the year ended December 31, 2017. The following is what he produced: The owner of the...
-
How are the cash flows originating from a company's financing activities identified?
-
1. What were the data backup problems when Petco used tapes? 2. What were the data backup problems when Petco used mirroring? 3. What are the disadvantages of using DAS, and how are these...
-
Consider the initial value problem (0 if 0
-
corporation is resisting the personal holding company tax, but the Tax Court sides with the IRS. Within 90 days after the adverse decision, one shareholder transfers his stock and $10,000 in cash to...
-
Finch Manufacturing estimated its product costs and volume of production for Year 3 by quarter as follows. First Quarter Second Quarter Third Quarter Fourth Quarter Direct raw materials $ 8 2 , 5 0 0...
-
Leo leased a building to Theresa that Theresa used as a restaurant. Leo also owned adjacent property that he leased to Tri-State Auto Parks as a parking lot. Shortly after Theresa started her...
-
Draft a will for Mary Louise Smith is a 48 year-old widowed, female with three children. Her children are as follows: Beth Smith (26 years old) is the daughter of Mary and Mary's late husband Eric...
-
1. What are the main factors a trainer should consider when choosing an instructional method? Explain how these factors will lead to a certain method over others providing a real-life training...
-
Discuss a professional " passion " for the type of work if you was to pursue and impact to make as a Team Manager in Sports. Discuss two (2) professional goals related to pursuit as a team manager in...
-
A radiating body originally has a Kelvin temperature To, and its surroundings are at 500K (To> 500K). If the Kelvin temperature of the radiating body is increased to 37, the net rate at which the...
-
Find the exact value of cos (x-y) if tan(x) =3/4 ,cos (y) =-5/13, ?
-
PC Contractors, Inc., was an excavating business in Kansas City, Missouri. Union Bank made loans to PC, subject to a perfected security interest in its equipment and other assets, including...
-
What is the value of k at the end of this function? function k = probleml_34 1 2 stop_loop = 2; 3 k = 0; 4 while stop_loop > 1 5 k k+1; 6 stop_loop = 7 end stop_loop 0.25;
-
Use Cramers rule to compute the solution to the system of equations 2x+y=z=1 -x+ 2z = 4 4x - 2y + 3z0
-
Consider some matrix A. After using Gauss elimination with three partial pivoting steps, you obtain the upper triangular matrix What is the determinant of the original matrix A? U= 16 3 5 4 2 0 1 3 5...
-
Why do firms advertise?
-
Is advertising good or bad from societys perspective?
-
Why is it so important for monopolistically competitive firms to advertise?
Study smarter with the SolutionInn App