Brenden E. answered 08/27/20
MIT PhD & former Dartmouth professor with 16 years teaching experience
Hi Karla,
This is a great problem. The elegant solution is to set up a system of equations, plugging in for t as follows:
[ 1 -6 ] [ c0 ] [ 22]
[ 1 0 ] * [ c1] = [ -5]
[ 1 6 ] [-26]
You can find the "least squares" solution for c0 and c1 via the pseudo-inverse:
[c0; c1] = pinv( [1 -6; 1 0; 1 6] ) * [22; -5; -26] = [-3; -4]
Using long-hand, you can write the sum of the squared error as:
E = (c0-6*c1 - 22)^2 + (c0+5)^2 + (c0+6*c1+26)^2
Then to find c0 and c1, set dE/dc0 = 0 and dE/dc1 = 0 as follows:
(c0-6*c1 - 22) + (c0+5) + (c0+6*c1+26) = 0
-6*(c0-6*c1 - 22) + 6*(c0+6*c1+26) = 0
When you simplify, you find c0 = -3 and c1 = -4 just as given above using the pseudo-inverse. For more info about the pseudo-inverse, check out:
https://mathworld.wolfram.com/Moore-PenroseMatrixInverse.html