Kitonum

12754 Reputation

17 Badges

10 years, 285 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Lali_miani   Because  u(1)=sin(u(0)), u(2)=sin(u(1))=sin(sin(u(0)))  and so on.

@Lali_miani  For example  (sin@@3)(x)  means  sin(sin(sin(x))) :

expand((sin@@3)(x));

                     sin(sin(sin(x)))

@Lali_miani   But  sin(1.5) = 0.9974949866  not  0.84

@vanzzy  I changed the colors a bit to make them all different. Some graphics in separate ranges merge. For example, red with yellow and black with blue.


 

restart;
with(plots):

gm := V -> 1/sqrt(1-V^2):
T := w-k*V:
S := w*V-k:

f := unapply(-135/4*w^5+369/16*w^3*k^2+47/4*I*w^4-93/16*I*w^2*k^2+w^3-2/3*w^3*k*B-27/16*k^4*w+3/16*I*k^4-1/3*w*k^2+2/9*k^3*w*B,w,B,k):

Hgen := simplify(rationalize(f(w, B, k)))

-(135/4)*w^5+((47/4)*I)*w^4+(1/144)*(-96*B*k+3321*k^2+144)*w^3-((93/16)*I)*w^2*k^2+(1/144)*(32*B*k^3-243*k^4-48*k^2)*w+((3/16)*I)*k^4

(1)

altcols := ["Black","Red","Blue"]:

Vlist :=  [ 0.8, 0.9, 0.99 ];

[.8, .9, .99]

(2)

_EnvExplicit := true;

true

(3)

H:=[allvalues(solve(Hgen,w))];
nops(H);

[RootOf(4860*_Z^5-(1692*I)*_Z^4+(96*B*k-3321*k^2-144)*_Z^3+(837*I)*k^2*_Z^2+(-32*B*k^3+243*k^4+48*k^2)*_Z-(27*I)*k^4, index = 1), RootOf(4860*_Z^5-(1692*I)*_Z^4+(96*B*k-3321*k^2-144)*_Z^3+(837*I)*k^2*_Z^2+(-32*B*k^3+243*k^4+48*k^2)*_Z-(27*I)*k^4, index = 2), RootOf(4860*_Z^5-(1692*I)*_Z^4+(96*B*k-3321*k^2-144)*_Z^3+(837*I)*k^2*_Z^2+(-32*B*k^3+243*k^4+48*k^2)*_Z-(27*I)*k^4, index = 3), RootOf(4860*_Z^5-(1692*I)*_Z^4+(96*B*k-3321*k^2-144)*_Z^3+(837*I)*k^2*_Z^2+(-32*B*k^3+243*k^4+48*k^2)*_Z-(27*I)*k^4, index = 4), RootOf(4860*_Z^5-(1692*I)*_Z^4+(96*B*k-3321*k^2-144)*_Z^3+(837*I)*k^2*_Z^2+(-32*B*k^3+243*k^4+48*k^2)*_Z-(27*I)*k^4, index = 5)]

 

5

(4)

plt1 := plot(Im(eval(H[1], B = 1)), k = 0 .. 1, color = red, linestyle = solid, discont = true):
plt2 := plot(Im(eval(H[2], B = 1)), k = 0 .. 1, color = black, linestyle = solid, discont = true):
plt3 := plot(Im(eval(H[3], B = 1)), k = 0 .. 1, color = green, linestyle = solid, discont = true):
plt4 := plot(Im(eval(H[4], B = 1)), k = 0 .. 1, color = blue, linestyle = solid, discont = true):
plt5 := plot(Im(eval(H[5], B = 1)), k = 0 .. 1, color = yellow, linestyle = solid, discont = true):
display(plt1, plt2, plt3, plt4, plt5);

 

``


 

Download file2_(1).mw

@Chouette  It seems that a simple procedure called  Intersect  solves your problem. The procedure uses  evala  command, which apparently reliably recognizes the coincidence of algebraic numbers. Numbers can be given both explicitly (in radicals) and implicitly (as  RootOf  placeholder). So in the last example below it is shown that each root of the first equation is also the root of the second equation. The procedure works as follows: first, remove the duplicate elements (if any) from the first set, and then compare each element of the first set with each element of the second set, and so we get their intersection.

restart;
Intersect:=proc(S1::set,S2::set)
local T, m:=nops(S1), n:=nops(S2), SS1, m1;
T:={seq(seq(`if`(evala(S1[i]-S1[j])=0,S1[i],NULL), j=i+1..m), i=1..m-1)};
SS1:=S1 minus T;
m1:=nops(SS1);
{seq(seq(`if`(evala(SS1[i]-S2[j])=0,SS1[i],NULL), j=i..n), i=1..m1)};
end proc:

Examples of use:

Intersect({sqrt(6)},{sqrt(2)*sqrt(3)});
                       
Sol1 := {solve( R^2-sqrt(2)*R-1 )};
Sol2 := {solve( (sqrt(3)+1)*R^2 = sqrt(3)-1 )};
Intersect(Sol1,Sol2);
         
Intersect({sqrt(7)+1}, {6/sqrt(8-2*sqrt(7))});
                     
S1:={solve(x^17+2*x^11+4*x^5-1=0)}:
S2:={solve(x^23-x^6-8*x^5+2=0)}:
Intersect(S1,S2);

   

Download Intersect.mw

@Chouette  Use  rationalize(simplify(...))  for algebraic numbers:

Sol1 := {solve( R^2-sqrt(2)*R-1 )};
Sol2 := {solve( (sqrt(3)+1)*R^2 = sqrt(3)-1 )};
rationalize(simplify(Sol1));
rationalize(simplify(Sol2));

 

@JSalisbury  Should be  Point[i] := ...

@vv  I did not understand why it happened. Now I did  restart;  and got the same result as sand's one:

`-`(a, b);
                           a - b

@sand15  In Maple 2018.3 (worksheet mode, Standard GUI)  I get  that  Matrix(3, 3, `.`) = Matrix(3, 3, `*`)

Matrix(3, 3, `.`);
Matrix(3, 3, `*`);

                            

 

 

@Teep  You can do this automatically as follows

MaplePrimes_network_labels_new.mw

@Teep   See help on the  GraphTheory:-RelabelVertices  command.

@radaar  Unfortunately, I am not familiar with books on Maple in English. Maybe someone else will give such advice. I have long been using only the Maple help system if I forgot something. For example, in the aswer to your initial question, I simply opened the help for  Student:-MultivariateCalculus:-ApproximateInt  command and found the  partition  option for it.

 

@colin12345678  From your original code it is not clear of which expression the derivative is taken. I suggested that of  k(T)/2/Pi*Int(sin(theta)^2/delta(T)/(1+delta(T)), theta=0..Pi)) . In the code below, the derivative is taken only of  k(T)/2/Pi :


 

restart;
k:=T->2/cosh(2/T)/coth(2/T);
delta:=T->sqrt(1-k(T)^2*sin(theta)^2);
e:=T->-2*tanh(2/T)+D(T->k(T)/2/Pi)(T)*Int(sin(theta)^2/delta(T)/(1+delta(T)), theta=0..Pi);

proc (T) options operator, arrow; 2/(cosh(2/T)*coth(2/T)) end proc

 

proc (T) options operator, arrow; sqrt(1-k(T)^2*sin(theta)^2) end proc

 

proc (T) options operator, arrow; -2*tanh(2/T)+(D(proc (T) options operator, arrow; (1/2)*k(T)/Pi end proc))(T)*(Int(sin(theta)^2/(delta(T)*(1+delta(T))), theta = 0 .. Pi)) end proc

(1)

evalf(e(1));

-1.793211145

(2)

evalf(e(4));

-.9522166642

(3)

 


And the last option corresponds to the code in your last comment. Here, the derivative is taken only from the integral:


 

restart;
b:=T->1/T;
k:=T->2/cosh(2*b(T))/coth(2*b(T));
delta:=T->sqrt(1-k(T)^2*sin(theta)^2);
e:=T->-2*tanh(2/T)+k(T)/(2*Pi)*D(T->2/Pi*Int(sin(theta)^2/delta(T)/(1+delta(T)), theta=0..Pi))(T);

proc (T) options operator, arrow; 1/T end proc

 

proc (T) options operator, arrow; 2/(cosh(2*b(T))*coth(2*b(T))) end proc

 

proc (T) options operator, arrow; sqrt(1-k(T)^2*sin(theta)^2) end proc

 

proc (T) options operator, arrow; -2*tanh(2/T)+(1/2)*k(T)*(D(proc (T) options operator, arrow; 2*(Int(sin(theta)^2/(delta(T)*(1+delta(T))), theta = 0 .. Pi))/Pi end proc))(T)/Pi end proc

(1)

evalf(e(1));
evalf(e(4));

-1.895473238

 

-.9574874368

(2)

 


 

Download 1111.mw

Download 111.mw

@David Sycamore  The procedure code needs a minimal change so that it does not check all positive integers  k , but only numbers of the type  k=6*n  (n is positive integer):

Wrapped_prime:=proc(p::prime, N::posint:=5000)
local n, k, m0, m;
n:=length(p);
for k from 6 by 6 to N do
m0:=add(10^i, i=0..k-1);
m:=m0+10^k*p+10^(k+n)*m0;
if isprime(m) then return k fi;
od;
end proc:

Using this procedure, I checked all к (multiples of 6) up to N=10000 . The computer worked for more than an hour, but could not find a prime number.

Wrapped_prime(397, 10000);
 

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