Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

I do not know the answer You seek, but here is an example:
alias(mt=LinearAlgebra[Transpose], mht=LinearAlgebra[HermitianTranspose]);
map(radnormal, evalm(mht(F) &* F));
map(radnormal, evalm(mt(F) &* F));
Thumb if You like.

Is this the issue:

alias(mt = LinearAlgebra[Transpose], mht = LinearAlgebra[HermitianTranspose]);
map(radnormal, evalm(mht(F) &* F));
map(radnormal, evalm(mt(F) &* F));


Thumb if You like.

Maybe like this:

 RK2skritt := proc(FR::procedure, xo, yo, vxo, vyo, h)
local x, y, vx, vy, r, kx1, kx2, kx3, kx4, ky1, ky2, ky3, ky4, lx1, lx2, lx3, 
  lx4, ly1, ly2, ly3, ly4, tmp;
  r := sqrt(xo*xo + yo*yo);
  tmp := - (h*FR(r))/(r);
  lx1 := h*vxo;
  ly1 := h*vyo;
  kx1 := tmp*xo;
  ky1 := tmp*yo;
  lx2 := h*(vxo + 0.5*kx1);
  ly2 := h*(vyo + 0.5*ky1);
  r := sqrt((xo + 0.5*lx1)^2 + (yo + 0.5*ly1)^2);
  tmp := - (h*FR(r))/(r);
  kx2 := tmp*(xo + 0.5*lx1);
  ky2 := tmp*(yo + 0.5*ly1);
  lx3 := h*(vxo + 0.5*kx2);
  ly3 := h*(vyo + 0.5*ky2);
  r := sqrt((xo + 0.5*lx2)^2 + (yo + 0.5*ly2)^2);
  tmp := - (h*FR(r))/(r);
  kx3 := tmp*(xo + 0.5*lx2);
  ky3 := tmp*(yo + 0.5*ly2);
  lx4 := h*(vxo + kx3);
  ly4 := h*(vyo + ky3);
  r := sqrt((xo + lx3)^2 + (yo + ly3)^2);
  tmp := - (h*FR(r))/(r);
  kx4 := tmp*(xo + lx3);
  ky4 := tmp(yo + ly3);
  x := xo + 1/6*lx1 + 1/3*lx2 + 1/3*lx3 + 1/6*lx4;
  y := yo + 1/6*ly1 + 1/3*ly2 + 1/3*ly3 + 1/6*ly4;
  vx := vxo + 1/6*kx1 + 1/3*kx2 + 1/3*kx3 + 1/6*kx4;
  vy := vyo + 1/6*ky1 + 1/3*ky2 + 1/3*ky3 + 1/6*ky4;
  [x, y, vx, vy];
end proc;

Thumb if You like.

Th ecode in text format:
fsolve(3.*10^6 = sqrt((-4.2*10^14*(-1.*10^7*u*cos(u) + 3.84*10^8)/((-1.*10^7*u*cos(u) + 3.84*10^8)^2 + 1.*10^14*u^2*sin(u)^2)^(3/2) + 4.2*10^21*u*cos(u)/((-1.*10^7*u*cos(u) + 3.84*10^8)^2 + 1.*10^14*u^2*sin(u)^2)^(3/2))^2 + 7.056*10^43*u^2*sin(u)^2/((-1.*10^7*u*cos(u) + 3.84*10^8)^2 + 1.*10^14*u^2*sin(u)^2)^3), u, u = 0 .. 2*Pi);

It also looks like this does not have any zeroes in this interval.

Have You tried:
map(assign, Sol);

You must be observant of valuation rules, so:

for i from 1 by 1 while i <= nops(Sol) do
proc(x,y) assign(x, y) end(op(op(i, Sol)))
end do;

 

Thumb if You like.

Lookup ?igcdex.
If you need the code then you can read how it was coded with: showstat(igcdex);.

Thumb if You like.

Did You isolve?

subs(isolve(5*x + 3*y = 100), [x, y]);

use it to make a list of points for pointplot:

map(unapply(%, _Z1), [$-10..10])
plots[pointplot](%);


Thumb if You like.

Have You tried:

radnormal(maple_sol);


Thumb if You like.

p(x,y);
D[2](p)(x,h)=0;

  restart;
  with(plots);

Plotter:= proc(_a := 10,  _b := 7, _phi := 4/5*Pi)
  local O, a, b, P, Q, M, X, Y, phi, c, Ell, vec, F1, F2, F1F2, ELL, Hyp, dF1, dF2, cir1, cir2, asym1, asym2, tp, range0, range1;

  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)));
  a:=_a;
  b:=_b;
  phi:=_phi;
  c := sqrt(a^2 - b^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;;
  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);

  range0 := -20 .. 20, -20 .. 20;
  range1 := x = range0[1], y = range0[2];

  P := plots:-implicitplot(eval(P), range1, color = aquamarine);
  Q := plots:-implicitplot(eval(Q), range1);
  F1 := [(a + b)*cos(phi), (a + b)*sin(phi)];
  F2 := [2*M[1] - F1[1], 2*M[2] - F1[2]];
  F1F2 := plot(eval([F1, F2]), color = green, thickness = 3);
  ELL := plots:-implicitplot(eval(((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), range1, 
  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, range1, 
  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]);
end;

plots[display](seq(Plotter(10, 7, alpha), alpha = 0.1 .. evalf(2*Pi), 0.1), insequence = true);

Thumb if You like.

Please post code in text or worksheet form, rather than printouts.

  restart;
  P := -lambda*exp(-Phi(xi)) - mu*exp(Phi(xi));
  u[0] := A[0] + A[1]*exp(-Phi(xi)) + A[2]*exp(-Phi(xi))*exp(-Phi(xi));
  u[1] := diff(u[0], xi);
  d[1] := -A[1]*P*exp(-Phi(xi)) - 2*A[2]*(exp(-Phi(xi)))^2*P;
  u[2] := diff(d[1], xi);
  d[2] := -A[1]*(lambda*P*exp(-Phi(xi)) - mu*P*exp(Phi(xi)))*exp(-Phi(xi))
   + A[1]*(-lambda*exp(-Phi(xi)) - mu*exp(Phi(xi)))*P*exp(-Phi(xi))
   + 4*A[2]*(exp(-Phi(xi)))^2*(-lambda*exp(-Phi(xi)) - mu*exp(Phi(xi)))*P
   - 2*A[2]*(exp(-Phi(xi)))^2*(lambda*P*exp(-Phi(xi)) - mu*P*exp(Phi(xi)));
  collect(
  expand(2*k*k*w*beta*d[2] - 2*alpha*k*k*d[1] - 2*w*u[0] + k*u[0]*u[0]), 
  exp(Phi(xi)));

  restart;
  solve({12*beta*k^2*lambda^2*w*A[2] + k*A[2]^2, 
  4*beta*k^2*lambda^2*w*A[1] - 4*alpha*k^2*lambda*A[2] + 2*k*A[1]*A[2], 
  4*beta*k^2*mu^2*w*A[2] - 2*alpha*k^2*mu*A[1] + k*A[0]^2 - 2*w*A[0], 
  4*beta*k^2*lambda*mu*w*A[1] - 4*alpha*k^2*mu*A[2] + 2*k*A[0]*A[1] - 2*w*A[1], 16*beta*
  k^2*lambda*mu*w*A[2] - 2*alpha*k^2*lambda*A[1] + 2*k*A[0]*A[2] + k*A[1]^2
   - 2*w*A[2]}, {A[0], A[1], A[2], k, w});
  set__1;
  {A[0] = (RootOf(100*_Z^2*lambda*mu + 1)*alpha)/(2*beta*RootOf(24*_Z^2*beta*
  lambda*mu - 1)), 
  A[1] = (alpha)/(10*beta*mu*RootOf(24*_Z^2*beta*lambda*mu - 1)), A[2] = -12*
  RootOf(24*_Z^2*beta*lambda*mu - 1)*lambda^2*RootOf(100*_Z^2*lambda*mu + 1)*
  alpha, k = RootOf(24*_Z^2*beta*lambda*mu - 1), 
  w = (RootOf(100*_Z^2*lambda*mu + 1)*alpha)/(beta)};

  restart;
  solve({24*Z^2*beta*lambda*mu - 1}, {Z});
  solve({100*Z^2*lambda*mu + 1}, {Z});

  restart;
  k := (sqrt(6))/(12*sqrt(beta*lambda*mu));
  w := - (alpha)/(10*sqrt(-lambda*mu)*beta);
  A[0] := - (3*alpha*sqrt(beta*lambda*mu))/(5*sqrt(-lambda*mu)*beta*sqrt(6));
  A[1] := (6*alpha*sqrt(beta*lambda*mu))/(5*beta*mu*sqrt(6));
  A[2] := (sqrt(6)*lambda^2*alpha)/(10*sqrt(beta*lambda*mu)*sqrt(-lambda*mu));
  lambda := 3;
  mu := 2;
  H := -ln(sqrt((lambda)/(mu))*tan(sqrt(lambda*mu)*(xi + C)));
  u[0] := A[0] + A[1]*exp(-H) + A[2]*exp(-H)*exp(-H);
  f := diff(u[0], xi);
  S := diff(f, xi);
  eq := 2*k*k*w*beta*S - 2*alpha*k*k*f - 2*w*u[0] + k*u[0]*u[0];
  value(%);
  simplify(%);

I think you can identify the tick values yourself. Instead of using integer values maybe convert them to string first?

This is not a problem with seq, but a problem with dsolve result. It is apparent it contains the original variable t, which is later affected. Use this for fix:
my_x:=subs(t=_t, eval(x, dsol));

Thumb if You like.

The condition is always satisifed.

vars:=[x,y,z];
for invars in vars do
[cat(invars, 1..nops(vars))]
end do;

or

for invars in vars do
[(n->n||(1..nops(vars)))(invars)]
end do;

or

(n->n||(1..nops(vars)))~(vars) 

Thumb if You like.

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