Items tagged with polynomial polynomial Tagged Items Feed

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 

Hi All. Hope all is well.

Assume that we have partitioned [0,a], into N equidistant subintervals and in each subinterval we have M sets of polynomials of arbitrary form[say bij(t)](a.e Taylor series, or Bernstein series,…)

for Example with N=4, M=3 and by Taylor series we have:

 

now we want to approximate a function, asy f(t), in this interval with following form:

 

If we have:

(Tau is a constant number)
then: How can  we find L and Z matrices using maple? Is it any way? (or other softwares?)

Regards

 

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

 

I often use RegularChains and SolveTools package. SemiAlgebraic is extremelly useful to deal with polynomial equations. However, I need some similar to Mathematica's Resolve that allows me to eliminate some variables from the description of the set. Say we have some set decribed by: for all 0<x<1, p(x,z)> 0 where p is a polynomial in x and z. Is there any Maple command that allow us to remove x and give the set only n terms of z?

x*(y+z)/x

convert any polynomial to Divide(Mult(x, Plus(y+z)), x)

 

The equation

x^7+14*x^4+35*x^3+14*x^2+7*x+88 = 0

has the unique real root

x = (1+sqrt(2))^(1/7)+(1-sqrt(2))^(1/7)-(3+2*sqrt(2))^(1/7)-(3-2*sqrt(2))^(1/7).

Here is its verification:

Is it possible to find that in Maple? I unsuccessfully tried the solve command with the explicit option.

 

 

 

Hello,

I have trouble in using the function factors. For example, I expect

factor(Pi*(t^2+1), {I});

to output

-Pi*(-t+I)*(t+I)

but instead the result is

Pi*(t^2+1)

This problem does not appear if Pi gets replaced by a general symbol:

factor(pi*(t^2+1), {I});

produces (as I expect it should)

-pi*(-t+I)*(t+I)

The problem seems to be tied to symbols representing constants, as for example replacing Pi by Catalan also results in no factorization being performed. It further seems to be tied to specifying a splitting field, because

factor(Pi*(t^2-1));

results in

Pi*(t-1)*(t+1)

Is this behaviour intended? Probably the reason is that the polynomial does not have algebraic coefficients (as it includes Pi). Indeed,

factor(Pi*(t^2-1),{});

produces the error message

Error, (in factor) expecting a polynomial over an algebraic number field

But why does this error then not appear for the call factor(Pi*(t^2-1))? If this would assume complex coefficients, it should factor using I. Considering coefficients in an algebraic number field, also the original call factor(Pi*(t^2+1), {I}); should raise an error!?

Thanks,

Erik

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