vv

13138 Reputation

20 Badges

9 years, 74 days

MaplePrimes Activity


These are answers submitted by vv

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. 

                          

intat(f(x), x=a)  computes an antiderivative F(x) of f(x) and returns F(a).

Two antiderivatives may differ by an additive constant, depending e,g. on the method used to compute it.

 intat is useful when it is desired to subsequently perform a change of variable, or in the case of symbolic manipulation of the solutions of differential equations.

 

So, for example,

intat(x^2, x=1);

1/3

(1)

has not much sense, unless you know which antiderivative was computed.

 

restart;

f := sin(x)*cos(x) + 1/x;

sin(x)*cos(x)+1/x

(2)

F1 := intat(f, x=a);

ln(a)+(1/2)*sin(a)^2

(3)

F2 := intat(simplify(f), x=a);

ln(a)-(1/4)*cos(2*a)

(4)

simplify(F1-F2);

1/4

(5)

F3 := Int(f, x=0..a); value(%);

Int(sin(x)*cos(x)+1/x, x = 0 .. a)

 

infinity

(6)

Note. When Intat(f(x), x=a)  is replaced by Int(f(x). x=0..a), odesolve will verify it, but 0 could be out of dom(f), so, nonsense!

 

1/2*evalf(Int(min(-6*cos(t), 2-2*cos(t))^2, t=Pi/2..3*Pi/2));
identify(%);
#                          15.70796327
#                              5 Pi

Using Edge is ok, Firefox too; maybe try some font settings:

 

The answer for your previous problem works here too.

restart;
eq:=x^2+y^2-N*(1+x*y):  # [x=0, y=sqrt(N)] and [x=sqrt(N),y=0] are solutions!
XY:=[X=x, Y=2*y-x*N]: xy:=solve(XY,[x,y])[]:
EQ:=simplify(eval(eq,xy)):
for N in [9, 49 , 729] do
  SOL:=isolve(EQ):
  sol[N]:=map(u -> simplify(eval(xy, u)), [SOL]);
  num:={seq}(simplify(sol[N])[],_Z1=0..2);
  print('N'=N, select(type,num, [anything=integer,anything=integer]));
od:

N = 9, {[x = -1497363, y = -13307787], 
  [x = -1497363, y = -168480], [x = -168480, y = -1497363], 
  [x = -168480, y = -18957], [x = -18957, y = -168480], 
  [x = -18957, y = -2133], [x = -2133, y = -18957], 
  [x = -2133, y = -240], [x = -240, y = -2133], 
  [x = -240, y = -27], [x = -27, y = -240], [x = -27, y = -3], 
  [x = -3, y = -27], [x = -3, y = 0], [x = 0, y = -3], 
  [x = 0, y = 3], [x = 3, y = 0], [x = 3, y = 27], 
  [x = 27, y = 3], [x = 27, y = 240], [x = 240, y = 27], 
  [x = 240, y = 2133], [x = 2133, y = 240], 
  [x = 2133, y = 18957], [x = 18957, y = 2133], 
  [x = 18957, y = 168480], [x = 168480, y = 18957], 
  [x = 168480, y = 1497363], [x = 1497363, y = 168480], 
  [x = 1497363, y = 13307787]}

N = 49, {[x = -96687343207, y = -4735705783543], 
  [x = -96687343207, y = -1974033600], 
  [x = -1974033600, y = -96687343207], 
  [x = -1974033600, y = -40303193], 
  [x = -40303193, y = -1974033600], [x = -40303193, y = -822857], 
  [x = -822857, y = -40303193], [x = -822857, y = -16800], 
  [x = -16800, y = -822857], [x = -16800, y = -343], 
  [x = -343, y = -16800], [x = -343, y = -7], [x = -7, y = -343], 
  [x = -7, y = 0], [x = 0, y = -7], [x = 0, y = 7], 
  [x = 7, y = 0], [x = 7, y = 343], [x = 343, y = 7], 
  [x = 343, y = 16800], [x = 16800, y = 343], 
  [x = 16800, y = 822857], [x = 822857, y = 16800], 
  [x = 822857, y = 40303193], [x = 40303193, y = 822857], 
  [x = 40303193, y = 1974033600], [x = 1974033600, y = 40303193], 
  [x = 1974033600, y = 96687343207], 
  [x = 96687343207, y = 1974033600], 
  [x = 96687343207, y = 4735705783543]}

N = 729, {[x = -4052517025117644747, y = -2954279352292037818803], 
  [x = -4052517025117644747, y = -5559018725201760], 
  [x = -5559018725201760, y = -4052517025117644747], 
  [x = -5559018725201760, y = -7625554438293], 
  [x = -7625554438293, y = -5559018725201760], 
  [x = -7625554438293, y = -10460313837], 
  [x = -10460313837, y = -7625554438293], 
  [x = -10460313837, y = -14348880], 
  [x = -14348880, y = -10460313837], [x = -14348880, y = -19683], 
  [x = -19683, y = -14348880], [x = -19683, y = -27], 
  [x = -27, y = -19683], [x = -27, y = 0], [x = 0, y = -27], 
  [x = 0, y = 27], [x = 27, y = 0], [x = 27, y = 19683], 
  [x = 19683, y = 27], [x = 19683, y = 14348880], 
  [x = 14348880, y = 19683], [x = 14348880, y = 10460313837], 
  [x = 10460313837, y = 14348880], 
  [x = 10460313837, y = 7625554438293], 
  [x = 7625554438293, y = 10460313837], 
  [x = 7625554438293, y = 5559018725201760], 
  [x = 5559018725201760, y = 7625554438293], 
  [x = 5559018725201760, y = 4052517025117644747], 
  [x = 4052517025117644747, y = 5559018725201760], 
  [x = 4052517025117644747, y = 2954279352292037818803]}

With sol[N] you may inspect the general solution depending on _Z1.


 

 

isolve is old and should be updated.

Actually isolve knows to solve generalized Pell equations. It only needs a little help to convert the diophantine quadratic to generalized Pell form.

At the end we must filter the obtained numeric solutions in order to eliminate the non-integer ones due to the form of xy, see below.

 

restart;

eq:=x^2 - 12*x*y + 6*y^2 + 4*x + 12*y - 3:

XY:=[X = 2*x-12*y+4, Y = -5*y+3]; # via complete squares

[X = 2*x-12*y+4, Y = -5*y+3]

(1)

xy:=solve(XY,[x,y])[];

[x = (1/2)*X+8/5-(6/5)*Y, y = -(1/5)*Y+3/5]

(2)

EQ:=simplify(eval(eq,xy));

(1/4)*X^2+19/5-(6/5)*Y^2

(3)

SOL:=isolve( EQ ):

sol:=map(u -> simplify(eval(xy, u)), [SOL]);

[[x = (1/10)*(30^(1/2)+7)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(-30^(1/2)+7)*(11+2*30^(1/2))^_Z1, y = (1/60)*(-30^(1/2)+12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(30^(1/2)+12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(3*30^(1/2)-17)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(-3*30^(1/2)-17)*(11+2*30^(1/2))^_Z1, y = (1/60)*(30^(1/2)-12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(-30^(1/2)-12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(-3*30^(1/2)-17)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(3*30^(1/2)-17)*(11+2*30^(1/2))^_Z1, y = (1/60)*(-30^(1/2)-12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(30^(1/2)-12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(-30^(1/2)+7)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(30^(1/2)+7)*(11+2*30^(1/2))^_Z1, y = (1/60)*(30^(1/2)+12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(-30^(1/2)+12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(30^(1/2)-7)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(-30^(1/2)-7)*(11+2*30^(1/2))^_Z1, y = (1/60)*(-30^(1/2)-12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(30^(1/2)-12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(3*30^(1/2)+17)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(-3*30^(1/2)+17)*(11+2*30^(1/2))^_Z1, y = (1/60)*(30^(1/2)+12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(-30^(1/2)+12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(-3*30^(1/2)+17)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(3*30^(1/2)+17)*(11+2*30^(1/2))^_Z1, y = (1/60)*(-30^(1/2)+12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(30^(1/2)+12)*(11+2*30^(1/2))^_Z1], [x = (1/10)*(-30^(1/2)-7)*(11-2*30^(1/2))^_Z1+8/5+(1/10)*(30^(1/2)-7)*(11+2*30^(1/2))^_Z1, y = (1/60)*(30^(1/2)-12)*(11-2*30^(1/2))^_Z1+3/5+(1/60)*(-30^(1/2)-12)*(11+2*30^(1/2))^_Z1]]

(4)

nops(sol)

8

(5)

num:={seq}(simplify(sol)[],_Z1=0..20): # some numeric solutions

numsols:=select(type,num,  [anything=integer,anything=integer]);

{[x = 3, y = 1], [x = 3, y = 3], [x = 5, y = 1], [x = 5, y = 7], [x = 29, y = 3], [x = 29, y = 53], [x = 75, y = 7], [x = 75, y = 141], [x = 603, y = 53], [x = 603, y = 1151], [x = 1613, y = 141], [x = 1613, y = 3083], [x = 13205, y = 1151], [x = 13205, y = 25257], [x = 35379, y = 3083], [x = 35379, y = 67673], [x = 289875, y = 25257], [x = 289875, y = 554491], [x = 776693, y = 67673], [x = 776693, y = 1485711], [x = 6364013, y = 554491], [x = 6364013, y = 12173533], [x = 17051835, y = 1485711], [x = 17051835, y = 32617957], [x = 139718379, y = 12173533], [x = 139718379, y = 267263223], [x = 374363645, y = 32617957], [x = 374363645, y = 716109331], [x = 3067440293, y = 267263223], [x = 3067440293, y = 5867617361], [x = 8218948323, y = 716109331], [x = 8218948323, y = 15721787313], [x = 67343968035, y = 5867617361], [x = 67343968035, y = 128820318707], [x = 180442499429, y = 15721787313], [x = 180442499429, y = 345163211543], [x = 1478499856445, y = 128820318707], [x = 1478499856445, y = 2828179394181], [x = 3961516039083, y = 345163211543], [x = 3961516039083, y = 7577868866621], [x = 32459652873723, y = 2828179394181], [x = 32459652873723, y = 62091126353263], [x = 86972910360365, y = 7577868866621], [x = 86972910360365, y = 166367951854107], [x = 712633863365429, y = 62091126353263], [x = 712633863365429, y = 1363176600377593], [x = 1909442511888915, y = 166367951854107], [x = 1909442511888915, y = 3652517071923721], [x = 15645485341165683, y = 1363176600377593], [x = 15645485341165683, y = 29927794081953771], [x = 41920762351195733, y = 3652517071923721], [x = 41920762351195733, y = 80189007630467743], [x = 343488043642279565, y = 29927794081953771], [x = 343488043642279565, y = 657048293202605357], [x = 920347329214417179, y = 80189007630467743], [x = 920347329214417179, y = 1760505650798366613], [x = 7541091474788984715, y = 657048293202605357], [x = 7541091474788984715, y = 14425134656375364071], [x = 20205720480365982173, y = 1760505650798366613], [x = 20205720480365982173, y = 38650935309933597731], [x = 165560524401715384133, y = 14425134656375364071], [x = 165560524401715384133, y = 316695914147055404193], [x = 443605503238837190595, y = 38650935309933597731], [x = 443605503238837190595, y = 848560071167740783457], [x = 3634790445362949466179, y = 316695914147055404193], [x = 3634790445362949466179, y = 6952884976578843528163], [x = 9739115350774052210885, y = 848560071167740783457], [x = 9739115350774052210885, y = 18629670630380363638311], [x = 79799829273583172871773, y = 6952884976578843528163], [x = 79799829273583172871773, y = 152646773570587502215381], [x = 213816932213790311448843, y = 18629670630380363638311], [x = 213816932213790311448843, y = 409004193797200259259373], [x = 1751961453573466853712795, y = 152646773570587502215381], [x = 1751961453573466853712795, y = 3351276133576346205210207], [x = 4694233393352612799663629, y = 409004193797200259259373], [x = 4694233393352612799663629, y = 8979462592908025340067883], [x = 38463352149342687608809685, y = 3351276133576346205210207], [x = 38463352149342687608809685, y = 73575428165109029012409161], [x = 103059317721543691281150963, y = 8979462592908025340067883], [x = 103059317721543691281150963, y = 197139172850179357222234041], [x = 844441785831965660540100243, y = 73575428165109029012409161], [x = 2262610756480608595385657525, y = 197139172850179357222234041]}

(6)

nops(numsols);

82

(7)

{seq}( eval(eq, s), s=numsols); #check

{0}

(8)

 

 

Download dioph-sols-vv.mw

 

select(u -> nops(u)=m and andmap(isprime,u), L);

 

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