Items tagged with polynomial polynomial Tagged Items Feed

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

 

Hello Mapleprime users

I am having an issue with a numerical integration calculation. I have a large(ish) polynomial integrand and need to apply two integrations which I am using the _cuhre method for. See attached the minimum working example file.

Numerical_integration_HF.mw

Firstly some simplifications are done to the integrand and then a basic for loop which calculates the integration for r from 0 to 20 in steps of 0.1. The issue occurs when the loop hits r~2.5 (on my machine, Maple 2015, i5, 16GB ram). Up to that point the calculation is steady with the following stats per point calculated:

memory used=87.59MiB, alloc change=0 bytes, cpu time=3.45s, real time=3.15s, gc time=439.16ms


Then when the calculation gets to ~2.5 it just hangs and will not calculate past it. Any ideas as to what is going on here?

Any help would be appreciated with this issue.

Thank you in advance

Yeti

 

 

Round := proc(x,n::integer:=1)
parse(sprintf(cat("%.",n,"f"),x));
end proc:

roundcoeffs1:=proc(p,x,n:=1) local t,c;
c:=map(Round, [coeffs(p,x,t)],n);
add(i, i = zip(`*`, c, [t]));
end:

ggg:=.9940413618*y^3-1.785839107*c*A*y^3-2.357517322*c*A*y^2+.375393240*c*y*B-.3575173222*c*A*y-.2082022533*c*B-0.1787591445e-1*y^2-0.1787591445e-1*y-0.5958638151e-2+.2141608926*c*A+.7917977467*c*B*y^3+2.375393240*c*B*y^2;

roundcoeffs1(ggg, [y^3, c*A*y^3, c*A*y^2, c*y*B, c*A*y, c*B, y^2, y, c*A, c*B*y^3, c*B*y^2], 4);


Error, (in sprintf) number expected for floating point format

Hello everyone,
I would like to get a symbolic result of each variable x,y and z for the following 3 nonlinear equations. Maple does not respond to the following code at all. (Not even an error report.)

restart;

eq1 := x^2+y^2+z^2-134*x+800*y-360*z+31489, 2;
eq2 := x^2+y^2+z^2-934*x+900*y-370*z+321789, 2;
eq3 := x^2+y^2+z^2-614*x+1350*y-1110*z+70048, 97;
solve({eq1, eq2, eq3}, {x, y, z});

Thanks in advance.

P.S: Afterwards my intention is to solve these equaitons numerically for different variable values, and transfer to MatLab in order to plot animations and graphs. 

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