## 12403 Reputation

8 years, 157 days

## monomials...

Let G be the list of the polynomials obtained by Basis. E.g.

G:=[y^3+x*y, x*y^2+x^2, x^2*y-2*y^2+x, x^3-3*x*y]:

mon:=proc(p) local t; coeffs(p,indets(p),t); t end:
mon ~ (G);

convert(%,set); # remove duplicates

## subs...

createModule2 := proc(A::Matrix(square))
local dim;
dim := RowDimension(A);
module()
export det;
det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);
det :=subs('dim'=dim, eval(det));   ###
end module
end proc;

Try with

Digits:=30;

## 3<4...

Your polynomial ferrai contains 3 symmetric sums as coefficients. By knowing these, you can't hope to recover all 4 fundamental symmetric sums (which are in fact c1,...,c4)  simply because 3<4.

BTW, if you have a symmetric sum s, you can express it in terms of c1,...,c4 using

simplify(s, [x1+x2+x3+x4=c1,...,x1*x2*x3*x4=c4]);

## i=0...

pochammer function appears only because the result must be also valid for i=0.

(For integer i>0, pochhammer(1-i, i)=0.)

## analogy...

How would you answer the following scalar version?

Given two numbers a and b, calculate the number c in terms of a and b.

## A more general approach...

s:=sum((sum(f[t](x[i,k],a[k]),k=1..n)-y[i, t])*(sum(f[t](x[i, k], a[k]),k=1..n)-y[i,t]),i=1..m);

# diff(s, a[p]) = ?

s11:=op([1,1],s); # identify the sum containing a[p]
s11new:=subs([(k=1..n) = (k=1..p-1)], s11) +
subs([(k=1..n) = (k=p+1..n)], s11) +
subs([(k=1..n) = (k=p..p)], s11):
snew:=subs(s11=s11new,s):
diff(snew,a[p]);

## code...

I have attached a worksheet.
An element of the algebra is represented as Vector(v1,...,vn,v0); also included a display procedure (optional)

e[i] &x e[j]  = 0 if not defined otherwise.

I have modified f because the indices in your definition exceed n; you also have provided two incompatible variants.

algebra-eiej-code-1.mw  (edit: updated)

## Basis...

You want Groebner[Basis], not LinearAlgebra[Basis] ! So, use:

G := Groebner[Basis](K, 'tord', degrevlex(r,u,v));

## list/Vector/proc...

It is not very clear what are you trying to obtain.

Mathematically a polynomial map is a vector function (a,b,c) |--> (r,u,v) having polynomial components.

In Maple you may represent it by a list [r,u,v] or vector Vector([r,u,v]) provided that the indeterminates (i.e. variables) are a,b,c.

Or, you may consider the procedures:
p:=unapply( [r,u,v], a,b,c );
or
p:=unapply( Vector([r,u,v]), a,b,c );

## packages...

The Maple Optimization package accepts Boolean variables for linear problems.
See ?Optimization and ?Optimization,Options help pages.

For nonlinear problems there is the DirectSearch package:

http://www.maplesoft.com/applications/view.aspx?SID=101333

## It can...

Maple can find them, but must be asked politely! :-)

X := (x, k)-> int(cos(s^k), s = 0 .. x):

X(infinity,k) assuming k>1;

X(infinity,5/2); evalf(%);

0.7178115070

Similarly for Y.

## Lagrange...

lagrange:=proc(f, g::list, vars::list, lambdas::list)
local L;
if nops(g)<>nops(lambdas) then error "lambdas and g must agree" fi;
solve( {seq( diff(L,u),u=vars),op(g)},{op(vars),op(lambdas)})
end:

lagrange(a*b,[z-a-b],[a,b],[p]);

lagrange(a[2]*b[2], [z-a[2]-b[2]],[a[2],b[2]], [lambda]);

lagrange(x^2+y+z,[x-2*y-3*z, x+4*y+z-2 ],[x,y,z],[a,b]);

Edit.
solve({eq1,eq2,eq3},{x,y,lambda});
and it will work.

## fper...

f:=cos(t),sin(t);  # on [0,Pi]
T:=Pi; dx:=2;
fper:=cos(T*frac(t/T))+dx*floor(t/T),sin(T*frac(t/T));  # for t>=0 only

plot( [fper, t=0..4*T],scaling=constrained);

## x+y <> 0...

You can simply add p[i]+p[j] <> 0 etc in the system. E.g.

expand((x+y)*x*(x+y+5)):
solve({%, x+y<>0, x<>0}, {x,y});

 First 102 103 104 105 106 107 108 Page 104 of 111
﻿