Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are replies submitted by Kitonum

@kharonsen  Certainly possible, but you must do it yourself. You now have 2 versions: mine, in which everything is very simple and all the shifts made by one unit above or right or left, and Tom' s one that is closer to your source code. If you study these versions you can easily solve your problem. 

@ANANDMUNAGALA  If you mean a broken line in 2D or 3D  use  plottools[curve]  command.

Example (a hexagon in 3D):

plots[display](plottools[curve]([ [2,1,0], [1,2,0], [0,2,1], [0,1,2], [1,0,2], [2,0,1], [2,1,0] ]), axes=normal, color=red, thickness=3);

 

Addition. See also the procedure  PiecewisePlot  above which automates the plotting of a piecewise curve in 3D.

Edited.

@Scot Gould  This is probably due to some specific evaluative Maple rules.

Workaround:

restart;
z:=A*<x,y>;
plots:-fieldplot(eval(z, A=1.0), x=0..1, y=0..1);

@rlopez  It must be proven! Here's the proof in Maple:

restart;
subs(cos(theta)=x/r, sin(theta)=y/r, r=sqrt(x^2+y^2), r=3*cos(theta)-2*sin(theta));
expand(%*sqrt(x^2+y^2));
(lhs-rhs)(%)=0;
Student[Precalculus][CompleteSquare](%, x,y);  
# This is the canonical equation of the circle centered at (-1,3/2) and radius sqrt(13)/2

                           

 

 

@mnpjf  Carefully re-read this sentence:

arctan(y, x)  command returns the angle (of the range  -Pi..Pi ), which the radius vector of a point with coordinates (x, y)  forms with the positive direction of x-axis.

@hitstudent 

A:=plot3d([x,40*cos(t),40*sin(t)], x=-60..60, t=0..2*Pi, style=surface, color=green):
B:=plot3d([20*cos(t),20*sin(t),z], z=sqrt(40^2-20^2*sin(t)^2)..100, t=0..2*Pi, style=surface, color=yellow, transparency=0.2):
plots[display](A, B, scaling=constrained, axes=normal);
F:=sqrt(40^2-y^2):
int(r*eval(sqrt(1+diff(F,x)^2+diff(F,y)^2), y=r*sin(t)), [r=0..20, t=0..2*Pi]);  #
Exact value of the area
evalf(%);  # Approximate value of the area

                       

 

Addition.  We can see that the exact value of this area is expressed in terms of elliptic integrals. This shows that this figure is not an ellipse, as ellipse area is easily expressed through its axis.


 

@hitstudent

plot3d([r*cos(t), r*sin(t), r^2], r=0..3, t=0..2*Pi, axes=normal);

                        

Of course Maple found the area only of one side of this surface.

@asa12  I am not a Maple developer and do not know their plans for future versions.

@J4James 

1. I do not understand the meaning of this phrase  "The starting point for f(x)=x in 0<x<4 has to be x-x/4*4 ".

2. type(x/4, integer)=false  means that  x  is not divisible by .

3. Your code is correct, but it can be a bit easier:

f:=x->piecewise(type(x/4, integer)=false,x-floor((x)/4)*4, undefined);
A:=plot(f, -12..12, scaling=constrained, discont):
B:=plot([seq([-8+4*k,0],k=0..4), seq([-8+4*k,4],k=0..4) ],style=point, symbol=circle):
plots[display](A, B);

 

Note that  f(x)=f(x-4)=f(x+4)
 

@J4James  

1. If we shift the graph of a function to the right by 2 units, simply replace  f(x)  by  f(x-2) .

2. The sequences of  x-coordinates of the circles  (below and above  x-axis)  form two arithmetic progressions.

f:=x->piecewise(type((x+2)/4,integer)=false,x-floor((x+2)/4)*4, undefined):
A:=plot(f(x-2), x=-10..10, scaling=constrained, discont):
B:=plot([seq([-8+4*k,-2],k=0..4), seq([-8+4*k,2],k=0..4) ],style=point, symbol=circle):
plots[display](A, B);

 

@Markiyan Hirnyk

6=sqrt(36) 

@kharonsen  You forgot to copy a minus sign in front of  evalindets :

A:=2*Pi^2*(-1+delta)/r^(1+delta);
-evalindets(A, 'And(`+`, satisfies(f->sign(op(1,f))=-1))', t->-t);

                           

 

 

@Preben Alsholm  for the useful information

@acer  Thank you very much for your solution. Your procedure also fixes the bug in  NumberTheory:-RepeatingDecimal(p)  if  -1<p<0

@AmirHosein Sadeghimanesh I don't see any bugs in the work of  

T := combinat[cartprod]([[1, 2, 3]$n]);

 

Example of work:

T := combinat[cartprod]([[1, 2, 3]$3]);

i:=0:

while not T[finished] do

i:=i+1: L[i]:=T[nextvalue]();

od:

convert(L, list);

 

I have not seen your procedure and therefore do not know why it produces a wrong result.

 

First 72 73 74 75 76 77 78 Last Page 74 of 132