Items tagged with polynomial

Silly, but what command will move the one first under the sqrt here...

a:=sqrt(1+x^2)  # maple moves the x^2 in front
                           sqrt(x^2+1)

What maple command will move the 1 in front of the x^2 under the square root?

Hi there,

I have a big polynomial expression involving powers of x and y, that comes from expanding a function in powers of x and y in polynomial form (I use series(convert(series(a,x=0,10),polynom),y=0,10) ). I want to multiply each of the terms by the factorial of the power of x and y it has. How can I do this?
I tried using Physics[Coefficient](a,x) but I get the error: it cannot compute the degree of the expression.
I tried using a double for with a double coeff to get each of the coefficients and the maybe be able to multiply them but I get the error "unable to compute coeff".

Is it because as expanding the series I have the term +O(y^11) that it cannot compute it?


[Edit]
I managed to substitute the x terms using subs(x^3=3!*x^3,x^5=5!*x^5,a). Obviously this is not very efficient since I need to write the substitution for each term, and since the ploynom is grouped in powers of y, this does not work for y (neither does algusbs).
 

[Edit 2]:

an example of it would be:
 

restart; z:=1/2*log((1+y+x)/(1+y-x)): a:=diff(z,x)*h: i:=int(series(convert(series(a,x=0,12),polynom),y=0,12),x);
with result 
i := -(1/6)*x^3-(1/8)*x^5-(11/112)*x^7-(31/384)*x^9-(193/2816)*x^11+(x+(2/3)*x^3+(7/10)*x^5+(41/56)*x^7+(109/144)*x^9+(1093/1408)*x^11)*y

And I want the coefficients for each x and y power to be multiplied by the factorial of those powers.

 

Thank you!

I am interested in the behaviour of a system of equations close to the origin- these equations are quite long, and there are a lot of them so i would like to have commands that i can use to assume products of variables are zero. 

here are the first two polynomials:


alpha*k[a1]*B[1]^2+(-alpha*k[a1]-alpha*k[a2])*B[2]*B[1]+2*alpha*k[a1]*B[1]*B[11]+alpha*k[a1]*B[12]*B[1]+2*alpha*k[a1]*B[1]*B[211]+alpha*k[a1]*B[221]*B[1]+2*alpha*k[a1]*B[1]*B[2211]+(-alpha*R[b]*k[a1]-k[d1])*B[1]+2*B[11]*k[d1]+B[12]*k[d2]+k[d1]*B[211]+k[d2]*B[221]

(-alpha*k[a1]-alpha*k[a2])*B[2]*B[1]+alpha*k[a2]*B[2]^2+2*alpha*k[a2]*B[2]*B[22]+alpha*B[2]*B[12]*k[a2]+alpha*k[a2]*B[2]*B[211]+2*alpha*k[a2]*B[2]*B[221]+2*alpha*k[a2]*B[2]*B[2211]+(-alpha*R[b]*k[a2]-k[d2])*B[2]+B[12]*k[d1]+2*B[22]*k[d2]+k[d1]*B[211]+k[d2]*B[221]

the varables are the terms with B and a subsript and everything else is a parameter.

My intuition was to use coeffs but I couldn't get anything helpful

Already searched and browsed multiple different threads and still cannot find a solution.

Apologizing the noob nature of this question.

 

 

In this code below, Why is the factor command not working?

f := a^2+x^2-2*ax;

a^2+x^2-2*ax

(1)

factor(f);

a^2+x^2-2*ax

(2)

expand((x-a)*(x-a));

a^2-2*a*x+x^2

(3)

``

NULL

NULL


Download factor_polynomial_2_multivariable.mwfactor_polynomial_2_multivariable.mw

 

Dear All,

 

I am a new Maple user and I am still unaware of a lots of fancy features of Maple. I have a problem of simultaneous fitting polynomials. I wish that I could have help from you. Say, we have two polynomials of two variables,

f1(x,y)=a1+a2*x+a3*y+(a4+a5)*x2+(a4-a5)*y2;

f2(x,y)=b1+b2*x+b3*y+(a4-a5)*x2+(a4+a5)*y2.

Note that a4 and a5 are shared by the two polynomials. I would like to fit the two polynomials against their respective data set. Is there anyway I can do it using Maple? Any of your help is highly appreciated!

 

Best regards,

 

Toby

updated:

with(CurveFitting);
f := PolynomialInterpolation([[0, x0],[1, x1],[2, x2],[3, x3],[4, x4]], x);
f2 := solve(f=y,x);
area1 := int(f, x=0..1);
with(student):
area2 := trapezoid(f2[1], x = 0..1);
with(CurveFitting);
f := PolynomialInterpolation([[0, x0],[1, x1],[2, x2],[3, x3]], x);
f2 := solve(f=y,x);
area1 := int(f, x=0..1);
with(student):
area2 := trapezoid(f2[1], x = 0..1);

 

i use 5 points trapezoid got RootOf  in result,

only 4 points is acceptable

 

when i try 5 points, there is no problem, but when more points such as

30 points, got RootOf for c sharp code

 

moreover, i got a problem when i copy the area1 result into 

visual studio c# code, it has error Integral Constant is too large

 

with(CurveFitting);
f := PolynomialInterpolation([[0, x0],[1, x1],[2, x2],[3, x3],[4, x4],[5, x5],[6, x6],[7, x7],[8, x8],[9, x9],[10, x10],[11, x11],[12, x12],[13, x13],[14, x14],[15, x15],[16, x16],[17, x17],[18, x18],[19, x19],[20, x20],[21, x21],[22, x22],[23, x23],[24, x24],[25, x25],[26, x26],[27, x27],[28, x28],[29, x29]], x);
f2 := solve(f=y,x);
area1 := int(f, y=0..1);
with(student):
area2 := trapezoid(f2[1], x = 0..1);
with(CodeGeneration):
CSharp(area1, resultname = "area1");
CSharp(area2, resultname = "area2");

i find area2 has

Warning, the function names {RootOf, Sum} are not recognized in the target language
Warning, precedence for Range unspecified
Warning, cannot translate range
area2 = RootOf((System.Double) (19276689540529530246975515949293568 * x3 - 2626509155780373903082144116707328 * x2 + 239680950855919251544490932629504 * x1 -

In the process of simplification I have the following multi-variable polynomial:

y:=-8*C*d1^2*(-2+d1)*(-1+d1)^3*r*L*R^3+(d1^4*(-2+d1)^2*L^2-4*C*(-2+d1)*(4*d1^3-13*d1^2+16*d1-8)*(-1+d1)^2*r^2*L+4*C^2*(-2+d1)^2*(-1+d1)^4*r^4)*R^2+(2*d1^4*(-2+d1)^2*r*L^2-2*C*(-2+d1)*(5*d1^3-24*d1^2+32*d1-16)*(-1+d1)^2*r^3*L+4*C^2*(-2+d1)^2*(-1+d1)^4*r^5)*R+d1^4*(-2+d1)^2*r^2*L^2-2*C*(-2+d1)*(d1^3-6*d1^2+8*d1-4)*(-1+d1)^2*r^4*L+C^2*(-2+d1)^2*(-1+d1)^4*r^6

This polynomial contains several (-2+d1), (-1+d1) terms with varying powers in each term. My question here is how to take out common terms and then form compact multi-variable polynomial (without having physical inspection).

 

Thank you for your help.

 

MVC

 

 

 

Dear Colleagues,

 

I am not sure if there exist a simple way to handle the issues I am facing. I am trying to obtain numeric roots for a polynomial f(x,a). I know for sure that there can be many roots depending on the value of parameter a. However, I cannot say for sure how many roots are possible for each value of parameter a. Some of these roots are complex numbers. Also, I need to choose only those roots that have following properties:

1. They are real.

2. f(x*,a) i.e., function value at a root is positive. 

 

How do I solve f(x,a)=0 to store all roots in a set? Furthermore, how do I select and print roots that have the properties mentioned above? Is there a way to do filtering of a set specifying properties of the members of the set? Please suggest. Your help is highly appreciated.

 

Regards,

 

Omkar

 

 

how to count how many terms or items are equal when compare two lists of polynomial terms when length of two list may not be equal

If an expression is of the form x^3 + x^2 + x + z + y^3 + y^2 + y + xy=0 ,

How to represent it in the following form,

           x^3 + y^3 + x^2 + y^2 + xy + x + y + z=0 ?

 Hi all,

 Is there anyone who could help me with this error? I am sure there is at least one solution for the equation.

 Thanks

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/EQ.mw .

Download EQ.mw

I am trying to simplify the following polynomial.

> R1 := collect(((3*d1^2-2*d1-d1^3)*r-3*d1^2+d1^3+2*d1)*R^3+((-6*d1+7*d1^2-d1^3)*r^2+(d1-d1^3-3*d1^2+2)*r)*R^2+((-6*d1+6*d1^2)*r^3+(-4*d1^3+6-7*d1+2*d1^2)*r^2)*R+(2*d1^2-2*d1)*r^4+(-2*d1^2-4*d1+4)*r^3,[R,r,d],recursive);

 

With the "collect along with rucursive" unable to give compact version. In the above polynomial most of the bracket terms will have factors([3*d1^2-2*d1-d1^3]=-d1*(d1-1)*(d1-2)), but the collect command unable give these factors, doing such manual simplification in bigger polynomial case is complex. Is there any way to represent above polynomial in compact form.

 

Thanking you in advance.

 

MVC                       

 

 

In my study, I often need to verify that two operator is symmetric i.e. [P,Q]=PQ-QP=0, where A and D are operator polynomial such like  D2+4u+uxD-1 multiply with D3+uD+ux,where D is differential operator.

I tried to use the Ore_package which can easily deal with the operator polynomial without integral(i.e. D-1 term), so in my case , how to deal with operator with both differential and integral?

I have the following multi-variable polynomial:

F:=(d^4-2)*C+(7*d^3-3*d)*C^2-(10*d^4-4*d)*L^2+(d-d^2)*L^3+(R+z^2)*x1+(10*d^3-4*d)*L;

Here my question is how to (i) generate "F" in the following form-> F:=k1*C+k2*L+k3*x1; (ii) How to find the coeficient terms of  "C", "L", "x1".

 

Thanking you in advance.

 

MVC

I am having 26th degree polynomial univariate equation , I used Isolate to get the roots. but I am getting some extra roots which are not true they I even tried to substitute those roots in original equation then I got non zero answer instead of getting nearly zero answer.How is it possible??

 

equation looks like:

-12116320194738194778134937600000000*t^26+167589596741213731838990745600000000*t^24+1058345691529498270472972795904000000*t^22-4276605572538658673086219419648000000*t^20-23240154739806540070988490473472000000*t^18-5442849111209103187871341215744000000*t^16+49009931453396028716875310432256000000*t^14+74247033158233643322704589225984000000*t^12-2762178990802317464801412907008000000*t^10-25947900993773120244883450232832000000*t^8-7468990043547273070742668836864000000*t^6-567730116675454293925108383744000000*t^4+3703566799705707258760396800000000*t^2-4742330812072533924249600000000

Solutions i got:

[t = -4.162501845, t = -2.295186769, t = -1.300314688, t = -.8048430445, t = -0.6596008501e-1, t = -0.4212510777e-1, t = 0.4212510777e-1, t = 0.6596008501e-1, t = .8048430445, t = 1.300314688, t = 2.295186769, t = 4.162501845]

t=4.162501845 give me non zero answer when I substitute it in the equation given above:

I got this answer: 4.750212083*10^39

 

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