MaplePrimes Questions

I want to manipulate polynomials in two non-commuting variables, over the field of rational numbers.  I read some of the help concerning Ore algebras, and also some of the help concerning the Physics package (where there are non-commuting variables), but unfortunately I could not understand much of what I read!  For someone who is not a Maple virtuoso, is there a simple way to work with non-commutative polynomials?  

 
I also tried the “do-it-yourself” approach, i.e., defining a non-commutative multiplication via a neutral operator &*.  This time I had some success, but I ran into problems when I tried to extract the coefficient of a given monomial in a given polynomial.  In the file  NonCommutPolynomials.mw  you can see that the Maple command “coeff” gives me the correct answer only when the degree of the monomial is strictly greater than 1.  I have no idea how to extract the coefficient of x, or of y, or how to get the constant term of the polynomial — and extracting coefficients is something I need to do!
 
Thanks!
 

Hi all,

I wanted to know if there's a tool in Maple for solving (globally) non convex optimization problems?

specifically, I need to solve the following problem:

min||Ax-b||_1 s.t. ||x||_2=1

where A is a given matrix of size nxd

b is a given vector of size nx1

x is an unkown vector of size dx1 that should be a unit vector (hence the contraint ||x||_2=1).

The closest function I found in Maple is LSSolve but this function is intended for convex problems.

I'm able to solve the problem using Yalmip in matlab.

Here's an example code in matlab+yalmip that finds the unit vector x that globally minimizes ||Ax-b||_1.

clear;
close all;
clc;

n = 10;
d = 3;

A = rand(n,d);
b = rand(n,1);
x = sdpvar(d,1);

Objective = norm(A*x-b,1);
cons = x'*x==1;
options = sdpsettings('solver','bmibnb');
sol= optimize(cons,Objective, options);

x_sol = value(x)

 

Is there a way to write a similar code in Maple?

 

Thanks

 

I'm a student and I've recently been introduced to Maple. I've been given the task to create a polynomial in Maple that goes through the following points: 

[2, 2], [12, 6], [37, 42], [49, 21], [73, 49], [91, 2]

Once the polynomial has been created, I would like to know the formula. 

What do I need to do to solve this task?

I'm looking for the specific commands etc.

Thanks.

 

Hello

If 0 occurs in the first element, I want to remove the list containing zero and the associated number.

example

p := [[[0, 5], [3, 10], [1, 20], [0, 50]], [[2, 5], [0, 10], [2, 20], [0, 50]]]

after processing:

[[[3, 10], [1, 20]], [[2, 5], [2, 20]]]

I tried in vain...

select(i -> (subs(p,p[1,i,1])>0), [$1..nops(p)]);
 

 

[[1,2],[5,7]]intersect [[1,2]]

return [1,2]

there is error when run this.

search start from a, b, c, ... for each sequence if input a,b,c,d,e,f,g,h,i,j,k

is there a function like accumulate in haskell in maple instead of using for loop?

would like to search something if found, then return the length of it searched from the starting position

when start from a search a from b to g whether is a,  if find , return the length from c to the found position,

when start from b search b from c to h whether is b,  if find , return the length from c to the found position

....

then save the length into a list

a b c d e f g

   b c d e f g h

      c d e f g h i

         d e f g h i j

            ef g h i j k

 

I am trying to calculate the pressure required for a specific bend angle produced by my actuator
But when evaluating the triple integral for calculating the moment the error of too many level recursions is recieved
Any help or advice is appreciated

Code:
a = 0.11e-1;

b = 0.25e-2;

t = 0.25e-2;

theeta = (1/180)*pi;

L = 0.17e-1;

R = L/theeta;

shearmodulus = 314000;

0.011 = 0.011 0.0025 = 0.0025 0.0025 = 0.0025 1 1 --- Pi = --- pi 180 180 0.017 = 0.017 R = 0.9740282516 314000 = 314000 eq0 := Ma = int(int((x*sin(O)+b)*x^2*(cos(O)*cos(O)), O = 0 .. (1/2)*Pi), x = 0.9e-2 .. 0.11e-1); -9 eq0 := Ma = 1.067341412 10 assign(('t', 'b', 'L', 'shearmodulus', 'theeta', 'a') = (0.25e-2, 0.25e-2, 0.17e-1, 314000, (1/180)*Pi, 0.11e-1));

eq4 := Mo1 = int(int(2*shearmodulus*(1+Beeta*theeta/L-1/(1+Beeta*theeta/L)^3)*(O+t)*L, O = 0.9e-2 .. 0.11e-1), Beeta = 0 .. b);

eq4 := Mo1 = 0.000003416445428 simplify(Mo1 = int(int(2*shearmodulus*(1+Beeta*theeta/L-1/(1+Beeta*theeta/L)^3)*(O+t)*L, O = 0.9e-2 .. 0.11e-1), Beeta = 0 .. b)); Mo1 = 0.000003416445428 simplify(Mo1 = int(int(2*shearmodulus*(1+Beeta*theeta/L-1/(1+Beeta*theeta/L)^3)*(O+t)*L, O = 0.9e-2 .. 0.11e-1), Beeta = 0 .. b));

Mo1 = 0.000003416445428 Mo2 = 2*(int(int(int(shearmodulus*((R+b+sin(Phi)*(A+tao))/R-1/((R+b+sin(Phi)*(A+tao))/R)^3)*((A+tao)^2*sin(Phi)+b*(A+tao))*L, Phi = 0 .. (1/2)*Pi), A = 0.9e-2 .. 0.11e-1), tao = 0 .. t));

Error, (in depends) too many levels of recursion eq5 := Pressure = Mo/Ma; Mo eq5 := Pressure = -- Ma 

I am not interested in the mapleprime group, so I want to delete my account in this group.

Hi, I ran the following code:

solve({a > 0, b*d*(abs(c)^2-abs(a)^2) = 0, -a*c*(abs(b)^2-abs(d)^2) = 0, -abs(b)^2*a*d+abs(d)^2*b*c = 0, abs(c)^2*a*d-abs(a)^2*b*c = 0}, {a, b, c, d})

and we can easily see that a=a, b=0, c=0, d=d, should be a solution but Maple does not give me that answer. The result is:

{b = 0, c = 0, d = 0, 0 < a}, {b = 0, c = a, d = 0, 0 < a}, {b = d, c = a, 0 < a, 0 < d}, {b = 0, c = -a, d = 0, 0 < a}, {b = -d, c = -a, 0 < a, d < 0}, {b = d, c = a, 0 < a, d < 0}, {b = -d, c = -a, 0 < a, 0 < d}

Am I missing something?

I am interested in taking a complex number and repeatedly raising it to a power and graphing the result to see if it looks cool (i think it will) to do this i wrote this program

iterativepower := proc (base, index, n)

local out, i;
out := vector(n+1, 1);

out[1] := base;

for i to n do out[i+1] := out[i]^index end do;

out;

end proc;


this can be run with:

iterativepower(2, 2, 5)


This doesn't return a vector, it returns the word out. Why is that, and how do i fix it?

Is it just me, or did the insert->subsection disappear from the menus in the latest maple??

i'm using 2018.1 on linux.

thanks

Hello everyone,
My name's Rafael, I am a master's student in Dentistry in Brazil.
I need your help.
I have several points with X, Y and Z coordinates. I would like to create a curve that represents these points in a 3-dimensional plane.
I'm new using Maple and managed to use the "plots [pointplot3d]" function to represent the points in the chart. However I have a list in excel with several point (over 100) and would like to know how to import these points to use this function.
Thank you very much


How can you get maple to evaluate i^i?

when i type in
I^I

i just get

I^I

and similarly when i raise numbers to complex powers i get results like 2^(2I+6)

 

Recently, my questions are deleted. last month I ask 3 questions but that all questions are deleted without my knowledge. yesterday also i ask one question "how to plot3d graph" that also deleted. "https://www.mapleprimes.com/questions/225618-How-To-Plot-The-3d-Graph?sq=225618". In the mapleprime, I am following the ethics and rules. 

Hi,

This more a warning to focus your attention on a specific point than a true question.
 

I submit you this test case which works in Maple 2015 and Maple 2016 but not in Maple 2018.

In a few words:

  • let X and Y two independant random variables with respective distributions Normal(mu__x, sigma__x) and  
    Normal(mu__y, sigma__y)
     
  • let Z := q -> cos(q)
     
  • You can easily verify that Maple can compute the formal expression of Mean(Z(X)) and Variance(Z(X))
    (which means that it could compute Z(X+Y) for X+Y is just another gaussian RV)
     
  • What I found is that:
    1. Mean(Z(X+Y)) returns same expressions in Maple 2015 and Maple 2016, but a different one in Maple 2018.
      Luckily the later is more readable than the former ones, and closer to the one of Mean(Z(U))  where U=X+Y is the RV of distribution Normal(mu__x+mu__y, sqrt(sigma__x^2+sigma__y^2))
      This suggest that the integration algorithm has evolved somewhere in between Maple 2016 and Maple 2018
       
    2. While Maple 2015 and Maple 2016 return an evaluated result for Variance(Z(X+Y)) Maple 2018 fails.
       

Can this "failure" be fixed by some adhoc option of Variance?
Or could it come from a "regression" in the implementation of this procedure (or of the underlying int procedure) in Maple 2018?

PS: I did not try to compute Variance(Z(X+Y)) from an explicit double integration


Stat_2015.mw

First 775 776 777 778 779 780 781 Last Page 777 of 2434