Maple Questions and Posts

These are Posts and Questions associated with the product, Maple
 Let d an integer ">=5 " and 
                    "lambda  in ]-(1)/(2),-(1)/(d+1)[. "
Put
> gamma[s+1,d]=((s+1)[d]((d+1)lambda+s))/(2^(d+1)(lambda+s)[d+1]).;
We need to show that
> gamma[s+1,d]>=-(1)/(2^(s+1)),;
for 
> s=1,...,[(d+1)/(2)].;
                                   
 a[k] designates the pochhammer symbol.

Thanks a lot 

Would anybody tell me that what does it mean

Warning, A new binding for the name `pdetest` has been created. The global instance of this name is still accessible using the :- prefix, :-`pdetest`.  See ?protect for details. pdetest

Does it mean that the solution satisfies the main equation? because doing manual calculations doesn't satisfy.

Here is my file test_3.mw

I am currently struggling with a piecewise functions. Seeing as this function is defined over a large number of breakpoints, it would seem that Maple is unable to execute a certain integration (over a particular interval). Since the first derivatives match up at all breakpoints and the piecewise function looks perfectly smooth to my eyes, I figured that I might obtain a sensible result approximating the function by means of a polynomial and integrating based on the resulting approximation. When I try to use minimax from numapprox, however, I just receive an error message to the effect that:

Error, (in evalf/int/CreateProc) function does not evaluate to numeric

I'd very much appreciate it if anyone had any pointers on how I might find a reasonably precise (not necessarily polynomial) approximation for a seemingly smooth piecewise function with a large number of breakpoints.

Many thanks.

Edit: Please find attached my worksheet: worksheet.mw. My goal is to approximate the function Z over the interval 5/3 to 5 by something that is not defined in a piecewise manner.

 

 

Dear all

I have a matrix defined using loop 

How, can I print the value of the  matrix

Print_vaue_G.mw

thank you

Dear all

I have a table with entries obtained using maple code, how can I copy this table to powepoint as image 

many thanks

 

How do we replace D^i by diff(y(x),x$i) in did:=D^14+23*D^13+144*D^12
in Maple 13?

Thank you!

mapleatha

 

I have the expression:

This works (Ans. 144):

coeff(144*D^10,D,op(2,op(2,144*D^10)));

This works (Ans. 144):

coeff(op(3,did),D,op(2,op(2,op(3,did))));

Why doesn't this work?

eval(coeff(op(i,did),D,op(2,op(2,op(i,did)))),i=3);

Why doesn't this work?

subs(i=3,coeff(op(i,did),D,op(2,op(2,op(i,did)))));

I need those "generic" substituions for certain loops that I am making.

Thank you!

mapleatha

 

 

sometimes I have a need to do an assignment inside  operator call `if`(......) . but it is not possible it seems to do this in Maple.

This happens when I am using `if`(...) inside cat() to build a long string, and  depending on some condition, different string is build.  

This works fine in general, until I need to assign new value to a variable at the same time as I am building the string.

An example will make it more clear. Instead of the following

str:="A";
x:=10;

str:=cat(str,`if`(x=10," it was 10","it was not 10"));

if x=10 then
   x:=11;
else
   x:=9;
fi;                         

I'd like to do something like this (which does not work in Maple)

str:="A";
x:=10;
str:=cat(str,`if`(x=10,  x:=11;" it was 10" , x:=9; "it was not 10"))

Tried assign() also. Does not work.  I tried different variation on the above, none works. 

In Mathematica, the above is possible. But this is using standard `If`, which can be inlined

Is it possible to do something like this in Maple? 

The reason is that I do not have to do the checking twice: once to build the string, and once after that is done, in order to do the assignment. It is better if both are done in one place. The above is just an example. I could have more than one `if` inside as I am building the long string. 

Btw, how does one look up help on the operator if and not the statement if ? the help page for if does not talk about it or give any examples.

Maple 2020.2

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.

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