0

My professor gave us this problem and I'm still trying to figure it out.

Given $f(x)=c_{1}sin(\pi x)+c_{2}cos(\pi x)$

Minimize $(f(0)-5)^{2}+(f(\frac{1}{4}))^2+(f(\frac{1}{2})+1)^{2}$

He gave us some partial work, but I don't understand it.

$\left \| Ax-b \right \|^{2}\rightarrow min$

$x=\begin{vmatrix} c_{1}\\ c_{2} \end{vmatrix}$

$b=\begin{bmatrix} -5\\ 0 \\1 \end{bmatrix}$

$A=\begin{bmatrix} 0 & 1\\ \frac{1}{\sqrt2}& \frac{1}{\sqrt2}\\ 1& 0 \end{bmatrix}$

$A^{T}Ax=A^{T}b$

I believe that we are solving for C1 and C2.

I now see how to find matrix A. Matrix A is found by computing the values of f(x) in the sin() and cos() functions. Column C1 is the sin() and column C2 is the cos().

Erock Brox
  • 765
  • 1
  • 4
  • 14
  • I am not sure which one is the typo, is it the objective function or the matrix $b$. the sign of $1$ is contradictory. – Siong Thye Goh Jul 24 '17 at 03:42
  • I know that there is a problem with the sign. I just don't know if I take the negatives of all the numbers or keep the current signs. – Erock Brox Jul 24 '17 at 04:01

1 Answers1

0

We want to use $f(0)$, $f(0.25)$ and $f(0.5)$ to approximate certain values. We should be able to evaluate these values in terms of $c_1$ and $c_2$ and obtain some linear equations.

We want to solve a problem of the form of $Ax=b$ if possible but unfortunately it might not be consistent, hence we want to minize the error.

We want to minimize $\begin{Vmatrix} Ax-b\end{Vmatrix}^2$, using calculus, we can show that the optimal solution satisfy $$A^TAx = A^Tb$$

Guide:

  1. Compute $A^TA$.

  2. Compute $A^Tb$.

  3. Solve for $x=(A^TA)^{-1}(A^Tb)$.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
  • After solving for x as you have listed above I get $\begin{bmatrix} 2\ -4 \end{bmatrix}$ which I believe is the correct answer. – Erock Brox Jul 24 '17 at 04:15
  • hmmm... by evaluating $f$ at those values, you obtain $3$ equation involving $c_1$ and $c_2$ right? would you like to show those equations to me? It might be good to plot the graph and visualize if the solution makes sense. – Siong Thye Goh Jul 24 '17 at 04:49