Joe Riel

9665 Reputation

23 Badges

20 years, 34 days

MaplePrimes Activity


These are answers submitted by Joe Riel

Standard technique for a substitution cipher is to compare the relative frequencies in the message to that of the target language, English.  You can use StringTools:-CharacterFrequencies to do that.  Here I'll create a string that has the characters sorted in terms of their relative frequency (assume S is assigned the ciper):

with(StringTools):
relorder := cat(map(lhs,sort([CharacterFrequencies(S)], (a,b)->(rhs(a)>rhs(b))))[]);
                  " ABUWNMeXPrKaZSJyDC'zOL."wnlh,"

For English, not including punctuation, the expectation is "etaonisrh..."

For this short a message we don't expect a particularly good match, but, because Acer has already given us the key, we can see that the actual order of the translated characters in the plain text is

         " teahinrlosdvwpmTyc'Sgu."IJRB,"

Yes.  Do not use the separate seq call:

F3 := proc (n) local i;  ln(n)*mul(1-1/ithprime(i), i = 1 .. n) end proc:

You might be better off generating a vector of primes, copying it, then operating on it inplace:

N := 10\000:
P := Array(1..N,ithprime,'datatype=float[8]');
A := copy(P);
map['inplace'](x -> 1-1/x, A);
ln(N)*mul(x, x in A);

First, the results you are showing do not correspond to the input, so it isn't clear what your issue is. Regardless, once you introduce floats (floating-point values) into the mix, the concept of a common factor loses its meaning (more or less). You might try converting to rationals and then normalizing.  For example:
 

(23000.0*x+100.)/(23000.+1000.*y);
                               23000.0 x + 100.
                               ----------------
                               23000. + 1000. y

convert(%,rational);
                                23000 x + 100
                                --------------
                                23000 + 1000 y

normal(%);
                                   230 x + 1
                                  -----------
                                  10 (23 + y)


You might try ArrayTools[Alias].

The name `simplify\mysimplify` is equivalent to the name simplifymysimplify.  Try using a forward slash:
`simplify/mysimplify`. 

The total derivative of this vector valued function is the linear map from the tangent space of the domain to the tangent space of the codomain.  But that probably won't help you much.  The matrix of this map is given by the Jacobian matrix;  you can use VectorCalculus:-Jacobian to compute it. 

 VectorCalculus:-Jacobian([x^2 + y^2 - z^2, sin(x*y*z) + exp(x*z)],[x,y,z]);
    [2 x , 2 y , -2 z]
    [cos(x y z) y z + z exp(x z) , cos(x y z) x z ,  cos(x y z) x y + x exp(x z)]

Yes.

z := V( q1( pt1( p1, t1)) , q2( pt2( p2, t2))  ):
diff(z,t1);
                                                             / d             \
D[1](V)(q1(pt1(p1, t1)), q2(pt2(p2, t2))) D(q1)(pt1(p1, t1)) |--- pt1(p1, t1)|
                                                             \dt1            /

 

See the help page for D for an explanation of D[1].

The plots[dualaxisplot] procedure was introduced in Maple 12.

u := c*(exp(x-4*t) + exp(4*t-x))^(-2):
eq := diff(u,t) + u*diff(u,x) + diff(u,x$3) = 0:
sol := solve(eq,[c]);
simplify(sol);
             [[c = 0], [c = 48]]

I assume you mean

eq := x^(2/3) + y^(2/3) = 1:

Maples uses the principal root, which is complex for x,y < 0.  One way is to use the absolute value:

eq2 := subsindets(eq, symbol, abs);
plots:-implicitplot(eq2, x=-3..3,y=-3..3);

You might check out the Syrup package in the application center; it can quickly solve this circuit.

How about this,

z := (x^2+y^2)^(x^2*y^2):

Compute the limit along a line through 0

zx := subs(y=k*x, z):
limit(zx, x=0);
                      1

Try the seq procedure with the optional third argument.

spacecurve is a member of the plots package.  You can access it with the long name:

plots:-spacecurve(...);

or call with to permit accessing it with the shortname:

with(plots):
spacecurve(...);

 

convert(BesselK(1,x),Sum);
First 89 90 91 92 93 94 95 Last Page 91 of 114