Christian Wolinski

MaplePrimes Activity


These are replies submitted by Christian Wolinski

@mmcdara 

restart:

N   := 3:
P   := 2:

niv := [seq(Z[i], i=1..N)];
f   := Matrix(N^P, P, (i,j) -> `if`(j=P, niv[(i mod N)+1], niv[iquo(i-1,N)+1]));
ds := subs(niv =~ [$0..N-1], f);

vs := [ seq(V__||i, i=1..P)]:
es := unapply( sort( [ seq( mul(vs ^~ [entries(ds[i,..], nolist)]), i=1..N^P) ] ), vs);

ff := convert([ seq(es(entries(f[i,..], nolist)), i=1..N^P) ], Matrix);

R := RootOf(NumberTheory:-CyclotomicPolynomial(N, x), x);
alias(alpha = R);
UnityRoots := map2(op, 1, roots(x^N-1, x, R));

F := evala(subs(niv =~ UnityRoots, ff)) /~ sqrt(N^P);
evala(1/F - subs(R = 1/R, F^+));
convert(%, set);

@mmcdara For the record I have no idea what you actually need here.... :(

The operator you seek is : F ^ *, F ^ %H rather than F ^ +, F ^ %T, indicated by Maple Help pages. So that should be simplify(F^ * . F);

If the above code was ever successfully valuated to a procedure code then please post it in .mw form. Otherwise, know that the above is so badly written it is useless.

Maple 2017.3 gives the correct answer. Perhaps you should try it with a restart?

@ogunmiloro Replace the definitions You gave with:
B[0] := .50; C[0] := .30; DD[0] := .21; E[0] := .14; F[0] := .70; G[0] := .45; H[0] := .14;

Did You initialize B,C,DD,E,F,G,H at 0?

Re is a builtin function. You should not use it as a variable.

Please post source text or maple worksheet.
Which parameter is to vary? Is it phi?
 

  restart;
  with(plots);
  local O;
  P := b*x*cos(phi) + a*y*sin(phi) - a . b = 0;
  Q := a*x*sin(phi) - b*y*cos(phi) - c^2*sin(phi)*cos(phi) = 0;
  M := op(solve([P, Q], [x, y]));
  X := `&-+`((P)/(sqrt(b^2*cos(phi)^2 + a^2*sin(phi)^2)));
  Y := `&-+`((Q)/(sqrt(b^2*cos(phi)^2 + a^2*sin(phi)^2)));
  (P^2)/(A*(b^2*cos(phi)^2 + a^2*sin(phi)^2))
   + (Q^2)/(B*(b^2*cos(phi)^2 + a^2*sin(phi)^2)) - 1 = 0;
  a := 10;
  b := 7;
  c := sqrt(a^2 - b^2);
  phi := 4/5*Pi;
  Ell := plots:-implicitplot((x^2)/(a^2) + (y^2)/(b^2) - 1 = 0, x = -11 .. 11, 
  y = -8 .. 8, color = grey);
  O := [0, 0];
  M := [a*cos(phi), b*sin(phi)];
  vec := plot([O, M], color = black, thickness = 1);
  P := plots:-implicitplot(P, x = -20 .. 20, y = -20 .. 20, color = aquamarine);
  Q := plots:-implicitplot(Q, x = -20 .. 20, y = -20 .. 20);
  F1 := [(a + b)*cos(phi), (a + b)*sin(phi)];
  F2 := [2*M[1] - F1[1], 2*M[2] - F1[2]];
  F1F2 := plot([F1, F2], color = green, thickness = 3);
  ELL := plots:-implicitplot(((b*x*cos(phi) + a*y*sin(phi) - `.`(a, b))^2)/(
  a^2*(b^2*cos(phi)^2 + a^2*sin(phi)^2)) + (
  (a*x*sin(phi) - b*y*cos(phi) - c^2*sin(phi)*cos(phi))^2)/(c^2*cos(phi)^2*(
  b^2*cos(phi)^2 + a^2*sin(phi)^2)) - 1 = 0, x = -20 .. 20, y = -20 .. 20, 
  color = blue, thickness = 3);
  Hyp := plots:-implicitplot(((b*x*cos(phi) + a*y*sin(phi) - `.`(a, b))^2)/(
  b^2*(b^2*cos(phi)^2 + a^2*sin(phi)^2)) - (
  (a*x*sin(phi) - b*y*cos(phi) - c^2*sin(phi)*cos(phi))^2)/(c^2*sin(phi)^2*(
  b^2*cos(phi)^2 + a^2*sin(phi)^2)) - 1 = 0, x = -20 .. 20, y = -20 .. 20, 
  color = black);
  dF1 := plottools[disk](F1, 0.3, color = red);
  dF2 := plottools[disk](F2, 0.3, color = red);
  cir1 := plots:-implicitplot(x^2 + y^2 = (a + b)^2, x = -20 .. 20, 
  y = -18 .. 18, color = pink);
  cir2 := plots:-implicitplot(x^2 + y^2 = (a - b)^2, x = -10 .. 10, 
  y = -4 .. 4, color = coral);
  asym1 := plots:-implicitplot((b*x*cos(phi) + a*y*sin(phi) - `.`(a, b))/(b)
   + (a*x*sin(phi) - b*y*cos(phi) - c^2*sin(phi)*cos(phi))/(c*sin(phi)) = 0, 
  x = -20 .. 20, y = -18 .. 18, color = black, linestyle = DOT);
  asym2 := plots:-implicitplot((b*x*cos(phi) + a*y*sin(phi) - `.`(a, b))/(b)
   - (a*x*sin(phi) - b*y*cos(phi) - c^2*sin(phi)*cos(phi))/(c*sin(phi)) = 0, 
  x = -20 .. 20, y = -18 .. 18, color = black, linestyle = DOT);
  tp := plots:-textplot([[M[1], M[2] + 0.8, "M"], [F1[1] - 0.8, F1[2], "F1"], 
  [F2[1] + 0.8, F2[2] + 0.3, "F2"], [5, 15, "axe P"], [8, -10, "axe Q"]]);
  plots:-display(
  [Ell, vec, P, Q, F1F2, cir1, cir2, ELL, Hyp, dF1, dF2, asym1, asym2, tp], 
  scaling = constrained, axes = normal, 
  axis = [gridlines = [1, color = blue]], xtickmarks = 0, ytickmarks = 0, 
  view = [-20 .. 20, -20 .. 20], size = [500, 500]);

@Adam Ledger I think these are trending in recent weeks.

@Rouben Rostamian  It appears somewhere in the procedure returned an expression diff(?, t) is utilised. So diff(?, 1) is an error once t is assigned.

The last output is as expected. If you wanted a sequence of 1s then change the w for loop to:
for w from 1 by 1 to TOTAL do

The file is not there...

@Jayaprakash J Any value of parameters n satisfies the condition. Have you tested any?

@emendes Apologies. An oversight in seq. Replace the expression C = c with C = [c]. I corrected the answer already.

1 2 3 4 5 6 7 Last Page 1 of 10