Joe Riel

9660 Reputation

23 Badges

20 years, 4 days

MaplePrimes Activity


These are answers submitted by Joe Riel

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);

I don't know how to show this analytically in Maple, but generating the sequence of integers (via rounding) is easy enough.  The sequence corresponds to the hexagonal numbers, m*(2*m-1).

First 89 90 91 92 93 94 95 Last Page 91 of 114