Given is the function x(t) = e -at -e -bt . Let a = 1 and b = 2. (a) Manually, find an expression…
Given is the function x(t) = e-at-e-bt. Let a = 1 and b = 2.
(a) Manually, find an expression for the area A under x(t) from t = 0 to t = 5. Write a script to:
(b) Plot x(t) for t = 0 to t = 5. Use N = 501 values of t in the given time range
(c) Calculate A using the expression found in part (a)
(d) Apply Euler’s method to find an approximation of A for N = 11, 111, and 211
(e) Output a table of the difference between A and its approximation for each N. Use format long e for all program output. Provide a listing of your program and the results.