by R. Grothmann There is the problem in polynomial theory, if there is a positive base for a given space. We discuss the following case on the interval [-1,1]: Is it possible to find finitely many non-negative polynomials of degree 2 such that each non-negative polynomial can be expressed by a non-negative linear combination of these polynomials? We need only be able express poynomials with integral equal to 1 over [-1,1]. We try to plot this set. So we define a function to compute the minimum on [-1,1] for polynomials with integral 1.
>:: p := a*x^2+b*x+c; >:: solve(integrate(p,x,-1,1)=1,c), pab := at(p,%)
2 a - 3 [c = - -------] 6 2 2 a - 3 a x + b x - ------- 6
To get the integral equal to 1, c depends on a and b. The minimum of course, can easily be computed.
>:: solve(diff(pab,x)=0,x)
b [x = - ---] 2 a
Now we can write the Euler function computing the minimum of p in [-1,1], if p has integral 1. We have to compare the boundary values at -1 and 1 with the value at the minimum.
>function map pmin (a,b) ...
c:=(3-2a)/6; s:=min(a+b+c,a-b+c); if a~=0 then return s; endif; x:=-b/(2a); if -1<=x and x<=1 then return min(s,a*x^2+b*x+c); else return s; endif; endfunction
Here is an example. The polynomial x^2+x+1/6 has integral 1 and minimum -0.83...
>pmin(1,1), plot2d("x^2+x+1/6",-1,1);
-0.08333333333333
>gauss("x^2+x+1/6",-1,1)
1
Now, we are able to plot the region of a and b, where the polynomial ax^2+bx+c with integral 1 is positive. This set represents the quadratic positive polynomials with integral 1.
>plot2d("pmin",r=2,niveau=0,hue=1); insimg;
Looking at that region we see that it is not the convex hull of finitely many points. But, if there would exist a positive base of polynomials, this would be the case. Imagine the set of all non-negative linear combinations of our base. This would be a finitely generated cone. Intersected with the polynomials of degree 2, it is still a finitely generated cone. The intersection of this cone with the polynomials with integral 1 would be the convex hull of finitely many points. We plot the 3D graph of pmin(a,b) for comparison.
>plot3d("pmin",r=2,user=1,scale=1.3,xlabel="a",ylabel="b"); insimg;
Here is a cut with b=0.
>plot2d("pmin";0,r=2);
There is a well known non-negative base for the quadratic polynimals, the Bernstein polynomials. We like to see, which quadratic polynomials can be expressed as a non-negative linear combination of the Bernstein polynomials. To answer this, we can simply normalize the Bernstein polynomials to integral 1, and insert the coefficients into our figure.
>:: function c(p) := block ( q:expand(p/integrate(p,x,-1,1)), ... >:: [coeff(q,x,2),coeff(q,x,1)] ); >p1:=mxmeval("c((x+1)^2)")
0.375 0.75
>p2:=mxmeval("c(x^2-1)")
-0.75 0
>p3:=mxmeval("c((x-1)^2)")
0.375 -0.75
>plot2d("pmin",r=2,niveau=0,hue=1); ... >plot2d([p1[1],p2[1],p3[1]],[p1[2],p2[2],p3[2]],add=1,points=1);
The answer to our problem is the convex hull of these three points.
>plot2d([p1[1],p2[1],p3[1],p1[1]],[p1[2],p2[2],p3[2],p1[2]],add=1); insimg;
The function on the right edge (maximal a) is the x^2*3/2, and can obviously not be expressed by the Bernstein polynomials in any non-negative way, since it vanishes in 0. The right part of the above plot looks like an ellipse. Let us study this. A little bit of contemplation shows, that this are belongs to polynomials of the type a*(x-d)^2, where -1<=d<=1, and a is such that the integral is 1. We use the coordinate function above, mapping polynomials to their highest and second highest coefficients [a,b].
>:: s := c((x-d)^2), define(vx(d),s[1]); define(vy(d),s[2]);
1 2 d [--------, - --------] 2 2 2 2 2 d + - 2 d + - 3 3
Indeed!
>d:=-1:0.01:1; x:=mxmeval("vx(d)"); y:=mxmeval("vy(d)"); ... > plot2d(x,y,r=2); insimg;
Let us check, if this is an ellipse. First, we compute the center as the midpoint between v(0)=[3/2,0] and v(inf)=[0,0].
>:: 1/2*(vx(0)+limit(vy(d),d,inf))
3 - 4
So the small semiaxis is 3/4. Then we can compute the large semiaxis.
>:: solve(vx(d)=3/4,d); at(vy(d),%[1]) | ratsimp
3 --------- 2 sqrt(3)
Now we can check the equation, and find that the curve is indeed an ellipse with the general equation (x-x0)^2/a^2+(y-y0)^2/b^2=1.
>:: (vx(d)-3/4)^2/(3/4)^2+vy(d)^2/(sqrt(3)/2)^2 | ratsimp
1
>