Kitonum

21475 Reputation

26 Badges

17 years, 49 days

MaplePrimes Activity


These are answers submitted by Kitonum

The intersection of two cylindars:

B1:=plots:-spacecurve(1.005*[cos(t),sin(t),cos(t)], t=0..2*Pi, color=blue,thickness=3):
B2:=plots:-spacecurve(1.005*[cos(t),sin(t),-cos(t)], t=0..2*Pi, color=blue,thickness=3):
S1:=plot3d([[cos(t),sin(t),z],[-cos(t),sin(t),z]], t=-Pi/2..Pi/2, z=-cos(t)..cos(t), style=surface, color=green):
S2:=plot3d([[x,cos(t),sin(t)],[x,cos(t),-sin(t)]], t=0..Pi, x=-sin(t)..sin(t), style=surface, color=yellow):
plots:-display(B1,B2,S1,S2, scaling=constrained, axes=normal, view=[-1.4..1.4,-1.4..1.4,-1.4..1.4]);

                       

 

   
Addition. We can calculate the volume using a simple 1-integral if we notice that in the intersection with the plane  y=C  we have the square with the side  2*sqrt(1-C^2) :

V=2*int((2*sqrt(1-y^2))^2, y=0..1);

                                           V=16/3

Specify the value of A and remove one extra initial condition (should be 8).

See corrected file.

code_for_eigen_value_new.mw

Apply  ListTools:-Categorize  command to the list  convexhull(X), which will divide the entire list of points into equivalence classes according to the equality of the first coordinates. Then from each class choose the point with the smallest second coordinate.

A:=a^k*k/(a*a__0^k);
subs(a__0^(-k)=1/a__0^k, simplify(A));


Addition: here is a more general and programmatic way. Procedure  P  replaces any power with a negative exponent with a positive exponent.

P:=expr->evalindets(expr,`^`,t->`if`(sign(op(2,t))=-1,1/op(1,t)^(-op(2,t)),t)):


Examples of use:

P(simplify(a^k*k/(a*a__0^k)));  # The initial example
P(a^b-c^(-3)+1/(2^(-a)+c^(-b))+a^(-3)*b^(-3));  # More complicated example

                


 

The shorter ways:

eval([x,y,z], solve({2*x+y-3*z-3=0,x=-1+3*t,y=1+t,z=2-t}));
# or
solve({2*x+y-3*z-3=0,x=-1+3*t,y=1+t,z=2-t})[2..-1];
                                         [2, 2, 1]
                                {x = 2, y = 2, z = 1}


Another way is to use  geom3d :

with(geom3d):
intersection(P, line(l, [-1+3*t, 1+t, 2-t], t), plane(p, 2*x+y-3*z-3 = 0, [x, y, z])):
coordinates(P);

                                          [2, 2, 1]


Edit.

The curves  x(t)  and  y(t)  are periodic with some period T. If I correctly understood the question, then we should depict these curves on the cylinder of radius  T/(2*Pi) .

Example:

Eq:=diff(x(t),t)=4*x(t)-3*x(t)*y(t), diff(y(t),t)=x(t)*y(t)-2*y(t):
inc:=x(0)=1.5, y(0)=1:
sol:=dsolve({Eq, inc}, {x(t),y(t)}, numeric):
A:=plots:-odeplot(sol, [[t,x(t)], [t,y(t)]], t=0..5, color=[blue,red], thickness=3,  view=0..3.5):  
A;
 # x(t) and y(t) in the range t=0..5

      
f:=s->eval(y(t),sol(s)):
T:=fsolve(f-1, 2..2.5);
 # The period
r:=T/2/Pi;  # The radius of the cylindar
B:=plots:-odeplot(sol, [[t,x(t)], [t,y(t)]], t=0..T, color=[blue,red], thickness=3,  view=0..3.5):
B;
 # x(t) and y(t) in the range t=0..T


F:=plottools:-transform((x,y)->[r*cos(x/r),r*sin(x/r),y]):
plots:-display(plot3d([r*cos(t),r*sin(t),h],t=0..2*Pi,h=0..3.5, style=surface, color=pink), F(B), axes=normal, view=[-0.43..0.43,-0.43..0.43,0..3.7]);
 # The curves x(t) and y(t) on the cylindar

          

Curves_on_cylindar.mw

1. I do not know how to strictly prove that at  theta=Pi  there will be a singularity, but probably this is exactly so. If we set Digits:=100, we can calculate for  theta=Pi-10^(-95). We see that there is no stabilization, the values of the function  mu[1](theta)  are steadily decreasing.

2. I corrected your second file also.

1_new.mw

2_new.mw

f:= w^8+w^6+4*w^4+w^2+1: 
g:= w^16+2*w^14+9*w^12-2*w^10+44*w^8-2*w^6+9*w^4+2*w^2+1:
A:=[fsolve(f, complex)];
B:=[fsolve(g, complex)];
pA:=[Re,Im]~(A);
pB:=[Re,Im]~(B);
plots:-display(plot([pA, pB], style=point, color=[blue,red], symbol=solidcircle, symbolsize=15), plot([cos(t),sin(t),t=0..2*Pi], color=black), scaling=constrained); 

 

We get a better plotting quality if we use a different method. Also this method does not use  plots:-shadebetween  command, so it is suitable for older versions of Maple.
We use the fact that the projection of the solid on xOy plane is an ellipse.

restart;
eliminate({x^2+y^2-z^2=0, x+2*z=3}, z);
Student:-Precalculus:-CompleteSquare(%[2][],x);
((%=0)+12)/12;
# The equation of the ellipse
a:=2: b:=sqrt(3): 
A:=plot3d(eval([x,y,sqrt(x^2+y^2)],[x=a*r*cos(t)-1,y=b*r*sin(t)]), r=0..1,t=0..2*Pi):
B:=plot3d(eval([x,y,(3-x)/2],[x=a*r*cos(t)-1,y=b*r*sin(t)]), r=0..1,t=0..2*Pi):
plots:-display(A,B, axes=normal, scaling=constrained);

      

 


 

p1 and p2 are the same plane, because the coefficients are proportional. So angle=0 degrees

I do not think that there is a simple formula expressing this integral for arbitrary numbers  a  and  m. It is reasonable to write this down as a procedure:

P := (a, m)->int((x-a)^m/x, x);


Examples of use:

P(2, 3); 
P(-2, 3); 
P(2, -3);

A:=a*diff(F(x,y),x,x)+b*diff(G(x,y),x,x)+c*diff(F(x,y),x,y)+d*diff(F(x,y),x,x)+e*diff(G(x,y),x,y)+f*diff(F(x,y),y,y)+g*diff(G(x,y),x,y);
sort(collect(A, diff), (x,y)->(has(x,F) and has(y,G)));

 

 

Edit.

If you calculate the integral numerically, you need to pre-specify the values of all parameters.

Example:

f := exp(-1/2*(xop^2+yop^2))*exp(-((x-xop-2*Pe*(t-tp))^2+(y-yop)^2+z^2)/(4*(t-tp)))/((4*Pi^(3/2))*(t-tp)^(3/2));
x:=1: y:=2: z:=3: Pe:=4: t:=5:
deltaT := Int(f, [yop = -(-xop^2+1)^(1/2) .. (-xop^2+1)^(1/2), xop = -1 .. 1, tp = 0 .. t]);
evalf(%);

  

Your system in a real 3D defines the usual circle and the problem is to get formulas for obtaining the coordinates of any point of this circle.

S:= solve({2*x+y+z = 3, x^2+y^2+z^2 = 3}, [x, y, z], real, parametric); 

This is only one way to get an answer, in which Maple selects the variable  as a parameter. Here are 3 more ways:

S1:=solve({2*x+y+z = 3, x^2+y^2+z^2 = 3}, [y, z], real, parametric);
S2:=solve({2*x+y+z = 3, x^2+y^2+z^2 = 3}, [x, z], real, parametric);
S3:=solve({2*x+y+z = 3, x^2+y^2+z^2 = 3}, [x, y], real, parametric);

In  S1  method, Maple also takes  x  as a parameter and writes out the values of  [y, z]  as  functions of this parameter. Only the answer is more structured and the values  x  are indicated when there are no real solutions. In  S2  and  S3  methods, everything is the same, only as parameters  y  and  z  are selected. 

All these methods are inconvenient, because they are very cumbersome and do not allow you to easily work with them to solve, for example, such problems: find 100 points on this circle, evenly located on it, or build an animation to build this circle.

Below, we construct a single parametrization of this circle using an angle in the range  0..2*Pi . This angle is the angle of the rotation of a point on this circle with respect to the axis passing through the origin and the center of the circle:

restart;
Sys:=2*x+y+z = 3, x^2+y^2+z^2 = 3:
V:=<2,1,1>:
 # Vector of a normal to the plane 2*x+y+z = 3 
L:=x=2*t,y=t,z=t:  
# Parametric equations of the straight line with a directing vector V
convert(solve([L,2*x+y+z = 3]),list);
C:=rhs~(%[2..-1]);
# The center of the circle
solve({y=1/2,Sys}, explicit);
P:=rhs~(convert(%[1], list));
# The point on the circle for the initial value of the parameter t=0
M:=simplify(Student:-LinearAlgebra:-RotationMatrix(t, V));
# The matrix of rotation around the vector V
Eq:=simplify(convert(M.convert(P-C,Vector),list))+C;
# The parametric equation of the circle

 

## Two examples of the use the parametrization Eq  
with(plots): with(plottools):
display(sphere(sqrt(3)),spacecurve(Eq, t=0..2*Pi, color=red, thickness=4), view=[-2.3..2.3,-2.3..2.3,-2.3..2.3], axes=normal, scaling=constrained);
animate(spacecurve,[Eq, t=0..s, color=red, thickness=4], s=0..2*Pi, background=display(sphere(sqrt(3))), axes=normal, view=[-2.1..2.1,-2.1..2.1,-2.1..2.1], scaling=constrained, orientation=[20,70,0]);


 

 
 

 

Usually these commands (select and remove)  are applied to lists, so do so

remove(has, [D[1](xx[0])], xx[0]);
select(has, [D[1](xx[0])], xx[0]);


The square brackets can be easily removed from the result, if necessary.


 

First 144 145 146 147 148 149 150 Last Page 146 of 290