vv

13118 Reputation

20 Badges

9 years, 72 days

MaplePrimes Activity


These are answers submitted by vv

The equivalence is logical equivalence indeed. For the simple expression q := (x[1] &or x[2]) &and x[3],  the only nonidentical permutation is f defined by f(x1)=x2, f(x2)=x1, f(x3)=x3 [so, f(not x1) = not x2 etc].

As the help file (and  Christian Wolinski) says, the expression must be in CNF form. It is strange that Normalize (recommended in the help) does not work and we must use Canonicalize:

with(Logic);
q := (x[1] &or x[2]) &and x[3];
qn := Normalize(q, form=CNF);                       # wrong!
qn := Canonicalize(q, {x[1],x[2],x[3]}, form=CNF);  # ok
G, L := SymmetryGroup(qn, output = [group, expressions]);
#g1, g2 := Generators(G)[];
GroupOrder(G);  # 2,  ok

 

Here `O` is simply a local variable lost from some procedure and landed at top level, due to a bug.

According to a well known theorem, the Invariance of domain, an interval such as (380,780) cannot be homeomorphic to  (0,1)^3, so, a correspondence between WaveLength and (r,g,b) will be always problematic.

Pn := [ (5*X + 12*Y)*(-384 + 48*X + 55*Y)/(225*X^2 + 225*Y^2 - 1800*X - 602*Y),
         2*(12*X - 5*Y)*(-384 + 48*X + 55*Y)/(225*X^2 + 225*Y^2 - 1800*X - 602*Y)]:

(x,y) =~ Pn[]

x = (5*X+12*Y)*(-384+48*X+55*Y)/(225*X^2+225*Y^2-1800*X-602*Y), y = 2*(12*X-5*Y)*(-384+48*X+55*Y)/(225*X^2+225*Y^2-1800*X-602*Y)

(1)

eliminate( {%, Y= 2+3*X}, {X,Y})

[{X = (4/3)*(38274*x+38914*y-126451)/(30102*x-25053*y-131066), Y = -(213300*x+105550*y-767936)/(-30102*x+25053*y+131066)}, {738*x^2+2133*x*y+1240*y^2-2952*x-8173*y}]

(2)

conic:=%[-1][];

738*x^2+2133*x*y+1240*y^2-2952*x-8173*y

(3)

plots:-implicitplot(conic, x=-30..30,y=-30..30);

 

 


Download conic.mw

B:=<0,-2,1;-1,0,0;-2,0,0>; A:=B+1;

Matrix(3, 3, {(1, 1) = 0, (1, 2) = -2, (1, 3) = 1, (2, 1) = -1, (2, 2) = 0, (2, 3) = 0, (3, 1) = -2, (3, 2) = 0, (3, 3) = 0})

 

Matrix(%id = 18446745955451478974)

(1)

# By hand:

B^2,B^3

Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 2, (2, 3) = -1, (3, 1) = 0, (3, 2) = 4, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0})

(2)

1 + n*B + binomial(n,2)*B^2:  'A'^n = expand~(%)

A^n = (Matrix(3, 3, {(1, 1) = 1, (1, 2) = -2*n, (1, 3) = n, (2, 1) = -n, (2, 2) = n^2-n+1, (2, 3) = -(1/2)*n^2+(1/2)*n, (3, 1) = -2*n, (3, 2) = 2*n^2-2*n, (3, 3) = -n^2+n+1}))

(3)
   

# By Maple:

LinearAlgebra:-MatrixPower(A, n);

Matrix(3, 3, {(1, 1) = 1, (1, 2) = -2*n, (1, 3) = n, (2, 1) = -n, (2, 2) = n^2-n+1, (2, 3) = -(1/2)*n^2+(1/2)*n, (3, 1) = -2*n, (3, 2) = 2*n^2-2*n, (3, 3) = -n^2+n+1})

(4)

 

S:=Sum(Sum( a^2*b^2/sinh(Pi*(a+b))*(-1)^(a+b),  a=1..infinity), b=1..infinity);
# The double series converges very fast!

Sum(Sum(a^2*b^2*(-1)^(a+b)/sinh(Pi*(a+b)), a = 1 .. infinity), b = 1 .. infinity)

(1)

evalf[30](S);

0.265258238486492226281472938954e-2

(2)

S=identify(%);

Sum(Sum(a^2*b^2*(-1)^(a+b)/sinh(Pi*(a+b)), a = 1 .. infinity), b = 1 .. infinity) = (1/120)/Pi

(3)

# The equality holds but the proof is to be found!


 

str:="(1/(2^
       j) ((k*Gamma[5 + 2 j] Gamma[
          1 + l] HypergeometricPFQ[{1, 5/2 + j, 3 + j}, {3 + j + l/2,
           7/2 + j + l/2}, -1])/
       Gamma[6 + 2 j +
         l] + ((k + m) Gamma[7 + 2 j] Gamma[
          1 + l] HypergeometricPFQ[{1, 7/2 + j, 4 + j}, {4 + j + l/2,
           9/2 + j + l/2}, -1])/Gamma[8 + 2 j + l]))/(2^(-5 - 3 j -
       l) Gamma[5 + 2 j] Gamma[
     1 + l] (k HypergeometricPFQRegularized[{1, 5/2 + j,
         3 + j}, {3 + j + l/2, 7/2 + j + l/2}, -1] +
      1/2 (3 + j) (5 + 2 j) (k + m) HypergeometricPFQRegularized[{1,
         7/2 + j, 4 + j}, {4 + j + l/2, 9/2 + j + l/2}, -1]))";

"(1/(2^
       j) ((k*Gamma[5 + 2 j] Gamma[
          1 + l] HypergeometricPFQ[{1, 5/2 + j, 3 + j}, {3 + j + l/2, 
           7/2 + j + l/2}, -1])/
       Gamma[6 + 2 j + 
         l] + ((k + m) Gamma[7 + 2 j] Gamma[
          1 + l] HypergeometricPFQ[{1, 7/2 + j, 4 + j}, {4 + j + l/2, 
           9/2 + j + l/2}, -1])/Gamma[8 + 2 j + l]))/(2^(-5 - 3 j - 
       l) Gamma[5 + 2 j] Gamma[
     1 + l] (k HypergeometricPFQRegularized[{1, 5/2 + j, 
         3 + j}, {3 + j + l/2, 7/2 + j + l/2}, -1] + 
      1/2 (3 + j) (5 + 2 j) (k + m) HypergeometricPFQRegularized[{1, 
         7/2 + j, 4 + j}, {4 + j + l/2, 9/2 + j + l/2}, -1]))"

(1)

ex:=convert(str, FromMma);

(k*GAMMA(5+2*j)*GAMMA(1+l)*hypergeom([1, 5/2+j, 3+j], [3+j+(1/2)*l, 7/2+j+(1/2)*l], -1)/GAMMA(6+2*j+l)+(k+m)*GAMMA(7+2*j)*GAMMA(1+l)*hypergeom([1, 7/2+j, 4+j], [4+j+(1/2)*l, 9/2+j+(1/2)*l], -1)/GAMMA(8+2*j+l))/(2^j*2^(-5-3*j-l)*GAMMA(5+2*j)*GAMMA(1+l)*(k*hypergeom([1, 5/2+j, 3+j], [3+j+(1/2)*l, 7/2+j+(1/2)*l], -1)/(GAMMA(3+j+(1/2)*l)*GAMMA(7/2+j+(1/2)*l))+(1/2)*(3+j)*(5+2*j)*(k+m)*hypergeom([1, 7/2+j, 4+j], [4+j+(1/2)*l, 9/2+j+(1/2)*l], -1)/(GAMMA(4+j+(1/2)*l)*GAMMA(9/2+j+(1/2)*l))))

(2)

simplify(ex);

Pi^(1/2)

(3)

Download sqrtPi.mw

For a surface with color=red, the color of the interior of the polygons is red and the color of their borders is black.

But in your case, the surface is actually a curve (it does not depend on c), so the area of each polygon is zero! Hence, the color reduces to black 

You are using interface(prettyprint=0). To get rid of those Typesetting:-mprintslash, use at the beginning:

interface(typesetting=standard);

Note first that the maxima/minima can be found directly using the command  extrema:

 

F:=x^2-2*x*y+2*y^2-12;

x^2-2*x*y+2*y^2-12

(1)

extrema(x, {F}, {x,y}, 'Sx');  # min x   and  max x

{-2*6^(1/2), 2*6^(1/2)}

(2)

Sx;

{{x = -2*6^(1/2), y = -6^(1/2)}, {x = 2*6^(1/2), y = 6^(1/2)}}

(3)

extrema(y, {F}, {x,y}, 'Sy');  # min y   and  max y

{-2*3^(1/2), 2*3^(1/2)}

(4)

Sy;

{{x = -2*3^(1/2), y = -2*3^(1/2)}, {x = 2*3^(1/2), y = 2*3^(1/2)}}

(5)

 

 

Now, if you want the math details and use the implicit function theory,

then dy/dx equals indeed   (x-y)/(x-2*y);  you can use

 

 

dydx:=implicitdiff(F,y,x)

(-x+y)/(-x+2*y)

(6)

Then you have to solve the system  {F=0,  dydx=0}.  

solve({F=0,  dydx=0}, explicit);

{x = 2*3^(1/2), y = 2*3^(1/2)}, {x = -2*3^(1/2), y = -2*3^(1/2)}

(7)

Similarly for y (i.e. dx/dy=0).

 

You may use (9)  in your worksheet only to check that the solutions correspond to min/max rather than inflexion points.

 

You may use:

Matrix(2,2, (i,j)-> undefined);

 

An irreducible polynomial f with integer coefficients cannot have both sqrt(2) and sqrt(3) as roots!
(Because f would be divisible by the minimal poynomials).

restart;

X:=cos(3*t); Y:=sin(t);

cos(3*t)

 

sin(t)

(1)

plot([X,Y, t=-0..2*Pi]);

 

 

ARG_RADIUS:=proc(X,Y,t)
  local a,r,sol;
  sol := dsolve([
    diff(r(t)*cos(a(t)),t)=diff(X,t),  diff(r(t)*sin(a(t)),t)=diff(Y,t),
    r(0)=eval(sqrt(X^2+Y^2),t=0), a(0)=arctan(eval(Y,t=0),eval(X,t=0))
    ],  numeric, output=operator);
  eval((a,r)[],sol)
end:

A,R := ARG_RADIUS(X,Y,t):

plot(arctan(Y,X), t=0..2*Pi, discont);

 

plot(A, 0..2*Pi);  # continuous arctan

 

plot([R(t)*cos(A(t)), R(t)*sin(A(t)), t=0..2*Pi]); # Lissajous (check)

 

 

Download ARG-cont.mw

It seems you want to solve the PDE  u=0. Then:

pdsolve(u);

            f = _F1(x)*_F2(y)*_F3(z)*_F4(t), [_F1(x), _F2(y), _F3(z), _F4(t), ` are arbitrary functions.`]

Unfortunately this is not the general solution. For example   f = _F1(x) + _F4(t)   is a solution too.

Cannot be verified by Maple!

 

We must first define correctly the problem.

The equation contains two antiderivatives, so both contain an additive constant.

The only possibility is to consider that we accept some pair of constants
(for arbitrary constants, the equation cannot have solutions).
But in this case, Maple cannot verify a solution because it would imply to choose a convenient pair of constants.


Let's take a simple example (which actually dsolve refuses to solve because it does not contain a derivative).

 

int(y(x), x) + int(y(x)^2, x) - 1 = 0.

 

Applying diff ==>  y(x) + y(x)^2 = 0 ==>  y(x)=0  and  y(x)=-1.

y(x) = -1  ==>  -x + C1  +  x + C2 - 1 = 0, so we must have  C1+C2=1.

The same for y(x)=0. So, there are two solutions, but the integration constants have to be chosen carefully.

 

 

Other examples.

 

restart;

eq1:=int(diff(y(x),x)*x,x)+int(y(x),x) = 0;

int((diff(y(x), x))*x, x)+int(y(x), x) = 0

(1)

sol1:=dsolve(eq1);

y(x) = _C1/x

(2)

eq2:=int(diff(y(x),x)*x,x)+int(y(x),x) +1 = 0;

int((diff(y(x), x))*x, x)+int(y(x), x)+1 = 0

(3)

dsolve(eq2);

odetest(sol1, eq1)

0

(4)

So, no solution for eq2, but y(x) = _C1/x  is a solution  if we choose the constants of integration satisfying C1+C2 = -1.

eq1 works just because the int computed by Maple have (by chance) convenient constants.

 

 

 

 

First 8 9 10 11 12 13 14 Last Page 10 of 116