Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 28 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

You simply need to switch Re with seq:

The following will work for any GridGraph:

restart:
GT:= GraphTheory:
G:= GT:-SpecialGraphs:-GridGraph(3,3):
GT:-DrawGraph(
    GT:-RelabelVertices(
        G, 
        sort(
            -sort(
                GT:-Vertices(G), 
                key= (v-> local p:= parse(v); [p[2], -p[1]]), 
                output= permutation
            ), 
            output= permutation
        )
    ), 
    stylesheet= "legacy"
);

The culprit is a remember table in procedure SumTools:-DefiniteSum:-ClosedForm. So a workaround is to use 

forget(SumTools);

before the second call to sum.

But since remember tables don't work correctly with mutable containers (such as Vectors), I'd recommend not using sum at all when the summand contains vector entries.

Tom's Answer shows some general techniques that a procedure can use to react sensibly to both numeric and nonnumeric input. However, for your simple example, all that's needed is piecewise; it already takes the numeric/nonnumeric distinction into account:

h:= x-> piecewise(x <= 0, sin(3*x), sin(x/3));

As far as I can tell, Maple's numeric PDE solver is restricted to boundary conditions that use only one of the system's dependent variables (the unknown functions).

For what it's worth, the numeric ODE BVP solver doesn't have that restriction. I'm just pointing out that contrast, not suggesting that that could help with your situation.

You asked:

  • Is there a 64 bit mode that will take better advanage of the system?

Yes, and it'll definitely take better advantage of your system. But you need to decide between 32-bit and 64-bit at the time that you download the installer.

  • For that matter, is there any configuring that can install it or configure it to take better advanatage of the multi-threaded hardward capabilities?

Maple has multi-processing and multi-threading capability right out of the box; there's no special configuring needed to use it. There are a few tweaks that are occasionally useful that can be made with the kernelopts command. See ?kernelopts. Using that capability is mostly up to the skill of the programmer. Most high-level Maple commands write to global variables, so they can't be used multi-threaded.

For your secondary question, about substituting the cube-root powers, do this:

evalindets(
    s1, 
    identical(5435+3*sqrt(515793))^({-1,1,2}/~3), 
    e-> t^numer(op(2,e))
);
 

Powers appearing in denominators are stored internally as powers with negative exponents, which is why the above looks for both -1/3 and 1/3 exponents.

You asked:

  • Is there a way to tell solve to return unique solution only by default?

Why should there be a named option for that when it's trivial to just use { }?

sol:= {solve(expr = 0,u)}:

eval(arctan(y, x), answer5[1])

Many Maple commands return sets or lists of equations which specify the values of variables. The best way to access those values is eval.

I've used the two-argument form of arctan, which correctly adjusts the result to the third or fourth quadrant when the second argument is negative. See ?arctan.

Arguments are evaluated before being passed. The solve evaluates to NULLNULL isn't counted as an element in an argument sequence. 

The simplest thing that you could do to animate it would be to add the keyword animate to the Explore command. Then hit the play button (right-pointing triangle towards lower left of the Explore window).

searchtext is a command that searches for one string in another string. I guess that the command that you used called searchtext. See ?searchtext for the valid argument sequences. If you need more help, then you'll need to post (at least) the command that gave you the error message.

Here's the "little procedure" that I referred to in a Reply above:

`convert/standardODE`:= (e::{algebraic, `=`(algebraic)})->
local 
    dy:= indets(e, specfunc(function(name), D))[], 
    x:= op([1,1], dy),
    dydx:= diff(op(dy), x)
;
    solve(subs(D(x)= 1, dy= dydx, e), {dydx})[]
:  
ode:= -(x^2+x*y(x))*D(x) + D(y(x)) = 0:
convert(ode, standardODE);
                            d          2         
                           --- y(x) = x  + x y(x)
                            dx                   

I omitted checks for any of the numerous syntactically invalid forms that could be entered.

Your procedure contains the line x1:= evalf(T(x0)) where has no other reference. I guess this is a typo. I don't know why maplemint didn't catch this. Perhaps maplemint thinks you mean from the orthopoly package. Regardless, you need to define T, which I guess is your Newton iteration function T:= unapply(x - D(f)(x)/f(x), x).

The memory used by a Grid application is likely to be roughly proportional to the number of processors in use. So, one way to get it to use less memory is to reduce the number of processors used by setting kernelopts(numcpus= some number). A few years back, it was necessary to do that right after restart; I don't know if that's still true. If done signifiicantly after restart (perhaps after the first garbage collection), it would say that it had changed numcpus but not actually do it.

I'll define a memory leak as a situation where some memory that should be garbage collected isn't being. Maple has many known memory leaks. If that is the problem, it may be possible to ameliorate it by reducing tasksize. But my experience is that you shouldn't lower it so much that the CPU time on each task is less than about 2 seconds.

I am unsure about both paragraphs above, so I'm looking forward to other opinions.

First 96 97 98 99 100 101 102 Last Page 98 of 395