Ava9

35 Reputation

4 Badges

10 years, 138 days

MaplePrimes Activity


These are questions asked by Ava9

Consider matrices A and B below; how one can plot basis vectors of column space in 2d, and plane or line spanned by basis of row space in 3D?

with(LinearAlgebra):
A := Matrix([[2, 3, 5], [1, 2, 7]]);

ColumnSpace(A);
RowSpace(A);
 
B := Matrix([[6, 4, 2], [3, 2, 1]]);
 
ColumnSpace(B);
RowSpace(B);
 

Suppose we want to compute the following derivate:

x := [x__1, x__2, x__3]

f := [x__1]

Gradf := Matrix(1, 3, (i,j) -> diff(f[i], x[j]));

Gradf2 := Matrix(3, 3, (i,j) -> diff(Gradf[i], x[j]));

 

my question is how to convert Gradf from [1  0 0] to [1,0,0]?

 

Suppose we have a state vector x=[x_1,y_1,theta_1,x_2,y_2,theta_2] and a vector field f=[cos(theta_1),sin(theta_1),0,0,0,0]

How we can define a vector field with 6 dimentions?

with(VectorCalculus);
f := VectorField([cos(theta__1),sin(theta__1),0,0,0,0],'cartesian ??? '[x__1,y__1,z__1,x__2,y__2,z__2]);

I need to compute the Jacobian of f wrt x:

Jacobian(f, [x_1,y_1,theta_1,x_2,y_2,theta_2]

With the following command I can plot two spheres and plot them.

f1 := x^2+y^2+z^2 = 1

f2 := x+y+z = 1

with(plottools);

with(plots);

S1 := implicitplot3d(f1, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, style = patchnogrid, color = blue, scaling = constrained, axes = boxed)

S2 := implicitplot3d(f2, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, style = patchnogrid, color = gold, scaling = constrained, axes = boxed)

dispaly(S1,S2)

My questions are:

1- How can I display (highlight) the circle which is the intersection between these two sphere on the same figure?

2- How can I find the equation of this circle?

Thank you.

Hi;

To compute higher-order lie derivatives we need to pass a vector field to LieDerivative(..) function. What follows is the result of LieDerivative(..) command:

 

To compute 2nd-order lie derivative we should first create a vector field as follows:

L1fh := ((1/2)*(x+u)*(-2*y+2*x)/sqrt((y-x)^2+L^2))*D_x + ((1/2)*(y+v)*(2*y-2*x)/sqrt((y-x)^2+L^2))*D_y + (L^2/sqrt((y-x)^2+L^2))*D_L;

 

Is there a function to extraxt components of an expression which is the result of the LieDerivative(..)? For example how we can extract the first term. i.e. :

 

 

sample code:


with(DifferentialGeometry):


DGsetup([x, y, L], R3);

h := sqrt((y-x)^2 + L^2);
 
f := evalDG((x+u)*D_x + (y+v)*D_y + L*D_L);

L1fh := LieDerivative(f, h);

simplify(L1fh);
       
L2fh := LieDerivative(L1fh, h);


L1fh := ((1/2)*(x+u)*(-2*y+2*x)/sqrt((y-x)^2+L^2))*D_x + ((1/2)*(y+v)*(2*y-2*x)/sqrt((y-x)^2+L^2))*D_y + (L^2/sqrt((y-x)^2+L^2))*D_L;

L2fh := LieDerivative(L1fh, h);


simplify(L2fh);


 

1 2 Page 1 of 2