0
$\begingroup$

This question already has an answer here:

I have a function f[x_]:= 3*(x - Pi/2)*(Sin[4*x])^2 + 2*Cos[3*x], and I need to use LinearProgramming command to find coefficients c1, c2, c3 and c4 of a function g[x_]:= c1*Sin[2x] + c2*Sin[4x] + c3*Cos[x] + c4*Cos[3x], so that the maximum absolute error is minimized -> min (max Abs[f[x] - g[x]]), range x is from 0 to Pi. Can someone please help me?

$\endgroup$

marked as duplicate by Daniel Lichtblau, Yves Klett, m_goldberg, mikado, Kuba Jun 23 '17 at 22:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Why was this reposted? $\endgroup$ – Daniel Lichtblau Jun 23 '17 at 20:09
  • $\begingroup$ No one answered me, and I have no idea how to do this. A suggestion was that I try FindFit, but that's not it. $\endgroup$ – Cro Simpson2.0 Jun 23 '17 at 21:12
  • $\begingroup$ Do you maybe know how to solve this with LinearProgramming? $\endgroup$ – Cro Simpson2.0 Jun 23 '17 at 21:14
  • $\begingroup$ Not offhand. But I think the Remez method does something with LP, minimizing maximal differences at Chebyshev node points. Or something along those lines. $\endgroup$ – Daniel Lichtblau Jun 24 '17 at 16:39