Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Given a polynomial, e.g. 3*x^2 + a*x*y + b*y^2, is there some built-in function which can give me a list of monomials, with each monomial represented as [coefficient, [exponent_of_x, exponent_of_y]] ? The above polynomial would turn into something like [ [3, [2,0]], [a, [1,1]], [b, [0,2]] ].

It's not difficult to write this procedure from scratch. The procedure would require two arguments: (1) the polynomial itself, (2) which symbols are considered variables (in the above case, x and y). The remaining variables, a and b, would then be treated as constants that appear as coefficients. But I'm wondering if there's a built-in function I can just use.

Hi everyone, Could you help me to get a general solution to the following ode? Here rho and z are constants.

ODE := cos(g(t))^2*(diff(T(t), t, t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(g(t), t, t))*rho+2*(cos(g(t))^2)(diff(g(t), t))^2*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

cos(g(t))^2*(diff(diff(T(t), t), t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho+2*(cos(g(t)))(diff(g(t), t))^4*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

(1)

dsolve(ODE, T(t))

T(t) = DESol({-(-Omega^2*cos(g(t))^z+8*rho^2*(diff(g(t), t))^2*sin(g(t))^2-2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho-2*(cos(g(t)))(diff(g(t), t))^4*rho-2*rho*(diff(g(t), t))^2*sin(g(t))^2)*_Y(t)/cos(g(t))^2-3*rho*(diff(g(t), t))*sin(g(t))*(diff(_Y(t), t))/cos(g(t))+diff(diff(_Y(t), t), t)}, {_Y(t)})

(2)

NULL


Thanks.

Download ode_rlmt.mw

Does maple software support Benders decomposition technique for Mixed Integer Linear Programming? If no, how we can implement it in maple? Any suggestions. 

Thank you

x := [0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4]

y := [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4]
z := [0, 0, 0, 0, 0, 0, .689376362, 1.378752724, 2.068129087, 2.757505449, 0, 1.02920355, 2.0584071, 3.087610649, 4.116814199, 0, 1.216469264, 2.432938529, 3.649407793, 4.865877057, 0, 1.325720912, 2.651441823, 3.977162735, 5.302883646]

How to plot the contour plot for the given data

Dear Users! Hope everyone is fine here. I have some points x_0,x_1,..,x_N and corresponding to these number have values y_0, _1, ..., y_N as,

restart
a := 1; b := 5; h := 1; f := 1/x; N := (b-a)/h;
for i from 0 while i <= N do x[i] := h*i+a; y[i] := eval(f, x = x[i]) end do;

Now I want to develope the following difference table using the values of y_0, y_1, ..., y_N as,

where difference column generated using the following concept

Please help me in this regard. Thanks in advance

I have been studying the solutions of the equation below using Maple and Mathematica. 

Here, I want to express the solutions for k. In Maple, the solution is imaginary. As one may see below.

On the other hand, if one solves that  exact equation with Mathematica, then one has real solutions. That is,

Based on the above, I have a few questions:

1. What is the correct solution for the first equation above? That is, are the solutions real or complex?

2. How may I obtain the real solutions, k_{1,2}, above using Maple?

Attached below you may find my mwfile with my doubts.

Mydoubts.mw

Thanks in advance.

hello, 

i want to export Export plots to jpg, 

im using the following command (example of the idea) : 

>for i from 1 to 5 do 

fig:=plot(x*i,x=0..10):
Export("Fig.jpg", plot(sin), base = homedir):
od: 

how do i make the export aumaticly change the name of the distany file - like Fig[i] or somthing so it wont run it over each iteration. 
writing Fig[i] in the command does not work. 

thank you in advance 

hello 
i have a Table in my worksheet; 

it countains 3 coulmns, and each coulmns cointains a loop that requires about a day to evaluate. 

is there a way to excute the 3 coulmns in parallel, there is no interaction between them and i cant seprete them into different worksheets.

thanks in advance.

Anyone experience a delay in typing as the screen fills with text/math etc.?

I'm using Maple 2021 and as the space is filled typing slows. I can finish typing and watch the last 4 keys enter on the screen.

Since approximately a week ago, probably after some Ubuntu update, the xmaple 2021.2 interface started to crash after some simple commands, without any error message or log. I tried to run with java (open-jdk) 11 and 8, and I had the same problem. I still have an old 2017.3 version, and it works perfectly. The problem only affects the new Maple release. 

Is there some bug report? What can I do?


Hi !

Looks like there is a bug in the inert "Diff" command.

I have Maple 2018 on Windows 10 ,64 bits.

Does Maple consider Diff(f(x),x) to be equal to Diff(f(x),[x]) ?

It should be the same.

Maple displays  that it is equal but keeps in memory something else.

In the attached file, I give a very simple example.

I don't like to say this but my old version of Maple V Release V (1997) is more consistent i.e.

this version shows it's different and  keeps in memory that difference.

diff-problem.mw

 

I wonder if newer versions have this problem ?


Best regards !

When using the built-in fsolve function to find the roots of a polynomial, how does exponentiation occur? For example, x3 is found​​​​​​first, and then to find x4, will he start again from the beginning, that is, x*x*x*x, or will he take the value of x3​​​​​​ and multiply by x? The teacher is interested in finding out this, but I don't know how to find out myself. 

I have been performing symbolic solutions on netlists using Syrup, and then performing worst-case analysis on the result using the ranges of all the variables.

I would like to add ifelse and/or piecewise linear expressions to my Syrup models. Using symbolic analysis, I can get multiple sets of results from Syrup based on the conditional statements. I'm thinking that if I could put Syrup solve inside my worst case analysis procedure and submit numeric values to Syrup, that the conditional expressions could be solved for.

I think there is something similar that can be done with Dynamic Systems.

Does this request make sense? Is it possible?

The expression

f := arctan(y, x)+arctan(-y, x)

arctan(y, x)+arctan(-y, x)

(1)

simplifies to zero in the real range if y=0 is excluded.

x < 0, y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

0, true

(2)

x >= 0, y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

0, true

(3)

Combining the above assumptions as attempted bellow does not simplify to zero

x::real, y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(4)

`or`(x < 0, x >= 0), y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(5)

Or(x < 0, x >= 0), y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(6)

`and`(-infinity <= x, x <= infinity), y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(7)

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

(8)

 

 

Download assuming_and_differently_combined_inequalities.mw

I'm a newbie to maple, I want to get a group that meeting the criteria with this code:

with(GroupTheory);
G := SymmetricGroup(6);

do

H := Subgroup({RandomElement(G),RandomElement(G)}, G);

C := Core(H, G);

until is(GroupOrder(C) <> 1) and is(GroupOrder(C) <> GroupOrder(H));
H;
C;

But it's seem I cannot construct subgroup. so I adjust it into:

with(GroupTheory);
G := SymmetricGroup(6);

do

H := Subgroup({[[rand(1 .. 6)]], [[rand(1 .. 6), rand(1 .. 6)], [rand(1 .. 6), rand(1 .. 6)]]}, G);

C := Core(H, G);

until is(GroupOrder(C) <> 1) and is(GroupOrder(C) <> GroupOrder(H));
H;
C;

However, it is clear that random numbers do not always satisfy the rules of permutation. So how can I use the loop to generate a random subgroup that satisfies the condition?

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