Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

If I set

B:=[1,2^(1/3),2^(2/3),I*sqrt(3),I*sqrt(3)*2^(1/3),I*sqrt(3)*2^(2/3)];

and then let

g:=B[2]+B[4];

I would like to be able to solve for g^2 in terms of the (basis) B, i.e.

solve(expand(g^2)=c[1]*B[1]+c[2]*B[2]+c[3]*B[3]+c[4]*B[4]+c[5]*B[5]+c[6]*B[6],{c[1],c[2],c[3],c[4],c[5],c[6]});

However, Maple does not seem to be able to recognize g^2 as a linear combination of the elements in the set B, in particular that g^2 = -3*B[1] + B[3] + 2*B[5]

A parallel question would be whether one could, for example, do something like this:

coeff(expand(g^2),2^(2/3))

but Maple does not compute coeffiencts except with respect to indeterminates.

Does anyone have an idea how to do such a computation? Thanks.

(The set B is a basis of the field extension of Q given by adjoining 2^(1/3) and sqrt(-3) and I'm trying to find a so-called 'primitive element' for this field extension.)

 

EDİT:
I wrote a procedure in order to add the legends inside plots as follows:

restart:
newlegend:=proc(f::algebraic,g::algebraic,x_left,x_right)
local A,B,location,y_min,y_max,L1,L2,rect,T,F,G:

y_min:=min(minimize(f,x=x_left..x_right),minimize(g,x=x_left..x_right));
y_max:=max(maximize(f,x=x_left..x_right),maximize(g,x=x_left..x_right));
F:=unapply(f,x):
G:=unapply(g,x):
L1, L2:=plottools:-line([x_left,0.9*y_max],[x_left+abs(x_right-x_left)/15,0.9*y_max],color=red), plottools:-line([x_left,0.7*y_max],[x_left+abs(x_right-x_left)/15,0.7*y_max],color=blue):
rect:=plottools:-rectangle([x_left,y_max-abs(y_max-y_min)/3],[x_left+abs(x_left+x_right)/4,y_max],color=cyan);
T:=plots:-textplot([[x_left+abs(x_right-x_left)/9,0.9*y_max,f],[abs(x_left+x_right)/9,0.7*y_max,g]]):
A:=plot(F(x), x=x_left..x_right, style=line, color=red   ):
B:=plot(G(x), x=x_left..x_right, style=line,  color=blue  ):

plots:-display(A, B, L1, L2, T,rect,  scaling=constrained, size=[800,300],axes=boxed);
end proc:
newlegend(sin(x),cos(x),0,2*3.14)

 

Question 1: The lines behind the cyan rectangle seem. How to make the rectangle opaque? 

Question 2:  Could you help me improving the procedure? Because I have bad results for some functions. 

For example;

newlegend(exp(x),x,0,3)

Some Suggestions:

  • If we add an option to change the location of the legends like 'northeast' or 'southwest' etc, it will be a really good procedure.
  • If we add an option to remove the rectangular like "rectangular=off", it will be great.

If you share your valuable ideas and comments, I will be very glad. 

I am trying to rearrange the elements of an equation by the absolute value of their coefficients. eg -3y^2 x+2x z^2+6z^2 to

2x z^2 -3y^2 +6z^2 

 

Download Rearange_test.mwRearange_test.mw

test1_03.mw

The solution I'm getting here for v(y), doesn't satisfy my original two equations. Like for example if I choose u(y)=y, for easy check it can be seen that my de2 equation doesn't satisfy that value.

Can anyone help me out?

Hi
when I use this package, maple makes error like bellow. what is the problem ? thank u

Hi,


I was applying the Grip Map to the procedure LArip. It apparently finished in less than 5 seconds. But when I wanted to display the results as an Array, this step required minutes. How can this time be reduced? Here is a piece of the code:

n := 8;
r := 2^n;
M := Vector(r, randperm(r) + [-seq(1, i = 1 .. r)], datatype = integer[4]);

LArip := proc(k::integer, r::integer, M::Vector(datatype = integer[4]))
local N, j, t, i, A;
N := Vector(r, 0); A := Vector(r, 0);
i := k - 1;
for j from 0 to r - 1 do
for t from 0 to r - 1 do
N[t + 1] := Occurrences(1, Split(Xor(And(t, i), And(M[t + 1], j)))) mod 2;
end do;
A[j + 1] := Occurrences(0, convert(N[], list));
end do;
return convert(A, list);
end proc;

infolevel[Grid:-Map] := 3;
rt := time[real]();
Bb := Grid:-Map(k -> LArip(k, r, M), [$ (1 .. r)]);
GridMapTime := time[real]() - rt;
 

The worksheet is here:

Magma_GridMap.mw

Thank you for your help.

Hey!
I am using the solve function and I get the following form of the result :

rootsq0 := {z = 9.096986124+3.141592654*I}, {z = 1.138376998+3.141592654*I}, {z = .3074241220+3.141592654*I}, {z = .5854971300+3.141592654*I}, {z = -2.519351300+3.141592654*I}, {z = -5.138371980+3.141592654*I}, {z = -1.759344122+3.141592654*I}, {z = -0.9698634104e-1+3.141592654*I}

I want to convert rootsq0 into a list [9.096986124+3.141592654*I, 1.138376998+3.141592654*I, ...]. So, I would like to remove {} and z=. Any suggestions are welcome! :)

restart;
eq := 61*x^2 + 1 = y^2;
sols := (isolve(eq) assuming (x::posint, y::posint)):
for sol in sols do
  print(subs(_Z1 = 1, sol));
end do;

isolve returns the solution in terms of _Z1, indicating there may be infinite number of solutions?
I think {x = 226153980, y = 1766319049} is the only solution with x::posint, y::posint.

How do I restrict this to only positive integers in the solution?

If you could assist; I am trying to set something like an asymptote or upper limit such that my plot below approaches asymptotically (below y =1 ) from negative infinity:

Download Plotting.mw

Why Float(undefined) appears in calculation integrals

3333.mw

I see this question at here
https://mathematica.stackexchange.com/questions/239874/how-to-reduce-timing-to-find-the-integer-numbers-a-b-c-d-e-f-g-h-k-m-of

How to solve this problem by Maple?

command completion (when hitting the ESC key) in Maple could be made more useful. It does not seem to support type names for example.

What shows up on the command completion window are  possible commands that start with that partial text.

It does not list other known names by Maple, such as type names and other options.

This makes it hard to use in many places, where one have to remember type names exactly instead of the system helping them by listing all possible type names that start with that string.

Is there a way around this? Will Maple next version support smarter and more complete command completion menu?

 

 

dear all

I would like to display the error ( tab_err) and plot it. 
The code run without any mistakes but there is no table of error dispalyed and can then be plotted 


integ_R.mw

Thank you for any help 

 

How to plot Complex vales in 2D? 

Z be complex.

rho := 1/4; mu := 1/4; E := sum(Z^k/GAMMA(k*rho+mu), k = 0 .. 5)

5 6 7 8 9 10 11 Last Page 7 of 1791