vv

13405 Reputation

20 Badges

9 years, 146 days

MaplePrimes Activity


These are answers submitted by vv

Maple has not a package for abstract symbolic linear algebra, i.e. the matrices must have numeric dimensions.
Even so, it will be possible to see how your problem must be "attacked".
The idea is to choose matrices as below.

X commutes with A, so Z must be zero.
It follows that a[5,3] = 0  and a[3,3] = a[5,5] .
But instead of the indices 3 and 5 we may take any i,j with i<>j.
So, A must be a multiple of the identity matrix.
Of course the same method works for matrices of any dimension.

restart;
P:=combinat:-permute([seq](0..9),6): # nops(%);
for L in P do
  n:=parse(cat(L[]));
  ok:=true;
  for k from 2 to 6 do
    n1:=n*k;
    L1:=convert(n1,base,10):
    if {L[]} <> {L1[]} then ok:=false; break fi;
  od;
if ok then print(n, x23456=[seq(k*n,k=2..6)]) fi;
od:

       142857, x23456 = [285714, 428571, 571428, 714285, 857142]

restart;
xn := n-> n^2-(2*n-1)/2: yn:= n -> (2*n-1)*sqrt(3)/2:
Y:=combine(eval(yn(n), n = solve(x=xn(n),n)[1]));
p:=plot([seq]([[(n-1)^2,0], [n^2,0], [xn(n),yn(n)], [(n-1)^2,0]][], n=1..5)):
plots:-display(plot(Y, x=1/2..25), p, scaling=constrained);

                         Y := sqrt(-3 + 12*x)/2

Your function f = x^2 /(x-a)  has a singularity at x=a and the definite integral of f over an interval does not exist when a is in the interior  of this interval. 

The antiderivative int(f, x) also exists only in intervals not containing a.

As well known, mathematically, Dirac is not a function, it is a distribution. But in Maple, it is also seen somtimes (when not subject to special transforms e.g. Fourier) as a "regular" function, Dirac(t) which is 0 for t<>0 and not defined for t=0.

The limit of such function ia always 0 at t=0. So, the limit in your expression is correct.

Of course you may use:

limit( eval(expr, Dirac(t)=Dirac(0), t=0 );

useful e.g. for  expr := sin(t)/t + C*Dirac(t)
 

The Physics Updates are experimental.
You should mention that without the updates your code works just fine.

The proof is simple. If f : RR,  f(x) = cos (ax) + cos x would have period p, then f(p) = f(0), so, cos (ap)=1,  cos (p)=1.
This implies ap = 2mπ, p = 2nπ, (m,n ∈ Z), whence a = m/n ∈ Q, contradiction, q.e.d.
I don't think a graphical proof exists.

Here is a really counterintuitive fact: the identity function  x ↦ x on can be written as a sum of two periodic functions!

Edit: corrected π/2 + 2mπ  by  2mπ and π/2 + 2nπ  by  2nπ.

It will be enough to choose a set of 10 points as below.

restart
#    1
#   2 3
#  4 5 6
# 7 8 9 0
tri := 123,245,253,356,478,485,589,596,690,  146,279,380,  286,493,  170:
tri:=eval(convert~([tri],base, 10),0=10); # the triangles; one of them should be monochromatic
# tri := [[3, 2, 1], [5, 4, 2], [3, 5, 2], [6, 5, 3], [8, 7, 4], 
#   [5, 8, 4], [9, 8, 5], [6, 9, 5], [10, 9, 6], [6, 4, 1], [9, 7, 2], [10, 8, 3], [6, 8, 2], [3, 9, 4], [10, 7, 1]]

#tri:=remove(has, tri, 1); #### remove vertex 1 for testing ####
P:=combinat:-permute([0$10,1$10],10):nops(P): #all possible colorings (brute force)
for p in P do
  ok := false;
  for t in tri do
    if p[t[1]]=p[t[2]] and p[t[1]]=p[t[3]] then ok:=true; break fi
  od;
  if not ok then print("color_counterex"=p); break fi;
od:
if ok then print("OK!") fi;

                             "OK!"

# When testing (uncomment tri:= remove(...)) ==> "color_counterex" = [0,0,0,1,1,1,1,0,0,1]
 

latex(``* e, 'output'='string')

Int(1/( (a^2+x^2)^(3/2) * x ), x=0..infinity):
% = value(%) assuming a>0;

Int(1/((a^2+x^2)^(3/2)*x), x = 0 .. infinity) = infinity

(1)

You probably want:

 

Int(1/( (a^2+x^2)^(3/2) ) * x, x=0..infinity):
% = simplify(value(%)) assuming a>0;

Int(x/(a^2+x^2)^(3/2), x = 0 .. infinity) = 1/a

(2)

A smaller degree system but with 7 equations

 

restart;

> #

with(RootFinding):

b := [114.069^2, 109.2389^2, 103.892^2, 99.76348^2, 97.24296^2];
b := floor~(b);  # optional
f := [x1^2+x2^2+x3^2+2*(x1*x2*cos(x4)+x2*x3*cos(x5)+x1*x3*cos(x4+x5))-b[1],
      x1^2+x2^2+x3^2+2*(x1*x2*cos(2*x4)+x2*x3*cos(2*x5)+x1*x3*cos(2*(x4+x5)))-b[2],
      x1^2+x2^2+x3^2+2*(x1*x2*cos(3*x4)+x2*x3*cos(3*x5)+x1*x3*cos(3*(x4+x5)))-b[3],
      x1^2+x2^2+x3^2+2*(x1*x2*cos(4*x4)+x2*x3*cos(4*x5)+x1*x3*cos(4*(x4+x5)))-b[4],
      x1^2+x2^2+x3^2+2*(x1*x2*cos(5*x4)+x2*x3*cos(5*x5)+x1*x3*cos(5*(x4+x5)))-b[5] ]:

[13011.73676, 11933.13727, 10793.54766, 9952.751942, 9456.193270]

 

[13011, 11933, 10793, 9952, 9456]

(1)

F:=[ eval( expand(f), [cos(x4)=x4, cos(x5)=x5, sin(x4)=y4, sin(x5)=y5] )[],
    x4^2+y4^2-1, x5^2+y5^2-1];

[2*x1*x3*x4*x5-2*x1*x3*y4*y5+2*x1*x2*x4+2*x2*x3*x5+x1^2+x2^2+x3^2-13011, 8*x1*x3*x4^2*x5^2-8*x1*x3*x4*x5*y4*y5+4*x1*x2*x4^2-4*x1*x3*x4^2-4*x1*x3*x5^2+4*x2*x3*x5^2+x1^2-2*x1*x2+2*x1*x3+x2^2-2*x2*x3+x3^2-11933, 32*x1*x3*x4^3*x5^3-32*x1*x3*x4^2*x5^2*y4*y5-24*x1*x3*x4^3*x5+8*x1*x3*x4^2*y4*y5-24*x1*x3*x4*x5^3+8*x1*x3*x5^2*y4*y5+8*x1*x2*x4^3+8*x2*x3*x5^3+18*x1*x3*x4*x5-2*x1*x3*y4*y5-6*x1*x2*x4-6*x2*x3*x5+x1^2+x2^2+x3^2-10793, 128*x1*x3*x4^4*x5^4-128*x1*x3*x4^3*x5^3*y4*y5-128*x1*x3*x4^4*x5^2+64*x1*x3*x4^3*x5*y4*y5-128*x1*x3*x4^2*x5^4+64*x1*x3*x4*x5^3*y4*y5+16*x1*x2*x4^4+16*x1*x3*x4^4+128*x1*x3*x4^2*x5^2-32*x1*x3*x4*x5*y4*y5+16*x1*x3*x5^4+16*x2*x3*x5^4-16*x1*x2*x4^2-16*x1*x3*x4^2-16*x1*x3*x5^2-16*x2*x3*x5^2+x1^2+2*x1*x2+2*x1*x3+x2^2+2*x2*x3+x3^2-9952, 512*x1*x3*x4^5*x5^5-512*x1*x3*x4^4*x5^4*y4*y5-640*x1*x3*x4^5*x5^3+384*x1*x3*x4^4*x5^2*y4*y5-640*x1*x3*x4^3*x5^5+384*x1*x3*x4^2*x5^4*y4*y5+160*x1*x3*x4^5*x5-32*x1*x3*x4^4*y4*y5+800*x1*x3*x4^3*x5^3-288*x1*x3*x4^2*x5^2*y4*y5+160*x1*x3*x4*x5^5-32*x1*x3*x5^4*y4*y5+32*x1*x2*x4^5+32*x2*x3*x5^5-200*x1*x3*x4^3*x5+24*x1*x3*x4^2*y4*y5-200*x1*x3*x4*x5^3+24*x1*x3*x5^2*y4*y5-40*x1*x2*x4^3-40*x2*x3*x5^3+50*x1*x3*x4*x5-2*x1*x3*y4*y5+10*x1*x2*x4+10*x2*x3*x5+x1^2+x2^2+x3^2-9456, x4^2+y4^2-1, x5^2+y5^2-1]

(2)

Groebner:-IsProper(F);          # ==> true i.e. the system is compatible

true

(3)

Groebner:-IsZeroDimensional(F); # --> true i.e. finite number of solutions

true

(4)

#Groebner:-Basis(F, tdeg(x1,x2,x3,x4,x5,y4,y5));

Groebner:-SuggestVariableOrder(F);

y5, y4, x3, x2, x1, x5, x4

(5)

G:=Groebner:-Basis(F, tdeg(y5, y4, x3, x2, x1, x5, x4));

`[Length of output exceeds limit of 1000000]`

(6)

Probably a plex basis is also doable but larger.

 

nops(G)

292

(7)

 

Probably "it's a shame" is not the best formulation.

restart;

gA:=x->mA*x+nA: gB:=x->mB*x+nB: gC:=x->mC*x+nC:

Oa:= xa,ya : Ob:= xb,yb : Oc:= xc,yc :

det:=LinearAlgebra:-Determinant:

Numeric:=NULL:

# numeric (optional)
xa:=1: xb:=4: xc:=8: ya:=0: yb:=0: yc:=0:
mA:=2: mB:=-3: mC:=-1: nA:=4: nB:=-3: nC:=10:
Numeric:=explicit:

sys:=
'det'(<a_, gA(a_),1; b_, gB(b_),1; Oc,1>),
'det'(<b_, gB(b_),1; c_, gC(c_),1; Oa,1>),
'det'(<c_, gC(c_),1; a_, gA(a_),1; Ob,1>):

sol:=solve({sys}, {a_,b_,c_}, Numeric);  # A = [a_,gA(a_)] etc

{a_ = -2, b_ = -1, c_ = 10}, {a_ = 64/151, b_ = -86/25, c_ = -103/8}

(1)

with(plots):

display(
plot([gA(x), gB(x), gC(x)], x=-16..13, color=green),                                             #gA,gB,gC
pointplot([[Oa],[Ob],[Oc]], symbol=solidcircle,symbolsize=12, color=gold),                       #Oa,Ob,Oc
pointplot( eval([[a_, gA(a_)], [b_, gB(b_)], [c_, gC(c_)]], sol[2]), symbolsize=20, color=red),  #A,B,C
plot( eval( [gA(a_) + (gB(b_)-gA(a_))/(b_-a_)*(x-a_),                                            #AB
             gB(b_) + (gC(c_)-gB(b_))/(c_-b_)*(x-b_),                                            #BC
             gC(c_) + (gA(a_)-gC(c_))/(a_-c_)*(x-c_)],  sol[2]),                                 #AC
     x=-16..13, color=blue)
);

 

 

 

P.S. In the worksheet the code is better formatted.
Download ABC-vv.mw

n must be >3
The polygon with maximal area is the cyclic one.
Denote L[i] the sides, here L[i] = i, and r the radius of the circle.
Let a[i] be the angle A[i]OA[i+1], where A[1], ..., A[n] are the vertices
and O is the center of the circumscribed circle. Then 

Sum(arcsin(L[i]/r/2, i=1..n) = Pi  ==> r

restart
R := n -> local i,r; fsolve(sum(arcsin(i/r/2), i=1..n) - Pi, r =n/2 .. 2*n):

Vector( 17, k -> 'R'(k+3)=R(k+3));

n:=7:  # Graphic example
r:=R(n):
b[0]:=0:
for i to n do a[i] := 2*arcsin(i/r/2); b[i]:=b[i-1]+a[i] od:
MaxArea:=r^2/2*add(sin(a[i]), i=1..n); 
plot([seq]([cos(b[i]),sin(b[i])], i=0..n), axes=none);

        MaxArea := 54.72494665

evala(%);
#           2

Hint for a student solution "by hand":
-  Use  (a+b)^3 = a^3 + b^3 + 3*a*b*(a + b)

-- Obtain a cubic equation satisfied by your number x and factor it as (x-2)(...)=0. 

                          

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