Items tagged with polynomial polynomial Tagged Items Feed

#page 320 and 322 of book Singular introduction to commutative algebra

it return too many recursion 

 

hilbertseries([a+a*c, a+a*b, a+b+c]);

eq1 := a+a*c;

eq2 := a+a*b;

eq3 := a+b+c;

eq1a := Homogenize(eq1, h);

eq2a := Homogenize(eq2, h);

eq3a := Homogenize(eq3, h);

T3:=lexdeg([a,b,c,h]);

GB := Basis([eq1a,eq2a,eq3a], T3); #a

 

#MonomialHilbertPoincare(LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3));

 

with(PolynomialIdeals):

MonomialHilbertPoincare := proc (I3)

#I3:=[LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3)];

T2:=lexdeg([h,c,b,a]);

varj := [h,c,b,a];

I2 := InterReduce(I3, T2);

s := nops(I2);

if I2[1] = 0 then return 1 end if:

if I2[1] = 1 then return 0 end if:

if degree(I2[s]) = 1 then return (1-varj[1])^s end if:

lt := LeadingTerm(I2[s],T2);

leadexp := [degree(lt[2],h),degree(lt[2],c),degree(lt[2],b),degree(lt[2],a)];

j := 1;

for z from 1 to nops(leadexp) do

                if leadexp[j] = 0 then

                                j := j + 1;

                end if:

od:

finallist := [];

for z from 1 to nops(GB) do

                finallist := [op(finallist), GB[z]+varj[j]];

od:

quotientlist := Generators(Quotient(GB, varj[j]));

finallist2 := [];

for z from 1 to nops(quotientlist) do

                finallist2 := [op(finallist2), op(z,quotientlist)];

od:

return MonomialHilbertPoincare(finallist) + varj[1]*MonomialHilbertPoincare(finallist2);

end proc;

F:=[LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3)];

MonomialHilbertPoincare(F);

 

To motivate some ideas in my research, I've been looking at the expected number of real roots of random polynomials (and their derivatives).  In doing so I have noticed an issue/bug with fsolve and RootFinding[Isolate].  One of the polynomials I came upon was

f(x) = -32829/50000-(9277/50000)*x-(37251/20000)*x^2-(6101/6250)*x^3-(47777/20000)*x^4+(291213/50000)*x^5.

We know that f(x) has at least 1 real root and, in fact, graphing shows that f(x) has exactly 1 real root (~1.018).  However, fsolve(f) and Isolate(f) both return no real roots.  On the other hand, Isolate(f,method=RC) correctly returns the root near 1.018.  I know that fsolve's details page says "It may not return all roots for exceptionally ill-conditioned polynomials", though this system does not seem especially ill-conditioned.  Moreover, Isolate's help page says confidently "All significant digits returned by the program are correct, and unlike purely numerical methods no roots are ever lost, although repeated roots are discarded" which is clearly not the case here.  It also seems interesting that the RealSolving package used by Isolate(f,method=RS) (default method) misses the root while the RegularChains package used by Isolate(f,method=RC) correctly finds the root.

 All-in-all, I am not sure what to make of this.  Is this an issue which has been fixed in more recent incarnations of fsolve or Isolate?  Is this a persistent problem?  Is there a theoretical reason why the root is being missed, particularly for Isolate?

Any help or insight would be greatly appreciated.

Let Poly2 denote the vector space of polynomials

(with real coefficients) of degree less than 3.

Poly2 = {a1t^2+ a2 t+ a3 |a1; a2; a3 €R}

You may assume that {1,t; t^2}is a basis for Poly2.

(1) Show that L1 = {t^2 + 1; t-2 ; t + 3}and L2 = {2 t^2 + t; t^2 + 3; t}

are bases for Poly2.

(2) Let = 8t^2- 4+ 6 and = 7t^2- t + 9. Find the coordinates for

and with respect to the basis L1 and with respect to the basis L2

(3) find the coordinate change matrix P from the basis L1 to the basis L2.find P^-1

Just I answer part (1) can you help me to answer 2 and 3 

Let Poly2 denote the vector space of polynomials

(with real coefficients) of degree less than 3.

Poly2 = {a1t^2+ a2 t+ a3 |a1; a2; a3 €R}

You may assume that {1,t; t^2}is a basis for Poly2.

(1) Show that L1 = {t^2 + 1; t-2 ; t + 3}and L2 = {2 t^2 + t; t^2 + 3; t}

are bases for Poly2.

(2) Let v = 8t^2- 4t + 6 and w = 7t^2- t + 9. Find the coordinates for

v and w with respect to the basis L1 and with respect to the basis L2

cubic4.mw

I have created a multivariate polynomial with variables P1,...,P6, and would like to factor the poly in terms of (Px-Py) where x,y are combinations of 1-6 (x not equal y). I am new to Maple and have only tried the "Factor" and "Simplify" dropdown menu commands, but neither of these seem to produce anything remotely close to what I need.

Thanks

Derek

I would like to attach a maple document to refer to but dont see how to attach a document to this question.

 

Edit:

Having Uploaded the intended file, I can direct your attention to eqn (14) which is factored into (15) nicely, but when things get a little more complicated as in (45), the factored form in (46) does not contain any of the (Px-Py) forms I am looking for. Is there a way to steer the factor function toward certain forms?

Edit2:

divide.mw

As seen in this form of the problem statement (using quadratics instead of cubics), the divide function does not seem to capture the factorability. From file divide.mw (attached), eqns (19) and (24) are equivalent since the subtraction of the two produces 0 as seen in (28), however both the factor command (23) and the divide command (29) produce nothing substantive.

I tried to find the root distritubion of a polynomial? 

When p=1, q=3, the following command works.


with(plots):

eq:=u^(2*q)+1-2*K*u^(q-p);

p:=1;   q:=3;

unitcircle:=implicitplot(x^2+y^2 = 1, x = -1 .. 1, y = -1 .. 1, scaling = constrained);

animate(complexplot,[[solve(eq, u)],style = point,symbolsize=10,color="red"],frames=50,K=-1..1,background=unitcircle, scaling=constrained, trace=20 );

However, when I tried p=2, q=3, only one root was shown on the animation.  

But   "complexplot([solve(eq,u)],style=point)"      showed  6 roots anyway.

I have no idea what was wrong. 

 

 

I have a polynomial p in two variables x and y, and I want to extract all the coefficients of p. For example, let p:=x^3+2*x*y^2-2*y^2+x, and I want to obtain the coefficient vector [1,0,0,1,0,2,0,0,-2,0], where 1,0,0,1,0,2,0,0,-2,0 are respectively the coefficients of x^3, x^2, x^2*y,x,x*y,x*y^2,y^0,y,y^2,y^3. In general, let 

p(x,y)=sum(sum(c_*{i, j}*x^(n-i)*y^j, j = 0 .. i), i = 0 .. n)

=c_{0,0}x^n

+c_{1,0}x^{n-1}+c_{1,1}x^{n-1}y

+c_{2.0}x^{n-2}+c_{2,1}x^{n-2}y+c_{2,2}x^{n-2}y^2

+\dots

+c_{n,0}+c_{n,1}y+c_{n,2}y^2+\dots+c_{n,n}y^{n}.

It is possible that some coefficients c_{i,j} are equal to 0. How to obtain the coefficient vector [c_{i,j},i=0..n,j=0..i] of p(x,y)?

Thanks a lot.

I want to extract all the coefficients of a polynomial. For example, let p:=x^5-8x^3+2, and the function coeffs(p) returns 1, -8, 2. In fact, I want to obtain 1, 0, -8, 0, 0, 2. Thanks to everyone.

Hi all

Assume that we have construct new orthogonal Hybrid function of block pulse and bernstein poly nomials as follow:

and assume that we want to approximate a function as follows:

 

how can we do this with maple????Indeed we want to optimize using this hybrid functions

note that the degree of bernstein polynomials is fix or should be fixed...and

regards

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi everyone,

I have a maple program that generates a polynomial g(y)=(80y^8 + 68y^6 + 12y^4 -4y^2 -1). This polynomial has two real roots (irrational roots), call them +/- y*. My code does a sequential calculation, and often sI am left with a higher order polynomial in y that has the form h(y)= p(y)*g(y), where p(y) is also a polynomial in y. This polynomial h(y)=p(y)*g(y) is not in factored form (i.e. it would look like expand(p(y)*g(y)). Is there a way to instruct maple to recoginize that +/-y* is also a root h(y)=p(y)*g(y)? So far I've tried things like applyrule([g(y*)=0],h(y*)), but nothing seems to work (I suspect because Maple cannot recgonize that g(y) is a factor of h(y)). I am not interested in computing this numerically. I am just trying to find a way to instruct Maple to recognize symbolically that h(y*) =0.

Thanks a million for anyone who has any idea.

Best,

 

Justin

f1 := expand((a1*x^2+b1*x+c1)^n);
f2 := a1*x^2+b1*x+c1;

solve([coeff(f1, x, 4) = coeff(f2, x, 4),
coeff(f1, x, 3) = coeff(f2, x, 3),
coeff(f1, x, 2) = coeff(f2, x, 2),
coeff(f1, x, 1) = coeff(f2, x, 1),
coeff(f1, x, 0) = coeff(f2, x, 0)], [a1,b1,c1,d1]);

m := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);

m2 := Determinant(m-Matrix([[1,0,0],[0,1,0],[0,0,1]]));

1. which family of polynomials do m2 belong to?

2. how to analyze m2?

 

 

restart;

with(combinat):

symMonomial := proc(test)

h := 0;

for i from 1 to nops(test) do

                h[i] := choose(test,i);

od;

 

c := copy(test);

k := 0;

for k from 1 to nops(test) do

                c[k] := 0;

                for i from 1 to nops(h[k]) do

                                ki := 1;

                                for j from 1 to nops(h[k][i]) do

                                                ki := ki*h[k][i,j];

                                od;

                                c[k] := c[k] + ki;

                od;

od;

return c;

end proc;

 

 

sympoly := proc(test, number_of_roots)

with(combinat):

h := 0;

for i from 1 to nops(test) do

                h[i] := choose(z,i);

od;

 

c := 0;

for k from 1 to nops(test) do

                c[k] := 0;

                for i from 1 to nops(h[k]) do

                                ki := 1;

                                for j from 1 to nops(h[k][i]) do

                                                ki := ki*h[k][i,j];

                                od;

                                c[k] := c[k] + ki;

                od;

od;

poly := x^number_of_roots;

for k from 1 to number_of_roots do

                poly := poly + c[k]*x^(number_of_roots-k);

od;

end proc;

 

z := [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10];

sigma := symMonomial(z);

f := expand(sigma[1]*sigma[2]);

f := expand(sigma[1]*sigma[1]); # two lambda value are the same

f := expand(sigma[1]*sigma[1]*sigma[1]); # three lambda value are the same

 

f := expand(sigma[1]^2+2*sigma[1]*sigma[2]+sigma[2]);

f := subs(x1=3, f);

f := subs(x2=2, f);

f := subs(x3=3, f);

f := subs(x4=4, f);

f := subs(x5=5, f);

f := subs(x6=6, f);

f := subs(x7=7, f);

f := subs(x8=8, f);

f := subs(x9=9, f);

f := subs(x10=lambda, f);

evalf(solve(f, lambda));

if degree(f) = 2 then

                f := f + lambda^3;

                evalf(solve(f, lambda));

end if:

 

how to convert above f back to matrix form such as

 

m := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);

m-Matrix([[lambda,0,0],[0,lambda,0],[0,0,lambda]]);

m2 := Determinant(m-Matrix([[lambda,0,0],[0,lambda,0],[0,0,lambda]]));

 

after tested m2 can not be expressed in terms of shell like polynomial,

it seems that it is from symmetric polynomial and it is from a non-homogenous polynomial which homogenize with a lambda

 

if solve f for new eigenvalue,

can traditional eignvector method calculate new eigenvector for these new kind of eigenvalues method?

A*x = lambda*x

 

Greetings everyone. I tried to get the roots of this polynomial by using allvalues command. But I got the roots in indeces instead of the value of the roots.

what should i do?

Hi all,

I would like to set equal to zero some monomials in a polynomial. In particular those monomials in which an unknown has a certain degree. 

For example for the polynomial

poly := x^2*y+x*y*z+x*z

i would like to set equal to zero the monomials in which x has degree 1, that is x*y and x*z.

Is there a way to do it?

Thanks in advance
Manuele 

1 2 3 4 5 6 7 Last Page 1 of 9