Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2. Now, take x as an independent variable and obtain x = b0 + b1 y and hence find the values of
k and Km
Two different methods were shown in the lectures for linear regression of the form y = a0 +a1 x+a2 u.
The first method was to minimize the sum of square errors,
N
X 2
I= yi − a0 + a1 xi + a2 ui
i=1
by equating
∂I ∂I ∂I
= = =0
∂a0 ∂a1 ∂a2
and solving for a0 , a1 , a2 .
An alternate method was the matrix method, where we created data matrices to represent the data
−1
in the form Y = Aφ + E, and obtained the solution as φ = AT A AT Y .
1
CH-3050: Computational Techniques
August–November 2010
2. Show that for the problem involving one dependent (y) and two independent (x, u) variables,
the matrix method leads to the same result as that obtained using the first method.
3. For the following data, obtain the fit using both the methods described above.
The following data is available for saturation pressure of acetone as a function of temperature:
We can fit polynomials up to order 7 to the above data. Please complete the following:
• Comment on what order polynomial would best represent the data and why.
• An additional experiment was conducted and the saturation pressure at 351 K was 2.016 bar.
How well does your chosen polynomial predict the saturation pressure?
Repeat the previous problem using (1) Lagrange and (2) Newton’s interpolating polynomials.
2 Home Assignment 04
CH-3050: Computational Techniques
August–November 2010
Problem 5: Bonus Problem (not graded with the rest of the assignment)
We now solve a nonlinear regression problem. You will solve the problem by two methods: (i) using
your own program, and (ii) using an in-build MATLAB function.
3 Home Assignment 04