Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are answers submitted by Carl Love

This surface is smooth and approximates the points.

A:= `<|>`(v||(1..6), w||(1..3), x1, x2, y1):
plots:-display(
     Statistics:-ScatterPlot3D(A^%T, lowess, bandwidth=2, showpoints= false, transparency= .3),
     plots:-pointplot3d(A^%T, symbol= solidsphere, color= red, symbolsize= 16)
);

Condensing Acer's ideas into a simple procedure, I get this:

FactorGroup:= proc(G::GroupTheory:-Group, N::satisfies(N-> GroupTheory:-IsNormal(N,G)))
# Returns the group G/N.
uses GT= GroupTheory;
     GT:-CustomGroup(
          GT:-LeftCosets(N,G),
          `.`= ((g1,g2)-> GT:-LeftCoset(Representative(g1) . Representative(g2), N)),
          `/`= (g-> GT:-LeftCoset(Representative(g)^(-1), N))
          `=`= ((g1,g2)-> member(Representative(g1) . Representative(g2)^(-1), N))
     )
end proc:

Example:

G:= Alt(4):
H:= SylowSubgroup(2,G):
GH:= FactorGroup(G,H);

GroupOrder(GH);

3

Edit: Procedure updated to reflect Acer's correction to a bug discussed below.

The reason that you can't change the corner entries is that doing so makes the Matrix no longer circulant---it violates the indexing function of the Matrix.

Your Matrix is equivalent to a symmetric band matrix:

N:= 8:
A:= LinearAlgebra:-BandMatrix([[-1$N-1], [2$N]], shape= symmetric);

 

Use a local declaration in your procedure, like this:

My_Proc:= proc(...parameter declarations...)
local L, P, V;

   ...procedure statements...

end proc:

It can be done like this:

Plex:= < u | v | w | x | y | z >;

for i from 2 to 5 do Plex:= Plex[[i, 1..i-1, i+1..-1]] end do;

 

while n >= 1 do
     for i from 1 to n do
          S[i]:= resultant(F[i], F[i+1], Plex[i])
     end do;
     F[i]:= S[i];
     n:= n-1
end do;

I am not sure if you are more interested in reproducing the animation in your first link or in analyzing solids of revolution as in the second (MapleSoft) link. I chose the former. Except for the coordinate axes, the following is very close to the animation in your first link. I just estimated the number of gridlines.

restart:
f:= x-> -x^3+4*x^2-3*x+1:
plots:-animate(
     #Each frame of animation has 4 pieces put together by `display`.
     plots:-display,
     [[
       #A cylindrical sector of the curved surface:
       'plot3d'(
            [r,t,f(r)], t= 0..T, r= 0..3,
            coords= cylindrical, style= wireframe, grid= [30,20]
       ),
       #A sector of the base cylinder:
       'plot3d'(
            [3,t,z], t= 0..T, z= 0..f(3),
            coords= cylindrical, style= wireframe, grid= [30,2]
       ),
       #A sector of the base disk of the base cylinder:
       'plot3d'(
            [r,t,0], t= 0..T, r= 0..3,
            coords= cylindrical, style= wireframe, grid= [30,8]
       ),
       #The curve which is being revolved:
       'plots:-spacecurve'(
             #The main curve:
            {[r,T,f(r)],
             #The 3 straight line segments of the curve:
              [[3,T,f(3)], [3,T,0], [0,0,0], [0,0,f(0)]]
             },
            r= 0..3, coords= cylindrical, thickness= 2, color= red
       )
      ], scaling= constrained, axes= normal, orientation= [90,65]
     ], T= 0..2*Pi, paraminfo= false
);

Basically, you want to plot -abs(x^x).

plot(-abs(x^x), x= -2..0);

 

 

e^x is exp(x) in Maple; e is treated simply as another variable, hence your error messages. Try this:

plot(exp(x)*ln(x), x= 0.1..10);

Kitonum wrote:

Herd size that satisfies all the constraints, very large, and Maple can count it only approximately.

Not true, at least in Maple 18. It can compute all 200,000+ digits of the answer in the blink of an eye, if you use evala. This may be a good example to show how Maple has advanced.

restart:
w:= 300426607914281713365*sqrt(609)+84129507677858393258*sqrt(7766):
n:= evala((w^4658-1/w^4658)^2/(4657*79072)):
d:=3515820*n;                             
B:= (1243419/585970)*d;
local D: D:= (367903/175791)*d;
W:= (246821/83710)*d;
Y:= (125739/106540)*d;
b:= (815541/585970)*d;
w:= (17158/8371)*d;
y:= (1813071/1171940)*d;

... long integer answers omitted ...

is(sqrt(W+B), integer);

                        true

is(-3/2+(1/2)*sqrt(1+8*(D+Y)),integer);

                        true

In your second plot---the one with more points---you forgot to increase the denominators from 149 to 249. Thus, you only increased the number of points outside the set. If you increase the denominators to 249, you will indeed get a denser, more-detailed plot.

I don't know what you mean by "flush". And why do you expect lines when you are plotting points? If you use enough points, then you will get a plot that doesn't appear pixellated.

Here's a better way to plot the Mandelbrot set: We use the concept of "escape time".  In your code, you rejected points if they got to Float(infinity) after 100 iterations. Actually, once the abs(z) > 2, it's guaranteed to go to infinity. In the escape-time way, we count the number of iterations it takes to get abs(z) > 2 or max out at 100 iterations. The color of a point is determined by the number of iterations.

Mandelbrot:= proc(x,y)
local n,c,z;
     c:= x+I*y;
     z:= 0;
     for n to 100 while abs(z) < 2 do
          z:= z^2+c
     end do;
     n
end proc:

plots:-densityplot(
     Mandelbrot, -1.5..0.5, -1..1, grid= [250,250],
     colorstyle= HUE,
     axes= boxed, scaling= constrained,
     style= patchnogrid,
     labels= [Re,Im]
);

You'll notice that this is much faster than your code, yet it is doing a very similar computation. That's because this code is processed in the evalhf environment.

P:= randpoly([x,y]);

 

C:= [coeffs(P, [x,y], 't')];

t;

 

add(C[k]*t[k], k= 1..nops(C));

 

I don't see what you're trying to achieve in your code. But you can get the solution in one step with isolve.

{W=5/6*B+Y, B=9/20*D+Y, D=13/42*W+Y, w=7/12*(B+b),
  b=9/20*(D+d), d=11/30*(Y+y), y=13/42*(W+w)}:
isolve(%);

It is better to place the PLOT components in a Vector and to select them with type specfunc. Like this:

rearrangeCurves:= proc(v_items::specfunc(anything, PLOT), v_reorder::list([integer,integer]):= [])
local p, curves:= Vector(1), rest:= Vector(1), i:= 0, j:= 0;
     for p in v_items do
          if p::specfunc(anything, CURVES) then
               i:= i+1;
               curves(i):= p
          else
               j:= j+1;
               rest(j):= p
          end if
     end do;
     for p in v_reorder do
          curves[p]:= curves[p[[2,1]]]
     end do;
     PLOT(convert(curves,list)[], convert(rest, list)[])
end proc:

(x1,x2):= fsolve(x^2+3*x+1, x);

The parentheses on the left are not needed, but it is my personal style to use them with multiple assignment.

First 304 305 306 307 308 309 310 Last Page 306 of 395