vv

13805 Reputation

20 Badges

9 years, 312 days

MaplePrimes Activity


These are answers submitted by vv

Try  (*.mw, not *.mpl):

interface(worksheetdir);

 

 1/(1 - x*y) = Sum( (x*y)^k, k=0 .. infinity );
Applying the double integral over (0,1)^2 implies (by monotone convergence):
 Int( 1/(1 - x*y), x=0..1, y=0..1 ) = Sum( 1/k^2, k =1 .. infinity );
==>  Int( 1/(1 - x*y), x=0..1, y=0..1 ) = Pi^2 / 6.

You have to use LinearAlgebra[Modular]:

restart
A:=Matrix(9,[
0,0,0,-1,1,-1,-1,0,0,
0,-1,0,1,-1,1,0,-1,-1,
0,0,-1,0,0,0,1,1,0,
0,1,0,-1,-1,1,-1,-1,0,
0,0,0,0,0,-1,1,0,-1,
0,0,0,0,0,-1,0,1,1,
0,0,1,-1,1,1,-1,-1,0,
0,0,0,0,0,1,1,-1,0,
0,0,0,0,0,0,0,0,0], datatype=integer[8]):
with(LinearAlgebra[Modular]):
Rank(3,A);
#                               7
B := Copy(3,A):
RowReduce(3,B,9,9,9,'det',0,'rank',0,0,true): B;

            

 

Edit. To obtain a basis for the nullspace explicitly, it is better to use:

with(LinearAlgebra[Modular]):
A1 := Copy(3,A):
r:=MatBasis(3, A1, 9, true): r,A1;
colonbasis, nullspacebasis:= A1[1..r, ..], A1[r+1.., ..];
colonbasis . nullspacebasis^+  mod 3; # check (==> 0 matrix)

OK, I'll take Z(t) = exp(int(y(u),u=0..t))

restart
eq1 := diff(x(t), t)-(1/6)*(6*x(t)^3*y(t)+(2*y(t)^2-2)*x(t)^2+3*y(t)*(z(t)-2)*x(t)-2*y(t)^2+2)*sqrt(3) = 0;
eq2 := diff(y(t), t)-(1/6)*(y(t)-1)*sqrt(3)*(y(t)+1)*(6*x(t)^2+2*y(t)*x(t)+3*z(t)-2) = 0;
eq3 := diff(z(t), t)-(1/3)*z(t)*sqrt(3)*(6*y(t)*x(t)^2+2*x(t)*y(t)^2+3*z(t)*y(t)-2*x(t)-3*y(t)) = 0;
eq4 := diff(s(t), t)-(1/3)*(y(t)-1)*sqrt(3)*(y(t)+1)*(6*x(t)^2+2*y(t)*x(t)+3*z(t)-2)*y(t) = 0;
eq5 := diff(Q(t), t)+sqrt(3)*((4/3-z(t)-2*x(t)^2)*y(t)+(2/3*(1-y(t)^2))*x(t))*Q(t)+2*((2/3)*y(t)+x(t))*P(t)/sqrt(3)-(2/3)*R(t) = 0;   
eq6 := diff(P(t), t)+(sqrt(3)*(1-z(t)-2*x(t)^2)*y(t)+2*(2-y(t)^2)*x(t)/sqrt(3))*P(t)+2*sqrt(3)*x(t)*Q(t)+(1/2)*R(t) = 0;       
eq7 := diff(R(t), t)-sqrt(3)*((3*x(t)^2+(3/2)*z(t)+4)*y(t)-(1/3*(1-3*y(t)^2))*x(t))*R(t)-z(t)*P(t) = 0;
eq8 := diff(T(t), t)-sqrt(3)*((6*x(t)^2+3*z(t)+1)*y(t)-(2*(1-y(t)^2))*x(t))*T(t)-(1-y(t)^2)*(Q(t)-(2/3)*P(t)) = 0;   

eq9 := diff(Z(t), t) = Z(t)*y(t);
syst := eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9;
ics := x(0) = .1, y(0) = .9, z(0) = .1, s(0) = .2, Q(0) = .1, P(0) = .9, R(0) = .1, T(0) = .2,  Z(0)=1;
sol1 := dsolve({ics, syst}, {P(t), Q(t), R(t), T(t), s(t), x(t), y(t), z(t), Z(t)}, type = numeric, output = operator);
sol1(0.5);
plots:-odeplot(sol1, [[t, y(t)], [t,Z(t)]], t=0..1, title="y and Z");
plots:-odeplot(sol1, [Z(t), y(t)], t=0..1, title="y vs Z");

      

Take the origin at A. Then the area a(t) of the triangle ABC is the absolute value of the determinant of <B,C>, so a(t) = |m t + n|.

We have a(0) = 2, a(5) = 3, a(10) = ?.
a(0)=2 implies n=±2, and a(5)=3 implies 5m+n=±3 so, a(10) = |10m+n| = |-n±6| = |n±6| ∈ {4,8}.

restart;
A := t->[a,sA+vA*t]: B := t->[b,sB+vB*t]: C := t->[c,sC+vC*t]:
area:= t->abs(LinearAlgebra:-Determinant(Matrix([[A(t)[],1],[B(t)[],1],[C(t)[],1]])))/2:
sols := solve([area(0)=2, area(5)=3, area(10)=AREA]):
AREA in {seq}( eval(AREA, sol), sol=sols);

                AREA  ∈  {4, 8}

(so, 2 solutions, AREA=4 and AREA=8).
Nice problem BTW.

p:=unapply(LinearAlgebra:-CharacteristicPolynomial(A,x), x):
[seq]( simplify(p(evstheory[i])), i=1 .. L^2); nops(%);

        [0, 0, ... , 0]
        81

but very SLOW!

Just the limit (it can be obtained at once).
Let A,B,C be consecutive vertices and M,N the midpoints of AB, BC.
For n --> oo, angle(ABC) --> Pi, so AC --> 2AB = 2 and MN = AC /2 --> 1.

Nice problem.

Conside the cube having lattice vertices  (x,y,z), with x,y,z in {0,1}.
We decompose the cube in six pyramids having a vertex in P(a,b,c) 
and the bases formed by the faces of the cube.
Denote by d1,...,d6 the distances from P to the six faces.
Then d1 + ... + d6 = 1+1+1 = 3 and
d1/1 = d2/3 = ... = d6/6 = (d1+ ... +d6)/(1+ ... +6) = 3/21 = 1/7.
So, {d1,...,d6} = {1/7, 2/7, 3/7, 4/7, 5/7, 6/7}.
Then the desired vertex is P(1/7,2/7,3/7}  
(because (1-1/7, 1-2/7, 1-3/7}= {4/7, 5/7, 6/7}).

P.S. All your proposed problems are nice but not very suitable to be solved
with Maple. Nice problems for a CAS can be found in:

Eilers S., Johansen R. - Introduction to Experimental Mathematics. CUP, 2017.

x*t is not a subexpression (operand of any level) in L. Use:

algsubs(x*t = Y, L)

 

dsolve( diff(y(x),x) = (x+y(x))/(y(x) - 3));

      -(1/2)*ln(-((x+3)^2-(x+3)*(3-y(x))-(3-y(x))^2)/(x+3)^2)-(1/5)*sqrt(5)*arctanh((9-2*y(x)+x)*sqrt(5)/(5*(x+3)))-ln(x+3)-_C1 = 0

You may append explicit, for an explicit solution.

restart

Find the radii of the two congruent circles below. ABC is a right angle.

# Denote by r the radius and P,Q the centers of the circles. We choose:

A:=[0, 0]: C:=[b, 0]: B:=[c^2/b, a*c/b]:

P:=[p, r]: Q:=[p+2*r, r]:

# AB: y = a/c * x ==>
AB := a*x - c*y: #( = 0)

# BC: y-0 = -c/a*(x-b) ==>
BC := c*x +a*y-c*b: #( = 0)

# dist(P,AB)=r ==>
eval(AB, [x,y]=~P)/b = r:

# dist(Q,BC) = r ==>
eval(BC, [x,y]=~Q)/b = -r:

ans:=solve([%,%%],{p,r}):

simplify(ans, [b^2 = c^2+a^2]);

{p = c*(a^2+b*c+c^2)/((a+c)*(a+b+c)), r = a*b*c/((a+c)*(a+b+c))}

(1)

 

Download geom-vv.mw

The _symbols must be avoided as the documentation says.
After substituting _xxx with XXX, ==>

Error, (in tools/map) time expired
(as expected).

restart;

 

Unfortunately, we have to help and push Maple to prove that

 

( (a*b)! / (a! * (b!)^a) ) ::integer assuming posint;

(factorial(a*b)/(factorial(a)*factorial(b)^a))::integer

(1)

f:=(a,b)->(a*b)! / (a! * (b!)^a):

Using Legendre's formula  it is enough to prove that

g(a,b,q) >=0 assuming posint:

# where:

g:=(a,b,q) -> floor(a*b/q) - floor(a/q) - a*floor(b/q);

proc (a, b, q) options operator, arrow; floor(a*b/q)-floor(a/q)-a*floor(b/q) end proc

(2)

g(a, b-q, q) - g(a, b, q);
expand(%) assuming posint

floor(a*(b+q)/q)-a*floor((b+q)/q)-floor(a*b/q)+a*floor(b/q)

 

0

(3)

So, we may assume b<q.

 

Q := simplify(g(a,b,q)) assuming posint, b/q<1;

floor(a*b/q)-floor(a/q)

(4)

is(a*b/q >= a/q) assuming posint

true

(5)

is(Q>=0) assuming positive, a*b/q >= a/q;

FAIL

(6)

is(floor(y)-floor(x) >=0 ) assuming x<=y;

true

(7)

# Q.E.D.


Download Legandre.mw

restart;
primes := [seq(ithprime(i), i = 1 .. 20)];
with(combinat):
comb:= choose(primes, 6):
# primes := [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]

IsTetra:=proc(L::[posint,posint,posint,posint,posint,posint])
  local d:=Matrix(4, {(1,2)=L[1], (1,3)=L[2], (2,3)=L[3], (1,4)=L[4], (2,4)=L[5], (3,4)=L[6]}, shape='symmetric');
  Matrix(3, (i,j)-> d[4,i]^2+d[4,j]^2-d[i,j]^2);  # Schoenberg
  LinearAlgebra:-IsDefinite(%, query = 'positive_definite')
end proc:
nops(comb);
#                             38760

n:=0:
for L in comb do
  if IsTetra(L) then 
     n++; print(L); if n>=10 then break fi; 
  fi:
od:

                    [3, 17, 19, 41, 43, 47]
                    [3, 29, 31, 41, 43, 47]
                    [3, 29, 31, 41, 43, 53]
                    [3, 29, 31, 59, 61, 67]
                    [3, 41, 43, 59, 61, 67]
                    [3, 41, 43, 59, 61, 71]
                    [5, 11, 13, 17, 19, 23]
                    [5, 11, 13, 29, 31, 37]
                    [5, 11, 13, 37, 41, 43]
                    [5, 11, 13, 41, 43, 47]

P.S. If for a tetrahedron ABCD you prefer the order of the edges [ DA, DB, DC, BC, CA, AB ], then please replace in the code:

d:=Matrix(4, {(4,1)=L[1], (4,2)=L[2], (4,3)=L[3], (2,3)=L[4], (3,1)=L[5], (1,2)=L[6]}, shape='symmetric');

 

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