Kitonum

21555 Reputation

26 Badges

17 years, 136 days

MaplePrimes Activity


These are replies submitted by Kitonum

To  Markiyan Hirnyk

To find  a smaller set having this property is easy without Maple - just remove any 6 elements of the given set of 16 elements.

I do not know of another type of solutions than those that can be obtained apparent transformations: reflections and rotations.

@Axel Vogt

 There are infinitely many rational solutions. All of these solutions can be obtained as follows: set any rational values ​​to variables  x  and  y  and solve the resulting equation for  z .

@Axel Vogt

 There are infinitely many rational solutions. All of these solutions can be obtained as follows: set any rational values ​​to variables  x  and  y  and solve the resulting equation for  z .

If you fix all of these errors, the procedure is correct. Since you find  the zeros not of the function but its derivative, so the first argument of the procedure should be the derivative (or correct the text of the procedure appropriately):

prcNewton(x->cos(x^2)*2*x+1, 1.0);

                  2.115121021

If you fix all of these errors, the procedure is correct. Since you find  the zeros not of the function but its derivative, so the first argument of the procedure should be the derivative (or correct the text of the procedure appropriately):

prcNewton(x->cos(x^2)*2*x+1, 1.0);

                  2.115121021

Formulation of the problem is unclear!  What is 10P4?

I agree that the machinery of the bug is still unclear. But why my code can not be treated as a workaround? Here's another variant for any range:

restart;

X:=[seq(k, k=-20..20, 0.1)]:

Y:=[]:

for k from 1 to 401 do

a:=solve(eval(sqrt(x^2+y^2)=sqrt((x-4)^2+(y-3)^2)+5, x=X[k])):

if a<>NULL then

Y:=[op(Y), [X[k], a]]: fi:

od:

plot(Y, thickness=3, scaling=constrained, view=[-20..20, -16..16]);

Your plot can be constructed as follows:

X:=[seq(k, k=4..10, 0.1)]:

Y:=[]:

for k from 1 to 61 do

solve(eval(sqrt(x^2+y^2)=sqrt((x-4)^2+(y-3)^2)+5, x=X[k])):

Y:=[op(Y), [X[k], %]]:

od:

plot(Y, thickness=3, view=[-1..10, -1..8]);

1) To Alejandro Jakubi.

Thanks for the detailed explanation! It is unfortunate that Maple unable to cope with checking obvious statements.  

Another example:

is(2*х^5 +1>0) assuming x>=0, x<=1;

                     false

This is just a bug!

 

2) To Markiyan Hirnyk.

I think that the use of  continuous=true option, without proof of the convergence of the improper integral, is unacceptable because may result in an error.

An example:

int(1/x, x=-1..2, continuous=true);

             -Pi*I+ln(2)

Received an incorrect result!

1) To Alejandro Jakubi.

Thanks for the detailed explanation! It is unfortunate that Maple unable to cope with checking obvious statements.  

Another example:

is(2*х^5 +1>0) assuming x>=0, x<=1;

                     false

This is just a bug!

 

2) To Markiyan Hirnyk.

I think that the use of  continuous=true option, without proof of the convergence of the improper integral, is unacceptable because may result in an error.

An example:

int(1/x, x=-1..2, continuous=true);

             -Pi*I+ln(2)

Received an incorrect result!

@Markiyan Hirnyk 

1) Why was the combinat package called, if in the code it is not used?  

2) Your procedure s does not work in the classic interface, as left single quotes should be used: print(`Invalid input`) . In standard interface s works - Maple interprets a blank as multiplication.    

3) A simple exhaustive search program more effective (running at least 10 times faster)

s1:=proc(L::list)

local n, N, i, j;

n:=nops(L);

if nops(convert(L,set))=n then

N:=0;

for i to n-1 do

for j from i+1 to n do

if L[i]>L[j] then N:=N+1; fi;

od; od;

else print(`Invalid input`); fi;

(-1)^N;

end proc;

 

Examples:

L:=combinat[randperm](1000):

st:=time():

s1(L), time()-st;

    1,  0.967

 

st:=time():

s(L), time()-st;

    1,  11.981

@Markiyan Hirnyk 

1) Why was the combinat package called, if in the code it is not used?  

2) Your procedure s does not work in the classic interface, as left single quotes should be used: print(`Invalid input`) . In standard interface s works - Maple interprets a blank as multiplication.    

3) A simple exhaustive search program more effective (running at least 10 times faster)

s1:=proc(L::list)

local n, N, i, j;

n:=nops(L);

if nops(convert(L,set))=n then

N:=0;

for i to n-1 do

for j from i+1 to n do

if L[i]>L[j] then N:=N+1; fi;

od; od;

else print(`Invalid input`); fi;

(-1)^N;

end proc;

 

Examples:

L:=combinat[randperm](1000):

st:=time():

s1(L), time()-st;

    1,  0.967

 

st:=time():

s(L), time()-st;

    1,  11.981

s([1, 2, 3, 4]);

             -1

No comments!

s([1, 2, 3, 4]);

             -1

No comments!

Many thanks to all for the detailed comments and answers!

First 124 125 126 127 128 129 130 Page 126 of 133