1
$\begingroup$

I'm trying to approximate the function $f(x)=\max(-x,0)$ over $[-a,a]$ using polynomials. So, I used the Legendre polynomials for a generalized Fourier Series (relevant question), but with the dilation $\frac xa$. However, with $10$ polynomials, when I look at the absolute error, it's only "good" relative to the range, around $\frac{a}{100}$. However, I need something a bit better-- to formalize it, with $10$ of these new polynomials, for approximation $g(x)$, $|f(x)-g(x)| \leq 0.1 \, x \in [-a,a]$.

However, of course, to do that I need an orthogonal set of polynomials that are relative to weight function $w(x)=1$ (in fact any polynomial will do) that is orthogonal over $[-a,a]$. So, is there a way of generating such polynomials, so that creating and approximation for my function $f(x)$ over $[-a,a]$ (the polynomials should be different for each $a$. The $w(x)$ can change as well if needed, but it should still remain a polynomial) using the "generalized Fourier Series method" will satisfy my inequality above?

EDIT: I was just reading this page, and it points out that for larger $x$, the approximation got better, as the weight $\exp(\pi x)$ got bigger. So, I was wondering if I could just use the Gram-Schmidt orthogonalization method to create polynomials based on a large weight, like $w(x)=x^{14}$.

$\endgroup$
11
  • 1
    $\begingroup$ The orthogonal polynomials on $[-a,a]$ with uniform weight are just the Legendre polynomials evaluated at $ax$ (up to one's choice of normalization constants). There is not some other orthogonal polynomial family that you can use without adjusting the weight function. You can try to tune your weight function to where you see error in your approximations. $\endgroup$
    – Ian
    Sep 10, 2020 at 13:25
  • $\begingroup$ @Ian I did (I may revert the question), however, even with a weight of $x^{14}$, the error was worse than before. $\endgroup$
    – DUO Labs
    Sep 10, 2020 at 13:28
  • $\begingroup$ Where is the error occurring when $w=1$? Is it mostly near zero or near the endpoints? (In any case what you really want here is actually the minimax polynomial anyway, which is in general expensive to compute.) $\endgroup$
    – Ian
    Sep 10, 2020 at 13:30
  • $\begingroup$ @Ian It's mostly near $0$ (since it has such a sharp "jump", but even at other places, it's pretty high. $\endgroup$
    – DUO Labs
    Sep 10, 2020 at 13:32
  • $\begingroup$ If it's near zero then you don't want to weigh things less at zero, you want to weigh things more at zero. But most likely this will push the problem further out instead. $\endgroup$
    – Ian
    Sep 10, 2020 at 13:32

0

You must log in to answer this question.