Kitonum

13105 Reputation

24 Badges

11 years, 3 days

MaplePrimes Activity


These are replies submitted by Kitonum

@hamideh 

restart;
plots:-implicitplot3d((x,y,z)->`if`(x<y and y<z,x^3*y*z-0.5,NULL), 0..5, 0..5, 0..5, style=surface, color=green, numpoints=500000, axes=normal, orientation=[55,75]);

                    

@Al86  The idea of how to find these values is suggested by the graph of the implicit function 

(x-2)^2*(x-3)+epsilon^2=0

(see the code above). The straight line  epsilon=C  (is a constant)  should cross this graph at exactly 2 points. One value is obvious  epsilon=0, and 2 others are easily found using the derivative:

epsilon1:=x->sqrt(-(x-2)^2*(x-3));
epsilon2:=x->-sqrt(-(x-2)^2*(x-3));
x1:=solve(D(epsilon1)(x)=0);
x2:=solve(D(epsilon2)(x)=0);
epsilon1(x1);
epsilon2(x2);

 

@David Sycamore

 

restart;
AlmostCarmichaelNumbers1:=proc(n::posint)
local L;
L:=ifactors(n);
if nops(L[2])>2 and L[2,1,1]<>2 and `and`(map(t->is(t[2]=1),L[2])[]) and irem(n-1,L[2,1,1]-1)=0 and irem(n-1,L[2,-1,1]-1)=0 and `and`(seq(irem(n-1,t[1]-1)<>0,t=L[2][2..-2])) then true else false fi;
end proc:


Example of use:

 select(AlmostCarmichaelNumbers1, [seq(i, i=1..20000, 2)]);
 
 [231, 1045, 1653, 4371, 4641, 5365, 6545, 8029, 9361, 10011, 10857, 13685, 13695, 15753, 16269, 18361, 18565]

Edit.

I first learned about this command from this post. It is not clear to me why it is necessary for all occasions to look for the appropriate command in Maple, if we can just write the simplest procedure. Example:

restart;
Dist:=(X,Y)->sqrt(add((X-~Y)^~2)):
X:=<1,2,3>: Y:=<2,3,4>:
Dist(X,Y);

 

To answer the question, we need to see your particular calculation. So submit here your code (as text and not a picture) using a bold green up arrow in the MaplePrimes editor, or simply upload your worksheet here using the same method.

@David Sycamore This combination of commands 

`and`(map(t->is(t[2]=1),L[2])[])

 makes the check for "squarefree".

Here is another example of how the procedure works up to some N (I took N = 1000):

seq([n,Check(n)], n=1..1000);
     

   

@David Sycamore 

a:= proc(n::posint)
option remember;
   if n=1 then return 1 fi;
   if type(a(n-1)+1,prime) then return a(n-1)+1 else
   if type(a(n-1),even) then return a(n-1)+2 else a(n-1)+3 fi; fi;
end proc:

seq(a(n), n=1..20);

 

@RaulGutsa  For 3d you can use in the procedure  P  the  plots:-pointplot3d  command:

Eq:=diff(y(x),x)=cos(x):
ics:=y(0)=0:
Sol:=dsolve({Eq, ics}, numeric):
P:=proc(s)
plots:-pointplot3d(eval([[x,y(x),x]], Sol(s)), style=point, symbol=solidcircle, symbolsize=15);
end proc:
plots:-animate(plots:-display,['P'(s)], s=0..Pi, scaling=constrained);

 

Present here in editable form this matrix so that I can copy it into my Maple. I have a program written many years ago and not published anywhere that allows you to step by step bring the matrix of an arbitrary size to the ReducedRowEchelonForm  (comments to the steps in Russian). 

@mugwort  I ran  your worksheet without any errors (only replaced digits with Digits).



Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/DiffGeom_new.mw .
 

Download DiffGeom_new.mw

@mmcdara  You wrote: "The main point is in the definition of f3 which should had been f3 := (x, y) -> f(x, y)+f2(x, y)".

But  f3:=f+f2  and  f3 := (x, y) -> f(x, y)+f2(x, y)   are the same, regardless of whether the variables  x  and  y  are predetermined or not.

For example:

f := sin + cos:
f(Pi/6);

@MuhammadSinan  Using the  eval  command you can get a list of values of any of the functions with the necessary step. For example:

[seq(eval([t, B(t)], sol(s)), s = 0 .. 1, 0.01)];

 

@Carl Love  Since the new 3 teams differ in color, it is not necessary to divide by 3 in the denominator.

@acer  If the graphs should be at different plots, it can be made easier:

A:=plots:-animate(plot,[x^2, x=-2..a, color=red], a=-2..2, frames=60):
B:=plots:-animate(plot,[sin(2*x), x=0..a, color=blue], a=0..2*Pi, frames=60):
plots:-display(<A | B>, size=[700,400]);

   

@Awesome123  You need to more clearly articulate your task. For starters, I recommend reading this article  https://en.wikipedia.org/wiki/Close-packing_of_equal_spheres .

Here's a possible formulation of the problem: find the dimensions of a cylindrical container that has the smallest full surface that could hold all your chocolates. For comparison, the same for the container in the form of a cuboid.

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