John Fredsted

2233 Reputation

15 Badges

17 years, 322 days

MaplePrimes Activity


These are questions asked by John Fredsted

Consider the following two functions:

f := (theta) -> (x) -> theta*x;
g := unapply(unapply(theta*x,x),theta);

I would have expected f and g to behave identically. Apparently I am wrong, though:

f(phi)(x),
g(phi)(x);

But why? If the functions were alternatively defined as

f := (theta,x) -> theta*x;
g := unapply(theta*x,theta,x);

using unapply only once, then they would behave identically. But that is not quite what I want: I would like to have parameter-valued procedures of a single parameter, not (parameter-less) procedures of two parameters.

Consider, say, the following third order derivative:

expr := diff(f(x,y),x,y$2);

Does there in Maple exist some built-in functions for extracting from such an expression 1.) the function being differentiated, and 2.) the coordinates being differentiated with respect to? Using op(expr) is of no immediate avail as it returns only a second order derivative (as the first operand), and one of the coordinates being differentiated with respect to (as the second operand).

It is, of course, possible to make ones own function for extracting these two quantities, a crude example being

splitDeriv := proc(expr,coords::expects(list) := [])
   if PDETools:-difforder(expr) > 0 then
      splitDeriv(op(1,expr),[coords[],op(2,expr)])
   else
      expr,coords
   end if
end proc:

for which

splitDeriv(expr);

But it would be much nicer to use built-in functions. And perhaps such functions do exist. If so, I am unable to locate them. Perhaps I am just being stupid, for the problem seems rather elementary.

Consider the following two test procedures for creation of the same module:

createModule1 := proc(dim::posint)
    module()
        export det;
        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);
    end module
end proc:

and

createModule2 := proc(A::Matrix(square))
    local dim;
    dim := RowDimension(A);
    module()
        export det;
        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);
    end module
end proc:

as well as the following code lines calling these:

createModule1(       2 ):-det(IdentityMatrix(2));
createModule2(Matrix(2)):-det(IdentityMatrix(2));

The first line executes unproblematically, while for the second line an error results concerning the dimensionality check 1..dim,1..dim of the matrix. Why is dim available/initialized in the first version, while not in the second?

Note added: Issue resolved, see my comment below.

I have a sum of several thousands addends each of which is the product of a c-number times a product of 6 Grassmann-odd degrees of freedom, the latter of which does each belong to a set of 24 Grassmannians. The specific numbers are not that important, though.

This sum should equal zero. So I would like to add all c-numbers multiplying the same product of six Grassmannians, taking proper care of anticommutativity, of course. The sum would then be zero if all these sums of c-numbers are zero. Unfortunately, using Physics:-Coefficients is far too slow; actually, it has never succeeded in even completing the calculation.

Therefore, I have tried to loop through all the addends, splitting each one of them using selectremove(), and then adding the c-numbers in an Array (properly indexed), or in a table (associatively indexed, of course). Consistently, by converting the Array and table to two sets, the two methods result in the same set of equations. But solving these equations yields a result that is not stable: it varies from session to session.

I am baffled. Can anyone give me a hint to a safe and reasonably quick method for extracting these c-number-valued equations?, for there has to be something wrong with what I do.

I have a 30-dimensional, semisimple Lie algebra which I would like to know the decomposition of (and decomposable it must certainly be, as no simple Lie algebra has dimension 30). The function DifferentialGeometry:-LieAlgebras:-Decompose is, I guess, the proper command to use. Unfortunately, on my computer, an Intel Core i3 with 4 GB RAM, it seems to drag on forever. Therefore, I have the following two questions:

1.) Is it possible to gain some useful insight into any progress, while the calculation goes on? To have some status bar, so to speak? The amount of information should not be overwhelming, however.

2.) Does there exist some smarter way of doing a decomposition? Perhaps just a partial one?

First 6 7 8 9 10 11 12 Page 8 of 12