I am using Legendre polynomials for a regression problem where I am trying to find coefficients $(A_{0},A_{1},A_{2},A_{3},A_{4})$ of the follwoing polynomial:

$$ f(x) = A_{0} + A_{1}x + A_{2}(1-x^{2}) + A_3(5x^3 - 3x) + A_4\left(\frac{1}{8}(35x^4 - 30x^2 + 3) \right) \;\; where\;\; -1\leq x \leq 1 $$

I know lower and upper bound of $f(x)$.

I am using matlab fmincon function to incorporate this non linear constraint. Basically I compute this function at every step of evaluation and check whether all of the values are inside lower and upper bound.

Is there any way I can convert this equation to some form of linear inequalities or lower bounds and upper bounds on the coefficient so I do not have to use non-linear constraint in fmincon?

  • $\begingroup$ If it's a regression problem, why not just use normal equations with your data points? $\endgroup$ May 30, 2022 at 3:42
  • $\begingroup$ I am using this function as an input to a coupled ODE solver. This solver outputs the variable which is part of the cost function. It is a regression problem because in the end cost function is sum of square errors but not for “x” but another variable “z”. $\endgroup$ May 30, 2022 at 9:12


You must log in to answer this question.

Browse other questions tagged .