Kitonum

21530 Reputation

26 Badges

17 years, 91 days

MaplePrimes Activity


These are replies submitted by Kitonum

@johncarl  The procedure  ContoursWithLabels  does not provide for the plotting of contours in non-rectangular areas. I think the easiest way to solve your problem is to simply add labels for the corresponding level lines  eval(z, t = 0)=C , using the  plots:-textplot  command: 


 

z := -y + sech(x - 3*t);
w := 10*sech(x - 3*t);
with(plots):
P1 := plot(eval(w, t = 0), x = -6 .. 6):
Contours:=[-7,-3,1,5,9]:
Y:=map(p->solve(eval(z,[x=1,t=0])=p,y),Contours):
P2 := contourplot(eval(z, t = 0), x = -10 .. 10, y = -eval(w, t = 0) .. eval(w, t = 0), contours = Contours, color=blue, grid = [101, 101]):
Labels:=textplot([seq([1,Y[i],C=Contours[i]], i=1..5)], color=red, font=[times,14], align=above):
display(P1,P2,Labels, size=[400,400]);

-y+sech(-x+3*t)

 

10*sech(-x+3*t)

 

 

 


 

Download Contours_new.mw

@Kitonum In my answer above, I used numerical approximations to plot. Of course, this is not rigorous proof that the points actually lie on the same circle. But we can easily prove this rigorously (in this example) if we use symbolic expressions for the roots of the system and the condition for 4 points to belong to the same circle  (see https://math.stackexchange.com/questions/1252944/technique-for-proving-four-given-points-to-be-concyclic ):

restart;
P0:=[1,1]:
Sys:={x^2/5^2+y^2/3^2=1, (x-P0[1])*(y/3^2)-(x/5^2)*(y-P0[2])}:
Sol:=[solve(Sys,explicit)]:
L:=map(t->eval([x,y],t),Sol):
a:=L[1]: b:=L[3]: c:=L[4]: e:=L[2]: e1:=-e:
f:=(x,y)->x^2+y^2:
M:=<f(a[]),a[1],a[2],1; f(b[]),b[1],b[2],1; f(c[]),c[1],c[2],1; f(e1[]),e1[1],e1[2],1>: 
simplify(LinearAlgebra:-Determinant(M));

   The output:                                              0


I tried using the same technique for an arbitrary ellipse and an arbitrary point P0, but did not succeed.

@TeyhaNeedHelp  Use the  eval  command for this.

Example (let  eta=1):
eval([f(eta), theta(eta)], sol(1));
                         
 [0.534212077281807, 0.0239516677989057]

@Adam Ledger  See the help page  remember (Option remember in Procedures)  for this.

@tiaranain  Change the last line to
plots:-fieldplot3d( RHS, x=-1..1, y=-1..1, z=-1..1, arrows=THICK, color=red,  grid=[5,5,5], axes=box);
 

@Zeineb  because 180 is divided by 90 without a remainder. Strictly speaking, only one second case can be left, because 0 is also divisible by 90.

@tiaranain  I fixed your syntax errors below:

SYS := [D(x)(t)=x(t)-x(t)*y(t)-x(t)*z(t),
D(y)(t)=-0.4*y(t)+x(t)*y(t),
D(z)(t)=-0.24*z(t)+x(t)*z(t)];

RHS := eval( map( rhs, SYS ), [x(t)=x,y(t)=y,z(t)=z] );
                             
plots:-fieldplot3d( RHS, x=-1..1, y=-1..1, z=-1..1, grid=[5,5,5], axes=boxed );

 

@Earl 

LongSum:=proc(f,n0,n)
uses InertForm;
Display(`%+`(seq(f(k),k=1..n0))+`...`+f(n));
end proc:

Examples:
LongSum(n->x[n], 2, n);
LongSum(n->n/(n+1), 3, k);
LongSum(n->n/(n+1), 3, 100);

@minhthien2016  The code shows that this property is also true for a non-convex quadrilateral (in this example). If you still need a convex one, take the point symmetric to DD with respect to the AC. Then you get a convex quadrilateral with the same side lengths.

@tomleslie 
 

isEquiv(Pi*x+y=Pi, x+y/Pi=1); 
isEquiv(x-I*y=I, I*x+y=-1);
isEquiv(sin(x)^2+cos(x)^2=1, 1=1);


Here is my version, which works for these examples:

g:= z-> simplify( (lhs(z)-rhs(z))):
isEquiv1:= (x,y)-> is(simplify(g(x)-g(y))=0 or type(simplify(evalc(g(x)/g(y))),complexcons)):

 

@Christian Wolinski 

'cos'(Pi/2-op(1,convert((1/2)*sqrt(3)*sin(y)+(1/2)*cos(y), phaseamp, y)));

 

@Caneee315 A parallelogram rule is used to add two vectors. See an example below. The animation in this example can be done analogously to the example above:

restart;
with(plots):	
u, v:=[1, 2, 3], [-1, 2, 3]:
U:=arrow(u, color=blue, width=0.1):
V:=arrow(v, color=blue, width=0.1):
W:=arrow(u+v, color=red, width=0.1):
L1:=plottools:-line(u,u+v, linestyle=2, thickness=3, color=black):
L2:=plottools:-line(v,u+v, linestyle=2, thickness=3, color=black):
display(U,V,L1,L2,W, axes=normal, orientation=[-115,15,120]);

                     

 

@Jayaprakash J  Your function depends on 2 variables  x  and  alpha . Therefore, if you want to build it as a function of alpha, then you need to fix the value of  x . Or plot the function of two variables using the plot3d command:

f:=x->-0.3075000000e-1*x^2-0.2145927617e-3*x^6-0.2692226562e-4*x^4+0.3750551906e-2*x^5+0.1050625000e-2*x^3-0.5266789021e-5*x^7+0.1082238239e-4*x^9-6.80130209*10^(-7)*x^6*sin(alpha)+0.2932994791e-5*x^6*cos(alpha)+0.4375000000e-2*x^4*cos(alpha)-0.7990625000e-4*x^5*sin(alpha)-0.1704062500e-3*x^5*cos(alpha)-3.907366066*10^(-7)*x^8*cos(alpha)^2-0.5000000000e-1*x^3*sin(alpha)+0.3375000000e-2*x^4*sin(alpha)-0.2231049199e-3*x^7*sin(alpha)+0.1723809524e-4*x^7*cos(alpha)^2-0.5000000000e-1*x^3*cos(alpha)+7.912017277*10^(-7)*x^8+0.4464285714e-3*x^7*cos(alpha)^3-0.6695959034e-3*x^7*cos(alpha)+0.4337937076e-4*x^9*cos(alpha)^2-0.982142856e-5*x^8*cos(alpha)^3+0.3392338088e-4*x^8*cos(alpha)+0.4906693567e-5*x^8*sin(alpha)+0.4412678315e-5*x^9*cos(alpha)+0.1833880452e-5*x^9*sin(alpha)+6.885206662*10^(-7)*x^10-0.1833333334e-3*x^6*cos(alpha)^2+.6*x+1:
G:=D(f)(x);
plot(eval(G, x=1), alpha=-Pi..Pi);
plot3d(G, alpha=-Pi..Pi, x=0..1);

 

@Carl Love  Yes of course.

The record  12^6^5   is ambiguous. It can be understood as  (12^6)^5  or as  12^(6^5) .

First 30 31 32 33 34 35 36 Last Page 32 of 133