MaplePrimes Questions

Hi, in the 'assign' command below, a certain row from matrix 'R' is assigned to the variables RA, MA .. yB. The command works well. However, I wonder if it could not be better/ shorter. So, without having to write out R [1], R [2] .. R [8].

I would be very happy if someone could advise me on this.

Here is the algorithm:

restart:with(linalg):
R:=Matrix(2,8,[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18]);


aFshear:=proc(nr,R)
assign(('RA','MA','thetaA','yA','RB','MB','thetaB','yB')
= (R[1],R[2],R[3],R[4],R[5],R[6],R[7],R[8]));
end:


aFshear(2,row(R,2));
print(thetaB);

 

 

I am solving a wave propagation problem and after lots of derivations I ended up with the following differential equations. Any idea how to decouple this system so I can get two decoupled equations of the following forms:

equation (1): = function of (Q)      Equation (2): = function of (w)

System of Equations:

When writing a post on MaplePrimes it is possible to access the source code, which allows to introduce/edit many attributes. Is it possible to observe the source of another post?

 

I want to evaluate a function of two variables at different values for these variables and collect the outputs in a matrix form. This is my best attempt at figuring it out -- using the string tools to evaluate a matrix at multiple values and spit out data. How can give each output labeled uniquely (not each line labeled A, but A,B,C... for n number of lines)? And How can I take the inner brackets out of the sequence output, to make each row of output data an array? Then I could refer to each data point individually with A[1],A[2],...,B[1],B[2],..., etc.

Please let me know if there is a better way to do this! Thank you, Jeremy

Also here is my code copied in text format for reference:

restart;
Zres:=5;
data:=[];
M:=Matrix(eval~(z*x,z=~[seq(n,n=1..Zres)]));
Array(eval~(z*x,z=~[seq(n,n=1..Zres)]));
with(LinearAlgebra):
for x from 1 to 5 by 0.5 do A:=[((op(data),seq(Column(M,n),n=1..Zres)))] od;

 

I am able to generate random polynomials with non-zero coefficents, and define sets of all the positive divisors of the leading coefficient and the constant terms. My question is this, how may I apply the rational zeros theorem to generate the set of all possible rational zeros of the polynomial. I basically need to form all the possible quotients (positive and negative) with numerator in one set and denominator in the other set, ignoring duplicates. The attached worksheet has what I've done so far.rational_zeros.mw
 

attempt := 1; while attempt > 0 do q := randpoly(x, coeffs = rand(-9 .. 9), degree = 3, dense); if nops(q) = 4 then attempt := -2 end if; attempt := attempt+1 end do; q

5*x^3+3*x^2-4*x-8

(1)

NumberTheory[Divisors](coeff(q, x, 3))

{1, 5}

(2)

NumberTheory[Divisors](coeff(q, x, 0))

{1, 2, 4, 8}

(3)

``


 

Download rational_zeros.mw

 

Hello:
I have a set like following:

               Set:={{1, 2}, {1, 3}, {1, 4}, {2, 3}};
I want to determine number of every member of set?
for example:  1 appears 3 times. 2 appears 2 times,
3 appears 2 times , 4 appears 1 time.

How to do?

 Dear ...

Let us consider $F$ be a parametric polynomial set. How can decide that $F$ contains a constant or parameters, automatically? For example, if $F=/{a*x^3-1, b*y+x, -1, c/}$ where $a, b$ and $c$ are parameters and $x$ and $y$ are variables then the output of procedure is true since of $F$ contains $c$ and also $-1$ and the outputs for $G=\{\a*x^3-1, b*y+x, x+y}$ is false. Is there any command or simple procedure for this conclusion?

I am looking forward to hearing from you

Sincerely yours.

The command eval allows to simplify a complicated expression

in a more compact form for a later output in LATEX

In the example which follows I was able to insert A and B but non C in the expression.

There is already a post on this kind of topic but I failed to understand the details.

Perhaps a Maple worksheet of answer on this topic  would be useful !

bye Lorenzo
 

restart;

expression:=exp(-b*x^c/2)*((x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c)) + c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c)))*c*WhittakerM((-c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c) + b^(-(3*c + a + 1)/(2*c))*x^(-(3*c)/2 + a/2 + 1/2)*WhittakerM((c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c)*(c + a + 1)^2)/((a + 1)*(c + a + 1)*(2*c + a + 1));

exp(-(1/2)*b*x^c)*((x^(-(3/2)*c+(1/2)*a+1/2)*(c+a+1)*b^(-(1/2)*(3*c+a+1)/c)+c*x^((1/2)*a+1/2-(1/2)*c)*b^(-(1/2)*(c+a+1)/c))*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(1)

``

(2)

expression_ABC:=eval(expression,[x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c))=A,c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c))=B,((a + 1)*(c + a + 1)*(2*c + a + 1))=C]);

exp(-(1/2)*b*x^c)*((A+B)*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(3)

 

 

 

 


 

Download maple_primes_eval.mw

 

maple does not work at all

it displays this error

Error, (in StringTools:-FormatMessage) unknown option MAPLE
 

"From the list of positive integers 1; 2; 3; 4; : : :, remove every second number, leaving
1; 3; 5; 7; 9; : : : Since 3 is the flrst surviving number above 2 that has not been used
as the \killer", we remove every 3rd number from the remaining numbers, yielding
1; 3; 7; 9; 13; 15; 19; 21; : : :"

 I have tried using this:

A:= proc(n::integer)::list;
   local B,C,j;
   B:={seq(i,i=1..n)};
   for j from 2 by 2 to n do
       C:= {B minus {B[j]}};
   end do;
 end proc;

But I'm not getting the desired result.

Hi, I am trying to get back into the habit of making maplets for the sake of uncomplicating things, I never had trouble with loading this package before, but strangely now when i enter:

 

with(Maplets[Elements]);
maplet1 := Maplet(["Hello World!", Button("OK", Shutdown())]);

 

 

I get the error message:


Error, `Elements` does not evaluate to a module

Hi

 

I've just installed Maple latest + MapleSim with the license provided by my university (I use VPN with a secure key to remotely access server license. Everything works fine, except for the context menu. It seems that the context menu module is missing! I tried uninstalling and reinstalling, but did not help.

 

I went back to the campus and checked Maple installation on computers there, and this problem is absent (context menu is working fine).

 

I can only use the context menu toolbar on the right... but this is not very convenient. 

What could be the problem? See the attached image.

 

Thanks

---------------------

 

 

``

restart

with(LinearAlgebra):

"for k from 0 to 1 do;    u(t,x):=1+x;  u[k+1](t,x):=1+x-(∫)[0]^(t)(diff(u[k],x) +2+s+x)ⅆs;  U[k+1](t,x)=u[k+1 ](t,x)-(u[k](t,0)-(1+t));  end      "

Error, invalid operator parameter name

> restart;
> with(LinearAlgebra);
> for k from 0 to 1 do;    u(t,x):=1+x;  u[k+1](t,x):=1+x-(∫)[0]^(t)(diff(u[k],x) +2+s+x)ⅆs;  U[k+1](t,x)=u[k+1 ](t,x)-(u[k](t,0)-(1+t));  end      ;

 

``

``


 

Download ITRATIVE.mw

 

 

 PLS

HOW CAN I ITERATE THIS PDE IN THE FORM OF PICARD ITERTION.

ATTACHED IS THE MAPLECODE  STARTED WITH.

How we can integrate this matrix from -1 to 1 w.r.t   't'  ?

I have a PDE system that relates four functions: sht1, svt1, Lt1, Jirt1.

I'm trying to solve this system numerically, but the pdsolve command returns an error (this error does not make sense to me).

Where am I going wrong?

Thanks!

Test.mw

First 667 668 669 670 671 672 673 Last Page 669 of 2425