ecterrab

10504 Reputation

20 Badges

16 years, 143 days

MaplePrimes Activity


These are replies submitted by ecterrab

@lemelinm 

It actually appears exactly as you show. Use the Vectors:-Component for the lhs and the LeviCivita and d_ for the rhs.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@Carl Love 
:):):) !!! I sometimes have these gaffes! Indeed the documentation of this package is good, I think but indeed this help page for ChangeCoordinates is just missing! 

The command was introduced in Maple 2015, and it is mentioned there in the page ?updates,Maple2015,Physics, in the section for the Vectors package, also with examples of its use - the basics for its help page. I will move that material into a new help page filling the gap.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi, would you mind please uploading a Maple worksheet with your input/output/expectation? Also, explain please what you do mean by "we want Maple to reconstruct them" Reconstruct what? H? e? What is the meaning of zeta[2] [e 0 , e 1 ]? 

To upload your worksheet please use the Green arrow. Uploading your worksheet helps to help you, avoiding others having to retype or copy and paste things that may not be correct Maple syntax.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@vv 

Indeed, I agree with @Rouben Rostamian, yours is beautiful and inspiring tackle!

Best!

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@snpa 
Would you mind please uploading a worksheet with your question, presented, as in "After having entered this and that (shown) I enter "this" and expect XXX but receive YYY".  In that way, the question is sufficiently clear and helping you becomes simpler. To upload the worksheet please use the green arrow you see when replying or posting a question.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft.

@michalkvasnicka 

This issue in MapleCloud is now fixed, so the problem is resolved.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@itsme 

Thanks for your new post; the problem was inadvertently introduced in March during one more round of improvements in SortProducts, and is fixed in the Maplesoft Physics Updates v.1015 or newer (for Maple 2021), uploaded earlier today. Attached is what I receive, with all the terms correctly sorted.

physics_sorting_products_(reviewed).mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@nm 

This kind of problem is tackled using differential algebra elimination. There are three computational implementations of that: DEtools:-rifsimp, DifferentialAlgebra and, more recently, DifferentialThomas. The three use different algorithms to accomplish, basically, the same. The algorithms are extended to handle mathematical functions using the approach explained in PDEtools:-dpolyform; i.e.: representing the (non-rational) mathematical functions by (rational) differential equations and auxiliary variables.

This approach is extremely powerful but, depending on the problem, it may hang. The example you are asking about, however, does not hang if a) you tackle it using DifferentialThomas (256 seconds) or more appropriately b) you use convert/exp (0.6 seconds):

Since the output of independentof could be expressed with any mathematical functions, the convert/exp step should be applied by default, directly within PDEtools:-Solve. I will test this idea and if it works as I expect put it in one of the next Maplesoft Physics Updates.

Edgardo S. Cheb-Terrab
Physics,Differential Equations and Mathematical Functions, Maplesoft

@ArashMhasani 

You are using a program you wrote, Ldiff, that I copy and paste here:

Ldiff := proc(f, h, x)
    local n, j, ld;
    if not type(f, 'vector') then
        ERROR("ldiff: 1st argument must be a vector")
    else
        n := linalg[vectdim](f)
    fi;
    if type(h, 'table') then
        if not (linalg[vectdim](h) = 1) then
            ERROR("2nd argument must be a scalar valued function")
        fi
    fi;
    if not (type(x, 'vector') and linalg[vectdim](x) = n) then
        lprint("ldiff: 3th argument is the variable vector and must be \
            defined as ");
        lprint("       an unassigned vector, wrong type or number of el\
            ements, ");
        lprint("       see your model description");
        lprint("  ");
        ERROR("see last comment")
    fi;
    ld := 0;
    for j to n do
        ld := ld + diff(h, x[j])*f[j]
    od;
    simplify(normal(ld))
end

I noticed that, removing the call to simplify, it takes 263 seconds to compute Ldiff(f,z[6],x), the input you say in your worksheet that hangs, resulting on an expression of length 167189212 (see ?length). If you also remove the call to normal,  Ldiff(f,z[6],x) is computed in less than 1 sec and results in an expression of length 846930. It is then unclear the advantage of calling normal. Also, simplify includes normalization, so I would suggest you to just remove the call to normal, and in this particular case of Ldiff(f,z[6],x) remove also the call to simplify.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

In order to help you, it is useful (necessary) if you post a Maple worksheet (use the Green arrow you see when you post your question) with the problem formulated, including your attempt to compute the Lie derivative, using any of the existing Maple commands for that purpose mainly in the Physics (simpler) or DifferentialGeometry packages.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical functions, Maplesoft

@nm 

type(identical(x), type) returns true, so yes it is a type.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@Carl Love 

Hi great Carl. In the first two replies I made (found above), I didn't use 'flat'. But then I saw @nm used 'flat', so I imagined that for some reason he wanted to use the 'flat' option. Hence in the third or so reply I illustrated the actual problem of how to match the type (not related to the 'flat' option of subsindets) using his (assumed to be) preference of using 'flat'.

The default of subsindets and evalindets is not flat, so if you do not indicate 'flat', the procedure being applied is applied recursively, as designed. BTW looking at what @nm was doing (application of simplify/radical?) it also seemed natural to use 'flat' since simplify/radical already recurses.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@nm 

Maybe this is a good opportunity: why don't you make a post here in Mapleprimes, where you indicate what you would have liked to find in the help system regarding this issue, including the kinds of expressions to match that you'd like to see in that page. Others may want to add expressions to be matched. Then we (at Maplesoft) can move into creating that help page, including those examples and any other that may also seem useful. In the end, the page that would have been useful for you will be there in the system for everybody.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@nm 

For that reason I mentioned "note that denominators are represented as negative powers". You seem to have not noticed the comment. It is at the beginning of my previous reply. It is the same reply where you missed the example.

Taking that comment into account, for instance subsindets[flat](expr, And(`*`, satisfies(u -> andmap(membertype, [Or(exp(anything), exp(anything)^(-1)), anything^fraction], [op(u)]))), G) does what you want in one go. Note the use of Or, also mentioned in that reply. This language is remarkably flexible and expressive, but you need to know what is what you want to match, and for that, how the desired expression is represented.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@nm 

No. I showed - in the reply you are replying to - how to match that pattern for "any number of operands, 2, 3, or other", and I showed you achieve that by not saying 2, 3, or any fixed number. In that sense, what I showed is just the equivalent of what you show in Mathematica. If you could actually refer to what you are replying and telling what part wasn't clear there? By the way I am only talking about matching in Maple, and am not interested in how you do that in Maxima, Sage, Reduce, Mathematica or others, nor am curious about comparisons. Only showing you how to do it. In Maple.

Repeating then: you need to know clearly what is what you want to match. And there is nothing like "the pattern is meant to be ..." Either it is, or it is not. And both an implicit 1 in a product,  with or without, a fixed or unlimited, or selected different numbers of more operands, are all straightforward types. Then using the tools I mentioned in the previous reply all of them look easy, as in the examples I showed (you seem to have missed them?).

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

1 2 3 4 5 6 7 Last Page 1 of 51