Items tagged with sort sort Tagged Items Feed

Hello i want to sort according to u derivatives (k) system.  And finding determining equations system and solving this system. Thank you very much.  

restart

with(PDEtools)

[CanonicalCoordinates, ChangeSymmetry, CharacteristicQ, CharacteristicQInvariants, ConservedCurrentTest, ConservedCurrents, ConsistencyTest, D_Dx, DeterminingPDE, Eta_k, Euler, FromJet, InfinitesimalGenerator, Infinitesimals, IntegratingFactorTest, IntegratingFactors, InvariantEquation, InvariantSolutions, InvariantTransformation, Invariants, Laplace, Library, PDEplot, PolynomialSolutions, ReducedForm, SimilaritySolutions, SimilarityTransformation, Solve, SymmetrySolutions, SymmetryTest, SymmetryTransformation, TWSolutions, ToJet, build, casesplit, charstrip, dchange, dcoeffs, declare, diff_table, difforder, dpolyform, dsubs, mapde, separability, splitstrip, splitsys, undeclare]

(1)

U := diff_table(u(x, y, t))

table( [(  ) = u(x, y, t) ] )

(2)

declare(U[])

u(x, y, t)*`will now be displayed as`*u

(3)

pde := diff(U[t]-(3/2)*U[x]-6*U[]^2*U[x]+U[x, x, x], x)+U[y, y] = 0

diff(diff(u(x, y, t), t), x)-(3/2)*(diff(diff(u(x, y, t), x), x))-12*u(x, y, t)*(diff(u(x, y, t), x))^2-6*u(x, y, t)^2*(diff(diff(u(x, y, t), x), x))+diff(diff(diff(diff(u(x, y, t), x), x), x), x)+diff(diff(u(x, y, t), y), y) = 0

(4)

NULL

w := phi(x, y, t, U[])

phi(x, y, t, u(x, y, t))

(5)

w*(-12*U[x]^2-12*U[]*U[x, x])+12*w*U[x]^2+12*U[]*w*U[x, x]+(diff(w, x, x))*(-3/2-6*U[]^2)+diff(diff(w, t), x)+diff(w, y, y)+diff(w, x, x, x, x)-lambda*(diff(U[t]-(3/2)*U[x]-6*U[]^2*U[x]+U[x, x, x], x)+U[y, y])

-lambda*(diff(diff(u(x, y, t), t), x)-(3/2)*(diff(diff(u(x, y, t), x), x))-12*u(x, y, t)*(diff(u(x, y, t), x))^2-6*u(x, y, t)^2*(diff(diff(u(x, y, t), x), x))+diff(diff(diff(diff(u(x, y, t), x), x), x), x)+diff(diff(u(x, y, t), y), y))+(D[1, 1, 1, 1](phi))(x, y, t, u(x, y, t))+(D[1, 1, 1, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 1, 1, 4](phi))(x, y, t, u(x, y, t))+(D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), x))+(D[1, 1, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x))+((D[1, 1, 1, 4](phi))(x, y, t, u(x, y, t))+(D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))+(D[1, 4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), x))+(D[1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x)))*(diff(u(x, y, t), x))+2*((D[1, 1, 4](phi))(x, y, t, u(x, y, t))+(D[1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(diff(u(x, y, t), x), x))+(D[1, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(diff(u(x, y, t), x), x), x))+((D[1, 1, 1, 4](phi))(x, y, t, u(x, y, t))+(D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))+(D[1, 4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), x))+(D[1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x))+((D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))+(D[1, 4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 4, 4, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), x))+(D[4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x)))*(diff(u(x, y, t), x))+2*((D[1, 4, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(diff(u(x, y, t), x), x))+(D[4, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(diff(u(x, y, t), x), x), x)))*(diff(u(x, y, t), x))+3*((D[1, 1, 4](phi))(x, y, t, u(x, y, t))+(D[1, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 4, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), x))+(D[4, 4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x)))*(diff(diff(u(x, y, t), x), x))+3*((D[1, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(diff(diff(u(x, y, t), x), x), x))+(D[4](phi))(x, y, t, u(x, y, t))*(diff(diff(diff(diff(u(x, y, t), x), x), x), x))+(D[2, 2](phi))(x, y, t, u(x, y, t))+(D[2, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), y))+((D[2, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), y)))*(diff(u(x, y, t), y))+(D[4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), y), y))+(D[1, 3](phi))(x, y, t, u(x, y, t))+(D[3, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), t))+(D[4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), t), x))+((D[1, 1](phi))(x, y, t, u(x, y, t))+(D[1, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))+((D[1, 4](phi))(x, y, t, u(x, y, t))+(D[4, 4](phi))(x, y, t, u(x, y, t))*(diff(u(x, y, t), x)))*(diff(u(x, y, t), x))+(D[4](phi))(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x)))*(-3/2-6*u(x, y, t)^2)+12*u(x, y, t)*phi(x, y, t, u(x, y, t))*(diff(diff(u(x, y, t), x), x))+12*phi(x, y, t, u(x, y, t))*(diff(u(x, y, t), x))^2+phi(x, y, t, u(x, y, t))*(-12*(diff(u(x, y, t), x))^2-12*u(x, y, t)*(diff(diff(u(x, y, t), x), x)))

(6)

k := simplify(%)

-(3/2)*(D[1, 1](phi))(x, y, t, u(x, y, t))+(D[1, 3](phi))(x, y, t, u(x, y, t))+(D[2, 2](phi))(x, y, t, u(x, y, t))+(D[1, 1, 1, 1](phi))(x, y, t, u(x, y, t))+4*(D[1, 1, 1, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)+6*(D[1, 1, 4](phi))(x, y, t, u(x, y, t))*(D[1, 1](u))(x, y, t)+4*(D[1, 4](phi))(x, y, t, u(x, y, t))*(D[1, 1, 1](u))(x, y, t)+(D[4](phi))(x, y, t, u(x, y, t))*(D[1, 1, 1, 1](u))(x, y, t)+2*(D[2, 4](phi))(x, y, t, u(x, y, t))*(D[2](u))(x, y, t)+(D[4](phi))(x, y, t, u(x, y, t))*(D[2, 2](u))(x, y, t)+(D[3, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)+(D[4](phi))(x, y, t, u(x, y, t))*(D[1, 3](u))(x, y, t)-3*(D[1, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)-(3/2)*(D[4](phi))(x, y, t, u(x, y, t))*(D[1, 1](u))(x, y, t)-lambda*(D[1, 3](u))(x, y, t)+(3/2)*lambda*(D[1, 1](u))(x, y, t)-lambda*(D[1, 1, 1, 1](u))(x, y, t)-lambda*(D[2, 2](u))(x, y, t)+6*(D[1, 1, 4, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)^2+4*(D[1, 4, 4, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)^3+(D[4, 4, 4, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)^4+3*(D[4, 4](phi))(x, y, t, u(x, y, t))*(D[1, 1](u))(x, y, t)^2+(D[4, 4](phi))(x, y, t, u(x, y, t))*(D[2](u))(x, y, t)^2+(D[3](u))(x, y, t)*(D[1, 4](phi))(x, y, t, u(x, y, t))-(3/2)*(D[4, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)^2-6*(D[1, 1](phi))(x, y, t, u(x, y, t))*u(x, y, t)^2+12*lambda*u(x, y, t)*(D[1](u))(x, y, t)^2+6*lambda*u(x, y, t)^2*(D[1, 1](u))(x, y, t)+12*(D[1](u))(x, y, t)*(D[1, 4, 4](phi))(x, y, t, u(x, y, t))*(D[1, 1](u))(x, y, t)+6*(D[1](u))(x, y, t)^2*(D[4, 4, 4](phi))(x, y, t, u(x, y, t))*(D[1, 1](u))(x, y, t)+4*(D[1](u))(x, y, t)*(D[4, 4](phi))(x, y, t, u(x, y, t))*(D[1, 1, 1](u))(x, y, t)+(D[3](u))(x, y, t)*(D[4, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)-12*(D[1, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)*u(x, y, t)^2-6*(D[4, 4](phi))(x, y, t, u(x, y, t))*(D[1](u))(x, y, t)^2*u(x, y, t)^2-6*(D[4](phi))(x, y, t, u(x, y, t))*(D[1, 1](u))(x, y, t)*u(x, y, t)^2

(7)

frontend(coeff, [k, U[x]^2]);

0

(8)

frontend(coeff, [k, U[x]*U[x, x]])

Error, invalid input: coeff received O*O, which is not valid for its 2nd argument, x

 

NULL


Download det.eq..mw

 

Sort alpha list...

January 17 2014 brian bovril 414

Gentlemen

I know the following:{A>E,F>Z,F<P,Z>E,P<A} , all real Numbers

can I get maple to sort these in order largest to smallest.

[in this case:  A>P>F>Z>E ]

I have a variable with some assumptions: assume(0<=W<=1).

Now, when I make a list and sort it, everything goes fine:

k := [W, (1/3)*W, (1/3)*W, (1/3)*W]:
sort(k, (a,b)->is(a>b))

I get [(1/3)W, (1/3)W, (1/3)W, W] as expected.

Now I try this:

k:= Vector[column]([W, (1/3)*W, (1/3)*W, (1/3)*W]) 
sort(k, (a,b)->is(a>b))

And Maple gets stuck on this computation. I have tried on both Windows and Linux, on several different computers.

Hello,

I'm trying to sort a list of symbols respecting some assumptions I have made about them. For example, I'd like to assume that 0<x<1, and I would like [x, x^2, x^3] to be sorted into [x^3, x^2, x]. How would I accomplish that? Making an assumption with assume() does not affect anything, as the sort() function does not seem to be actually comparing the values of symbols (only numeric values). Any help will be appreciated.

Thank you. 

 hi everyone,   

I have a list of coordinates  and would like to sort them so that in the new order, the last coordinate will be the first coordinate and the first coordinate will be the first: 

   for example:  

  P:=array([[1,4],[2,3],[3,2],[4,1],[6,5],[6,1]]):   

should sort to  

  P:=array[ [6,1], [6,5], [4,1],[3,2],[2,3],[1,4]]  

Attached is my sheet. Please have a look.  my_scrach_Sheet.mw

Have a look at the last command of the sheet.

I am trying to extract integrals from the equaions(eq10_1, for example) using 'op', but it isn't working as expected, is it a bug or I am doing something wrong?

Second question: 

I am not been able to do sorting for all these equations, any suggestions?

Hi I am writing a program that studies the stability of a dynamical system. I want to sort the eigenvalues of the matrix by magnitude in ascending order and then assign theses eigenvalues to a variable and then check to know those that are outside the unit circle. I am dealing with a 5 by 5 matrix. Do not want to go through  the permuation of thses eigenvalue which is lengthy. can someone help me out. JUS HOW TO ASSIGN EACH EIGENVALUE TO A VARIABLE. THANK YOU

How to successfully deploy Matlab function [B, IX] = sort (A, ...)
IX is a permutation vector of the corresponding column of A

M := Matrix(6, 3, [2, 3, 3, 5, 7, 8, 12, 5, 9, -3, 4.1, 7, 7, 7, -3, 9, 3, 8]):
M;
L := <(seq(op(convert(sort(M[() .. (), j]), list)), j = 1 .. op(M)[2]))>;
L := ArrayTools[Alias](L, [op(M)[1 .. 2]], Fortran_order);
P := Matrix(op(M)[1 .. 2],  (i, j)-> ListTools[Search](L[i, j], M[() .. (), j]));
# from Matlab

Heey

 

I have a problem when I call the Eigenvectors i get:

>Eigenvectors(Transpose(K).K);

i get the answer i want but every time i execute the worksheet my eigenvalues swich places aswell as the eigenvector.

Someone that can help me how i can sort or something like that to freeze the eigenvector output? so i can use some of the output to caluculate furhtere on and when i execute the worksheet i know that me eigenvectors and eigenvalues...

Hello,

 

I am working with wedge products, and I came up with this question: how can I efficiently sort a list of indices, and obtain the sign of the associated permutation?

So for [4,3] I would like to obtain [3,4]-

for [1,4,2] I would want to obtain [1,2,4] -

for [2,1,4,3] I would want to obtain [1,2,3,4]+

I know I can do sort([4,3]) but what about the sign of that permutation?

 

Thanks!

Likely has been asked before, but I cannot find the answer:

I have a table with a good number of entries, all of them indexed by strings. I'd like to sort the table by ascending index (i.e. alphabetically A...,B... etc) before I write the result to a file. Obviously, the entries have to stay with their respective indices.

Like:

Table([B=4,C=2,A=3]); to be sorted as A=3,B=4,C=2.

The sort command in Maple works with Arrays only; I understand.

Hi, I have a 18x1 matrix. I am trying to sort it from smallest value to the largest value. But how to I as it to show which was the original position?

For example, M is my 18x1 matrix, i wrote "sort(M)".

In matlab I would write [Q,F]=sort(M);

Q will rearrange it for me and F will tell me the original position where it is from.

Please advice. Thank you very much.

I explain my problem with an example:

 

When I write

sort(3x^3+x^2+x+1);

the answer is

      3    2        
 3 x  + x  + x + 1

 But when I write

sort((x+1)(x+2))

answer is

x(x+2)+1

while I want this form:

   2          
 x  + 2 x + 1

Even when I type only

(x+1)(x+2)

into a blank page, again the answer is 

x(x+2)+1

not 

I have a rather large multivatiate polynomial "Dtest"  I need to divie it by a cubic poly "DGm" using rem and quo. Both are determinants multiplied out,  both given below. Have spent the past 2 nights trying to sort, collect, expand, equate coefficients plex groebner etc. Am trying to collect up all the powers of c3 but cant anything to work. even expand doesn't fully expand "Dtest". If I set c1 and c2 to 1 things are...

When I do the following command in Maple:

1 2 Page 1 of 2