Tutorial for function approximation with Chebyshev orthogonal polynomials, written in Matlab. Strongly inspired by the chebfun project (www.chebfun.org). These methods use barycentric interpolation, which allows for efficient computation and numerical stability, even for high-order approximations. Includes functions for function approximation, data fitting, integration, differentiation, and interpolation.
I use these approximations for solving ordinary differential equations and in the background of trajectory optimization problems.
Matthew Kelly (2021). MatthewPeterKelly/Chebyshev_Polynomials (https://github.com/MatthewPeterKelly/Chebyshev_Polynomials), GitHub. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
There is no way that I know of to compute the min or max of an arbitrary high-order polynomial in closed form. There are trivial solutions for linear and quadratic, and nasty ones for cubic and probably quartic polynomials.
How to compute the min and max value then? There are fast and robust numerical methods that are specialized for computing the roots of polynomials. The steps are as follows:
1) Take the derivative of your target polynomial (a trivial linear operation on the coefficients)
2) Bracket the zero-crossings of the polynomial (I think that should be easier with orthogonal basis)
3) Use a bounded nonlinear root-finding method for computing the roots numerically. These can be implemented very efficiently for polynomials.
For step 3, see section 9.5 in Numerical Recipes in C (second edition).
Is there any way to detect maximum or minimum point on the approximated function given order and knots?