13489 Reputation

24 Badges

11 years, 102 days

MaplePrimes Activity

These are replies submitted by Kitonum

@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.



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)))



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

Vlist :=  [ 0.8, 0.9, 0.99 ];

[.8, .9, .99]


_EnvExplicit := true;




[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)]




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.

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;
{seq(seq(`if`(evala(SS1[i]-S2[j])=0,SS1[i],NULL), j=i..n), i=1..m1)};
end proc:

Examples of use:

Sol1 := {solve( R^2-sqrt(2)*R-1 )};
Sol2 := {solve( (sqrt(3)+1)*R^2 = sqrt(3)-1 )};
Intersect({sqrt(7)+1}, {6/sqrt(8-2*sqrt(7))});



@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 )};


@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

@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 :


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









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


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











@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;
for k from 6 by 6 to N do
m0:=add(10^i, i=0..k-1);
if isprime(m) then return k fi;
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);

@mmcdara In original code after  -2*tanh(2/T)  the sign  "+"  stands.

@David Sycamore  You do not need to do anything with the code of this procedure. You just have to copy this code as plain text into your worksheet. Then you press the enter key and after that you can use the procedure as shown in the examples above. You type (or copy) the procedure name and type the desired prime number in parentheses.

@JAMET   I did not understand the meaning of the question.

2 3 4 5 6 7 8 Last Page 4 of 100