Kitonum

21540 Reputation

26 Badges

17 years, 114 days

MaplePrimes Activity


These are answers submitted by Kitonum

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.


 

Maple writes about an error, you have something mixed up with parentheses. I fixed it and got a constant:

Expr:=(1/10)*exp((2/135)*sqrt(-11)*sqrt(225)*t-(2/3*I)*x+1/15)/((3/10)*exp((2/135)*sqrt(-11)*sqrt(225)*t-(2/3*I)*x+1/5));
simplify(Expr);
plot3d(%, x=-1..1, t=-1..1);

Unfortunately, your system does not have real solutions:

restart;
sys:=[(-x3*cos(x5)+(1010-x4)*sin(x5))^2/x1^2+(-x3*sin(x5)-(1010-x4)*cos(x5))^2/x2^2=1, ((-50.5-x3)*cos(x5)+(1060.5-x4)*sin(x5))^2/x1^2+((-50.5-x3)*sin(x5)-(1060.5-x4)*cos(x5))^2/x2^2=1, ((404-x3)*cos(x5)+(1313-x4)*sin(x5))^2/x1^2+((404-x3)*sin(x5)-(1313-x4)*cos(x5))^2/x2^2=1,  -2*x2^2*cos(x5)^2*x3+2020*x2^2*cos(x5)*sin(x5)-2*x2^2*cos(x5)*sin(x5)*x3-2*x1^2*sin(x5)^2*x3-2020*x1^2*sin(x5)*cos(x5)+2*x1^2*sin(x5)*cos(x5)*x4=0, x5=Pi/2]:
solve(sys);

Of course, you can easily insert the cross between two symbols directly without using any special procedures, and in two ways (in infix or prefix notation).

The first way:
`a &times; b`;  # Infix notation
                              

The second way:
`&times;`(a, b);  # Prefix notation
                             


 In the second method, arguments need not necessarily be symbols. For example, for your example, you can write:

with(LinearAlgebra):
R := Vector(3, [x, y, z]):                                           
V := Vector(3, [u, v, w]):
`R &times; V`=R &x V;

# or
`&times;`(R,V)=R &x V;

                         

 

Your more complicated example:

U:=`R &times; V`;
`&times;`('R', cat(`(`, U, `)`));

                               
 

 

 

with(plots):
with(plottools):
animate(spacecurve,[[sqrt(1-s^2)*cos(t),sqrt(1-s^2)*sin(t),s], t=0..2*Pi, color=red, thickness=3], s=-1..1, background=display(sphere()), frames=60, scaling=constrained, view=[-1.2..1.2,-1.2..1.2,-1.2..1.2]);

                   

    Addition - another option: 

with(plots):
with(plottools):
f:=phi->rotate(spacecurve([cos(t),0,sin(t)], t=0..2*Pi, color=red, thickness=3), phi, [[0,0,0],[0,0,1]]):
animate(display,[f(phi)], phi=0..2*Pi, background=display(sphere()), frames=60, scaling=constrained, view=[-1.2..1.2,-1.2..1.2,-1.2..1.2], axes=normal); 

               

restart;
solve(sin(x)=0, allsolutions);
about(_Z1);


Addition. If you need to solve this equation at some interval, then solve the system to which you need to add  explicit  option.

Example:

solve({sin(x)=0, x>=0, x<=3*Pi}, allsolutions, explicit);
 

To get a  solution, I took an almost zero derivative  D(y)(2945)=0.00001  instead and used Preben's method from here :

restart;
ode:=diff(y(x),x,x)-0.00003019*abs(y(x))^0.337=9.542*10^(-13)*x; 
bcs:=y(0)=0,D(y)(2945)=0.00001;
ode2:=evalindets(ode,`^`,x->op(1,x)^(c*op(2,x)));
res:=dsolve({ode2,bcs},numeric,method=bvp[midrich],continuation=c,maxmesh=8192);
plots:-odeplot(res,[x,y(x)]);

 

Edit.
 

The first way:

restart;
alias(s[1]=sin(theta1), c[1]=cos(theta1)):
sin(theta1)*cos(theta1);


The second way:

restart;
s[1]:=sin(theta1): c[1]:=cos(theta1):
s[1]*c[1];


The third way:

restart;
subs([sin(theta1)=s[1],cos(theta1)=c[1]], sin(theta1)*cos(theta1));



 

 


 

Example:

evalc~([solve(z^3=1+I)]);  # All the roots of the third degree of  1+I  in a+I*b form
convert(%, radical);  # Conversion to radicals
convert~(%, polar);  # Conversion to polar 

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