Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@John May Thanks for looking into this and offering a workaround.

@Math-dashti There is some flexibility in selecting the initial conditions, but they are not quite arbitrary.

Begin with finding the det, tra, dsc, and eigenvalues as I have shown in the worksheet.  With the help of that information, and the table and Figure 2.3.7 that you have provided, determine which of the ten possible phase portraits corresponds to your case.

Let's say that you have determined that the phase portrait is the one at the top-left of Figure 2.3.7. Looking at that phase portrait, you should be able to tell which initial conditions to pick.  That's how I picked the initial conditions in my solution of Exercise 7.

I suggest that you apply this method to solve Exercises 6, 4, 1 (in that order!) before attempting the others.

@C_R Maple's plottools:-rotate makes it possible to rotate a 3D plot about a vector n by angle phi if the objective is merely to rotate a PLOT3D structure.  To find the equation of the rotated torus, however, as it was done in the example, it will help to have something like quaternion algebra.  Furthermore, we will need full-fledged support for quaternion algebra and calculus to formulate differential equations of motion of a rigid body.  I will be happy to see that become reality in Maple some day.

@rlewis  It's difficult to provide help in the absence of concrete data.  As dharr pointed out, you can help others to help you if you upload your maple worksheet.

In the browser, hit Reply to your original post.  In the editor window that comes up, click on the big fat green arrow and follow instructions to upload your worksheet.

@acer Thanks for confirming the issue.  It did test this on Maple 2024 before posting, but did not go further back.  I will file an SCR.

@dharr Thanks for the workaround.  That's very helpful.

A lesson without an example is not very useful.  Here is a concrete example that illustrates how to rotate an object via quaternions.

restart;

with(plots):

The  product of the quaternions p=[a,u] and q=[b,v]

qProd := proc(p, q)
        local a, b, u, v;
        a := p[1];
        u := p[2];
        b := q[1];
        v := q[2];
        return [a*b - u^+.v, a*v + b*u + LinearAlgebra:-CrossProduct(u,v)];
end proc:

The conjugate of the quaternion p

qConj := proc(p)
        return [p[1], -p[2]];
end proc:

Vector(3, {(1) = 1/3, (2) = 2/3, (3) = 2/3})

(1/3)*Pi

Quaternion for rotating about the unit vector n by angle phi

n := < 1,2,2 >/3;
phi := Pi/3;
q := [ cos(phi/2), n*sin(phi/2) ];

Vector(3, {(1) = 1/3, (2) = 2/3, (3) = 2/3})

phi := (1/3)*Pi

[(1/2)*3^(1/2), Vector[column](%id = 36893622606788529436)]

Rotate the point r via the formula q o [0,r] o q*;

r := < x, y, z >;
rot := simplify(qProd(q, qProd([0,r], qConj(q))));

Vector(3, {(1) = x, (2) = y, (3) = z})

[0, Vector[column](%id = 36893622606788518484)]

The scalar part of the result is zero, as stated before.   The vector part of the result is the rotated position of r, let's call it v:

v := rot[2];

Vector(3, {(1) = (-(1/3)*y+(1/3)*z)*sqrt(3)+(5/9)*x+(1/9)*y+(1/9)*z, (2) = ((1/3)*x-(1/6)*z)*sqrt(3)+(1/9)*x+(13/18)*y+(2/9)*z, (3) = (-(1/3)*x+(1/6)*y)*sqrt(3)+(1/9)*x+(2/9)*y+(13/18)*z})

We see that v is related to r through a matrix multiplication, that is, v = R . r.

Here is the matrix R:

R := LinearAlgebra:-GenerateMatrix([seq](v), [x,y,z])[1];

Matrix(3, 3, {(1, 1) = 5/9, (1, 2) = -(1/3)*sqrt(3)+1/9, (1, 3) = (1/3)*sqrt(3)+1/9, (2, 1) = (1/3)*sqrt(3)+1/9, (2, 2) = 13/18, (2, 3) = -(1/6)*sqrt(3)+2/9, (3, 1) = -(1/3)*sqrt(3)+1/9, (3, 2) = (1/6)*sqrt(3)+2/9, (3, 3) = 13/18})

As a concrete example, consider the parametrically defined torus

T := < (3 + cos(t))*cos(s), (3 + cos(t))*sin(s), sin(t) >;

Vector(3, {(1) = (3+cos(t))*cos(s), (2) = (3+cos(t))*sin(s), (3) = sin(t)})

Rotate that torus about the vector n by angle phi:

T__rot := R . T;

Vector(3, {(1) = (5/3+(5/9)*cos(t))*cos(s)+(-(1/3)*sqrt(3)+1/9)*(3+cos(t))*sin(s)+((1/3)*sqrt(3)+1/9)*sin(t), (2) = ((1/3)*sqrt(3)+1/9)*(3+cos(t))*cos(s)+(13/6+(13/18)*cos(t))*sin(s)+(-(1/6)*sqrt(3)+2/9)*sin(t), (3) = (-(1/3)*sqrt(3)+1/9)*(3+cos(t))*cos(s)+((1/6)*sqrt(3)+2/9)*(3+cos(t))*sin(s)+(13/18)*sin(t)})

plot3d([T, T__rot], s=-Pi..Pi, t=-Pi..Pi, color=["Green","Orange"], style=surface, scaling=constrained);

 

Download rotation-quaternion.mw

That's rather odd.  If the point are collinear, then the area would be simply zero.  We don't need conditions for that.  Maple's answer would have made sense before the invention of zero.

@one man Okay, now I see what you are doing.  You specify the paths of the contact point independently on the two surfaces, and then roll one surface against the other while requiring the contact point to stay on both paths.  In that case there is one degree of freedom, and all is well.

As to the Latinization of Dragilev, I see that "Dragilev's Method" is written "Метод Драгилева" in Russian, so the Latinized name is "Dragilev".  There is no reason to insert an "h" there.

Edit: The impresario of Ballets Russes, Sergei Diaghilev (Сергей Дягилев), spelled his Latinized name with a "gh", but that was influenced by the Italian orthography, as he lived in Italy, died in Venice, and is buried there.

@one man As far as I know, Dragilev's method applies to systems with one degree of freedom.  The method may be extended to systems with more degrees of freedom but then the resulting equations will be PDEs, not ODEs.

The rolling torus has two degrees of freedom -- it can roll, and it can also spin about its point of contact without rolling.  I can't tell how your worksheet handles that.  Perhaps it makes an assumption on the type of motion that reduces two degrees of freedom to one.

@Carl Love Yes, you are right and I agree with everything that you have written.  I should have been explicit that the roots occur in pairs, and the equal spacing refers to the spacing of the pairs. When I wrote about the roots of f(x) = x^2 + e, I was thinking of the leftmost and rightmost roots in your diagram.

That looks very nice.  Vote up!

Looking through the worksheet, I don't see anything like equations of dynamics.  What does determine the motion of the little torus?

@one man After the transformation x^3 = s, the roots within each cluster are pretty much equally spaced, so it would be difficult to miss any one of them.

There is, however, the following consideration.  Suppose that we are looking for the roots of the function f(x) = x^2 + e.  We see that there are no roots if e > 0 and two roots if e < 0.  But if the size of e is smaller than what the floating point representation can resolve, deciding whether e is positive or negative is ill-posed, and that can lead to lost roots or false roots.

That same thing can happen in the problem that you have posed.  To detect that, I we would do the calculation with some setting of Digits, and then repeat with a larger value of Digits and check if the number of roots changes.

But you are asking for an a priori guarantee for detecting such exceptional cases.  I don't see a good way of doing that.

@one man The number of roots within each cluster is proportional to the length of the interval between the consecutive zeros of the function cos(0.25*surd(s,3)).  These intervals become longer as s grows, and so the cluster sizes become larger.  The first cluster, located in 1800 < s < 2181, is the smallest one, and as we have seen, it contains 122 roots.  In the same way we find that the next cluster corresponds to 15128 < s < 16646 and contains 482 roots.

As the clusters grow in size the farther away we go from the origin, I don't understand what you mean by the "most distant" cluster.

@nm Yes, I agree.   If Maple cannot determine the arbitrary constant, it should return NULL instead of something involving the constant.

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