Kitonum

20139 Reputation

26 Badges

15 years, 287 days

MaplePrimes Activity


These are answers submitted by Kitonum

I replaced your operators  Not, Or  and so on (I never used them)  with more standard ones (not, or, and, implies) in prefix form . As a result of simplifications in 2 ways, we get  false , that is, your expression is internally contradictory for any values of the variables  x  and  y , just as, for example, x and not x  is contradictory.

restart;
expr:=`and`(
   `not`(`or`(`or`(0 >- 0, y^3=x), 
     `and`(((y*x - 0^0)^2 + (y^2 - x^2)^2)*(y^2 + x^2) > 
       0, 0 <- (y^3 - x)*(y - x^3)^3, 
      `implies`(y + 2*x >= 2*y^3 + x^3, 
       `or`(y + x < y^3 + x^3)), `not`((y^3 - x)*(y - x^3) = 0), 
      0 >= 0), y <> x^3)));
convert(expr, 'boolean_function'); # The first way
Logic:-BooleanSimplify(expr); # The second way

      

Do  

factor(simplify((2)));

 

restart;
with(plots): with(plottools):
Sph:=display(sphere(),spacecurve([cos(t),sin(t),0], t=0..2*Pi, color=red, thickness=3), orientation=[60,60,20]):
animate(display@rotate,[Sph,phi,[[0,0,0],[0,0,1]]], phi=0..2*Pi, frames=90, axes=none, paraminfo=false);

                   

 

In my opinion, all 3 limits were found correctly. We obtain the first limit if we substitute gamma = 0  in A and simplify. The second limit is the generic result for arbitrary parameter values. The third limit does not contradict the second, since  subject to conditions on parameters  sigma__e>0 , sigma__v>0 , sigma__d>0  will be  -sigma__d*sigma__e^2+sqrt(sigma__d^2*sigma__e^4) = 0

restart;
leader:=0:
parms:=[colour=red,thickness=0,linestyle =dash]:
i:=ListTools:-Search(thickness=0, parms);
 if leader=0 then parms:=subsop(i=(thickness=3),parms) fi:
parms;
plots:-display(plottools:-line([1,2], [3,4]),op(parms));

Let us introduce the concept of sublists of a given list and somewhat generalize the problem.

Definitions1. A list  N  is called a sublist of  L  if every element of  N  is included in  L  and these elements in L are in the same order as in  .

Definitions2. The list  N  is called a sublist of the list  L  in the sense of definition1; moreover, the elements of  N  are in  L  next to each other.

The procedure  IsSubList  tests in the sense of the first or second definition. This is indicated by the third formal parameter.

restart;
IsSubList:=proc(N::list,L::list,i::posint)
local n, P, T, k, M;
uses ListTools, combinat;
n:=nops(N);
P:=map([ListTools:-SearchAll],N,L);
T:= cartprod(P);
k := 0; 
while not T[finished] do k := k+1; M[k] := T[nextvalue]() end do: M:=convert(M, list):
if i=1 then
if not (convert(N,set) subset convert(L,set)) then return false else if `or`(seq(`and`(seq(m[j]<m[j+1],j=1..nops(N)-1)), m=M)) then true else false fi; fi; else
if not (convert(N,set) subset convert(L,set)) then return false else if `or`(seq(`and`(seq(m[j]<m[j+1] and m[j]+1=m[j+1] ,j=1..nops(N)-1)), m=M)) then true else false fi; fi; 
fi;
end proc:


Examples of use:

N:=[7,2,4]:
L1:=[7,4,2,7,2,4]:
L2:=[7,7,7,7,2,2,2,7,4]:
L3:=[7,2,2,7]:
                             
IsSubList(N,L1,1);
IsSubList(N,L2,1);
IsSubList(N,L1,2);
IsSubList(N,L2,2);
IsSubList(N,L3,1);
IsSubList(N,L3,2);

                                                       true
                                                       true
                                                       true
                                                       false
                                                       false
                                                       false

A procedure named  IsSameOrder  does this. For the comparison to be correct, all other elements of the lists L1  and L2  must differ from the elements of the list  N  in order to uniquely determine the positions of the elements of the list  N  in the lists  L1  and  L2 . So I changed 2 elements in  L1  and  L2 .

restart;
IsSameOrder:=proc(N,L)
local n, P;
uses ListTools;
n:=nops(N);
P:=map(ListTools:-Search,N,L);
if `and`(seq(P[i+1]-P[i]>0, i=1..n-1)) then true else false fi; 
end proc:


Examples of use:

N:=[7,2,4]:
L1:=[1,6,5,7,3,2,9,4]:
L2:=[2,1,4,5,6,7,3,9]:
IsSameOrder(N,L1);
IsSameOrder(N,L2);

                                                 true
                                                false

restart;
p:=2345: q:=1536:
dp:=convert(p,base,10);
dq:=convert(q,base,10);
S:=`intersect`(convert~([dp,dq],set)[]);
dp1:=remove(`in`, dp, S);
dq1:=remove(`in`, dq, S);
p1:=add(dp1[i]*10^(i-1), i=1..nops(dp1));
q1:=add(dq1[i]*10^(i-1), i=1..nops(dq1));

 

We can easily do without loops when making animation. I also multiplied each frame 10 times so that the frames did not flash too often. Now each frame lasts approximately 1 second. In addition, the scales along the axes have been adjusted to make the plot look more realistic:

restart;	
with(plots):
display(seq(plot(sin(j*x)^j, x=0..2*Pi, color=red, scaling=constrained) $ 10,j=1..10), insequence);

You should use the assignment operator, not the equality one:

f(x):=x^5+x:
g(x):=f(x-2)+3:
plot([f(x), g(x)], x=-3..5, y=-10..10, color=[red,blue]);

 

To solve we must first introduce a coordinate system. The vertex with an angle of 52 degrees will be denoted by  A(0,0,0) , the second vertex by  B(12,0,0) . To find the coordinates of the third vertex  C  of this tetrahedron opposite side  AB , we use the law of sines. The vertex of this tetrahedron is designated by  S .

restart;
with(geom3d):
AC:=fsolve(AC/sin(103*Pi/180)=12/sin(Pi-(52+103)*Pi/180)):
BC:=fsolve(BC/sin(52*Pi/180)=12/sin(Pi-(52+103)*Pi/180)):
point(A,0,0,0): point(B,12,0,0): point(C,AC*cos(52*Pi/180),AC*sin(52*Pi/180),0):
h:=AC*tan(34*Pi/180):
point(S,coordinates(C)[1..2][],h):
geom3d:-gtetrahedron(T, [A,B,C,S]):
draw(T, color="LightBlue", scaling=constrained, transparency=0.8, labels=[x,y,z], orientation=[-65,60]);

                     

I think you can easily do the rest yourself.

 

Maple does not solve this system analytically, but can solve it numerically:

restart;
sys_ode := diff(x(t), t) = -x(t)^2/(4*Pi*y(t)*(x(t)^2 + y(t)^2)), diff(y(t), t) = y(t)^2/(4*Pi*x(t)*(x(t)^2 + y(t)^2));
ics := x(0) = 1, y(0) = 1:

Sol := dsolve({sys_ode, ics}, {x(t),y(t)}, numeric);
plots:-odeplot(Sol,[[t,x(t)],[t,y(t)]], t=0..10, view=[0..10,0..2], color=[red,blue]);

 

I suggest another way to solve the problem. We define the equation of the first curve explicitly, and the equation of the circle – parametrically. When curves are specified explicitly or parametrically (as opposed to specified by implicit equations), the quality of plotting is usually better. In addition, it is easier to solve various problems related to  curves, for example, finding the length of the curve or making animation, etc. In this example, we first find the values of the parameters corresponding to the ends of the circular arc. We also animated this curve using the technique from my post  https://mapleprimes.com/posts/207840-Combinations-Of-Multiple-Animations

restart;
x0:=1.588125352: y0:=0:
t1:=solve(x0=1.81+0.94*cos(t));
t2:=solve(y0=0.42+0.94*sin(t));
A:=plot((-1)*0.39*x^2 + 1.459*x ,x=0..1.588125352, color=red):
B:=plot([1.81+0.94*cos(t),0.42+0.94*sin(t), t=t1..t2], color=red):
with(plots):
plots:-display(A, B, scaling=constrained, size=[800,400]);
A1:=animate(plot,[(-1)*0.39*x^2 + 1.459*x ,x=0..a, color=red], a=0..1.588125352):
B1:=animate(plot,[[1.81+0.94*cos(t),0.42+0.94*sin(t), t=t1..s], color=red], s=t1..t2):
display([A1, display(op([1,-1,1],A1),B1)], insequence, scaling=constrained, size=[800,400]);

                          t1:=1.809081766
                         t2:=-0.4631947616

 

restart;
eq:=-2.*10^(-12)*p[1](t)*q[1](t) + 7.133360604*10^(-8)*p[1](t)*q[0](t) + 2.839877758*10^(-7)*q[0](t)*p[2](t) + p[0](t)*q[0](t) + p[0](t)^2 + q[0](t)^3 + p[1](t) + 8*q[4](t):
selectremove(s->degree(s)<=1, eq);  # Or
selectremove(s->degree(s)<=1, [op(eq)]);

 

To draw circular arcs in 3D you can use the  plots:-spacecurve  command. I also made your code more compact by using the  map  command and multiple assignments. This allowed us to remove a lot of repetitions.

restart;
with(plots): with(plottools): with(geom3d):
Con := cone([0, 0, -2], 0.7, 2, transparency = 0.8, color = "SpringGreen"):
map(point@op, [[A, 0, 0, 0], [B, 0, 0, -2], [C, 0.7, 0, 0]]):
S1, S2, S3 := map(segment@op, [[AB, [A, B]],[AC, [A, C]],[BC, [B, C]]])[]:
G := draw([S1, S2, S3], linestyle = [dash,dash,solid], color = red, thickness = 2):
l := textplot3d([[0, 0, 0, "A", align=right],[0, 0, -2, "B",align=right],[.8, 0, 0, "C",align=left]], font=[times, bold, 20]):
P := plottools:-point(coordinates~([A,B,C]), color=blue, symbol=solidsphere, symbolsize = 14):
Arc1:=spacecurve([0.7+0.35*cos(t),0,0.35*sin(t)], t=-Pi..-Pi/2-arctan(0.7/2), color=red, thickness=2):
Arc2:=spacecurve([0.4*cos(t),0,-2+0.4*sin(t)], t=arctan(2/0.7)..Pi/2, color=red, thickness=2): 
G0:=textplot3d([[0.06, 0, -1.65, alpha, font=[times, bold, 16], color = red], [0.5, 0, -0.1, typeset(`#msup(mn("67"),mo("&deg;"))`), font=[times, bold, 15], color = red]]):
display(Con, G, l, P, G0, Arc1, Arc2, scaling = constrained, orientation = [45, 70], view=[-0.8..0.8,-0.8..0.8,-2.1..0.1], axes=none);

                           

 

 

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