## 20 Reputation

5 years, 316 days

## How to find equation of the intersectio...

Maple 11

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.

## Extract term from Lie derivative...

Maple

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);

## How to compute Lie derivative? ...

Maple

Hi;

Could anyone help me to compute the lie derivative of the function h:R^3-->R with respect to the vector-valued function f:R^5-->R^3 below?

``f(x,y,L,u,v) `= [x + u;               y + v;               L]and h(x,y,L) = sqrt((y-x)^2 + (L)^2)`
` `

## Suppress warning messages...

Maple

Hi;

I've written a Maple's procedure but when I execute it some warning messages have been displayed as follows:

Warning, `L` is implicitly declared local to procedure `My_Proc`
Warning, `P` is implicitly declared local to procedure `My_Proc`
Warning, `V` is implicitly declared local to procedure `My_Proc`

So, how can I get rid of such warnings?

## Shift vector components...

Maple

Hello;

Suppose we have a vector as follows:

Plex:=[u,v,w,x,y,z]

Could anyone help me to reproduce the following vectors via a "for" loop?

[ v, u, w, x, y, z]

[ w, v, u, x, y, z]

[ x, w, v, u, y, z]

[ y, x, w, v, u, z]

I have a simple Matlab script which can do what I intend. So, my question is how can I implement this script in Maple?

Plex=[u,v,w,x,y,z]

for i=2:5

Plex=[Plex(i) Plex];

Plex(i+1)=[];

disp(Plex)

end