appending new *.texi document to user documentation
Subject: appending new *.texi document to user documentation
From: Barton Willis
Date: Tue, 12 Jul 2011 15:18:09 -0500
Thanks to Jaime & Leo, the user documentation for Bernstein works.
Likely I missed something in the directions, but I also needed to insert
@node Bernstein, bode, augmented_lagrangian, Top
@chapter Bernstein
@include bernstein.texi
into include-maxima.texi.in
Should anybody have comments about naming or anything else, let me know.
Short demo:
(%i9) bernstein_poly(5,8,x);
(%o9) 56*(1-x)^3*x^5
(%i10) bernstein_poly(k,n,x);
(%o10) bernstein_poly(k,n,x)
(%i11) %, bernstein_explicit : true;
(%o11) binomial(n,k)*(1-x)^(n-k)*x^k
(%i12) multibernstein_poly([2,3],[4,5],[x,y]);
(%o12) 60*(1-x)^2*x^2*(1-y)^2*y^3
Approximate a function as a linear combination of Bernstein polynomials
(works for multivariable case too)
(%i14) bernstein_approx(f(x),[x], 2);
(%o14) f(1)*x^2+2*f(1/2)*(1-x)*x+f(0)*(1-x)^2
Express a multivariable polynomial exactly as a linear combination of
Bernstein polynomials
(%i16) bernstein_expand(x*y+1,[x,y]);
(%o16) 2*x*y+(1-x)*y+x*(1-y)+(1-x)*(1-y)
Check:
(%i17) expand(%);
(%o17) x*y+1
--Barton