Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 311 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

I don't quite see your pattern. If you can express it with symbols instead of numbers for the indices, then it'd be trivial for me to generate all the permutations, which you could then pass to simplify.

I've seen you use as an index before. Am I correct in guessing that is a fixed, constant symbol rather than a variable that may (possibly at some future unspecified time) be given an integer value similar to the other indices?

@acer I've seen this many times before: 2D Input being converted into some abomination of 1D input with operators in prefix-functional form and numerous explicit invocations of Typesetting:-. Perhaps it has something to do with interface(typesetting= extended)?

@Carl Love Here it is, albeit significantly more code than my estimate.

CopyDir:= proc(src::string, dest::string)
uses FT= FileTools;
local n:= 1+length(src), r, d, f, limb, ds:= kernelopts('dirsep');
    if not FT:-Exists(dest) then FT:-MakeDirectory(dest) fi;
    for r in FT:-Walk(src, 'topdown', 'followlinks') do
        limb:= cat(dest, ds, r:-dir[n..], ds);
        for d in r:-subdirs do
            (d-> `if`(FT:-Exists(d), 0, FT:-MakeDirectory(d)))(
                cat(limb, d)
            )
        od;
        seq(FT:-Copy(cat(r:-dir, ds, f), cat(limb, f)), f= r:-files) 
    od;
    return
end proc
:
#Example:
CopyDir("C:/Program Files/Maple 2020", "C:/Users/carlj/desktop/maple");

 

@winfredgg Since you had some interest in using eval, I modified my Answer above to use it correctly. I changed the first argument of semilogplot from a seq command to an eval command. This is how I would've done it myself anyway, had I not been following your use of seq. But there's nothing wrong with your use of seq!

@wolowizard Like this:

restart:
interface(labeling= false):
interface(rtablesize= 20):
#Note use of inert % operators:
F:= (x1,x2,x3,x4,x5)-> f(args) = 2%^x1%*(7%^x2+443%^x3+547%^x4+32%^x5):
V:= <4,7,8,0; 1,7,6,9; 0,1,3,5; 2,5,6,1>^+:
<seq(seq(F(k, seq(V[j])), j= 1..4), k= 1..5)>;

You could also change the addition operators to %+ in the definition of F.

So, you decide to completely ignore all warnings by setting interface(warnlevel= 0), and then you ask us for an explanation when something goes wrong? That setting should be reserved for expert use only, and only in finished, polished code.

@J F Ogilvie wrote:

  • If software, such as the Physics Updates, were properly designed and tested before release, such a 'work-around' would be completely unnecessary.

What if the problem is caused by a change Microsoft made to Windows? I'm not saying that it is, but that seems a not unlikely possibility. In that case, no amount testing at Maplesoft's end prior to the Windows change would've helped. As has been stated multiple times, the problem is not with Physics Updates per se; the problem is with the installer.

And what are these marginal computers and marginal operating systems that you refer to?

I doubt that solving "a highly nonlinear equation in one variable" with "undetermined parameters" could be divided into subtasks which could be run in parallel, either with or without shared memory. Do you have reason to believe that the equation can be solved at all?

@Carl Love There are cases where the max of the discontinuities can't be determined even though the discontinuities themselves can be. Such cases are likely to arise when symbolic parameters are used (as in exp(a*t)). So instead of finding the max, it's better to assume Re(s) is greater than all discontinuities. So change my procedure to this:

Laplace:= proc(f::algebraic, t::name, s::name)
local J:= int(f*exp(-s*t), t);
    limit(J, t= infinity) - limit(J, t= 0, 'right') 
        assuming (Re(s) >~ {0, discont(J, s)[]})[]
end proc
:
Laplace(exp(a*t) + exp(b*t), t, s);

 

@AHSAN I don't have any Maple file for it. How about you type in into Maple?

@nm Your procedure is specific to exponential functions. See the discont command for a more general solution.

@saher You need to assume that Re(s) is "large enough" to avoid any discontinuities in the transform. In the case that you show, the transform is 1/(s-1), so assuming Re(s) > 1 works.

Get rid of the assume command; use assuming.

Laplace:= proc(f::algebraic, t::name, s::name)
local J:= int(f*exp(-s*t), t);
    limit(J, t= infinity) - limit(J, t= 0, 'right') 
        assuming Re(s) > max(discont(J, s));
end proc
:
Laplace(exp(t), t, s);

 

I don't think that it's possible to make a parameterized alias.

Don't check off all the boxes in the Question header. This Question is about Maple alone. Checking extra boxes is rude and angers those who answer the questions.

@AHSAN Okay, I missed that h = 1 + x^2/2. With that, the problem makes sense.

@acer I didn't mean my Answer as a criticism of yours, and I hope that you didn't take it that way. Indeed, your Answer is close to an Answer I posted and then changed to just hints. If solve works (I also checked it on every 3-subset), then surely it's an appropriate first attempt for the OP before wading into the foreboding syntax of modular methods. The OP's posted solution attempt already suggests that they were trying to using modular matrix methods.

By the way, do you have any suggestions to improve my foreboding LinearAlgebra:-Modular syntax?

First 159 160 161 162 163 164 165 Last Page 161 of 708