Items tagged with polynomial polynomial Tagged Items Feed

Hi all,

I have an expression of the form Sum(a[l]*x^l,l=0..n).

Is there a shorter way to obtain let's say the 5 lowest orders than add(coeff(expression,x,l)*x^l,l=0..4) ?

 

Cheers

NOh



This is my code for the Extended Euclidean Algorthim which should return integer l, polynomials pi,ri,si,ti for 0<=i<=l+1. And polynomial qi for 1<=i<=l such that si(f)+ti(g) = ri and sl(f)+tl(g)=rl=GCD(f,g).
The problem is, I keep getting division by zero. Also it evaluates pi = lcoeff(ri-1 - qiri) to be zero, everytime. Even when I remove this it still says there is a division of zero, which must be coming from qi:=quo(ri-1,ri, x); however I do not know why considering the requirements for the loop are that r[i] not equal zero. I really could use a fresh pair of eyes to see what I've done wrong. Any help would be greatly appreciated!!

a+a*c

a+a*b

a+b+c

assume system of polynomials are above, how to test whether inverse exist

and find inverse of them

 

how to convert legendre polynomials into system of polynomials of 3 variables for drawing sphere with this ideal?

is possible to draw sphere from system of monomial polynomials?

Hi all.

In the following program, i have normalized bernstein polynomials using gram- schmidt orthogonalization process and want to hybrid them with block pulse functions so that i have:

 

why the program is wrong?? where of it doesn't work properly?

please guide me

best wishes

OHB.mws

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

a := [x+1, x+2, x+3, x+4];

which command can remove polynomial x+2 from the list a;

to become

a := [x+1, x+3, x+4];

how to convert between (system of polynomials or module) and rational function which is a four dimensional space

#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.

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