compute simpson's 1/3 intergal as matlab code

profileDllaf.cy93
hw8_final_1.pdf

BME 301 Numerical Methods in Biomedical Engineering HOMEWORK 8 DUE March 27, 2017, 11:59 pm. Late policy: 20% deducted each late day.

1. The following data were obtained by measuring the length of a hydrogel patch immersed in 1.0M KCl solution as the temperature of the solution increased.

Compute the numerical derivative of the length vs temperature data at as many points as you can in the data range 30-42 oC using:

a. [4 points] the first central difference formula: 𝑓"(𝑥) ≈ ' ()* +'((+*) ,*

.

b. [4 points] the second central difference formula 𝑓"(𝑥) ≈ +' (),* )-' ()* +-' (+* )'((+,*) .,*

. c. [2 points] Plot the temperature vs derivative results from parts a. and b. together in a

MATLAB figure. 2. This question uses the following data obtained during a cell culture process.

Time (hours) Oxygen Uptake Rate (g/h)

140 15.49 141 16.16 142 15.35 143 15.13 144 14.20 145 14.23 146 14.29 147 12.74 148 14.74 149 13.68 150 14.51

a. [5 points] Write your own MATLAB function that computes the Simpson’s 1/3 integral

between any two tabulated time points. b. [3 points] Use this function to compute the total amount of oxygen absorbed between hours

141 and 146. c. [2 points] Compare the result you obtained for part b. with results you find using the

MATLAB commands ‘integral’ and ‘trapz’. This will require you to read the documentation associated with each function.

Temperature, (oC)

Length (mm)

30 5.60 31 5.75 32 5.82 33 5.87 34 5.90 35 5.92 36 5.94 37 5.94 38 5.95 39 5.96 40 5.97 41 6.00 42 6.03

T