Rouben Rostamian

MaplePrimes Activity


These are answers submitted by Rouben Rostamian

I couldn't execute your worksheet in Maple 2015.  It ran into errors.

But just looking through it I formed an idea of what it is that you want to do and produced this worksheet: mw.mw

The end result is:

As to your question about the area of the spherical triangle, there are very many neat formulas for it.  See the Wikipedia article:

    https://en.wikipedia.org/wiki/Spherical_trigonometry

where you wil find formulas for the area in terms of the angles a,b,c (these are the angle between the vectors shown in the graphics above) or the angles A,B,C (these are the actual angles at the triangle's vertices measured on the sphere's surface).  Both sets of angles may be calculated easily in terms of dot products and cross products from the given data.

 

If I am not mistaken, the following worksheet does what you are asking.

mw.mw

Here is the graph of the function which is expressed as an integral in your post:

Here is one of many different ways of writing a loop:

for V from 1 to 30 do
   ....
end do;

 

convert(abs(1-b)+abs(1+b), piecewise);

D[1,1](w) means the second derivative of w(x,y) with respect to x.  Then D[1,1](w)(x,0) means the second derivative in the x direction along the bottom edge.  Surely you don't mean that.  If your intent is to specify zero bending moment along the bottom edge, you want D[2,2](w)(x,0)=0.

General advice: If you are having difficulty with a complex problem, see if you can do a simpler problem first.

So forget about your F_T for the moment.  Do you know how to work with your Esolve()?

For that, examine what Esolve() does, and what its parameters are.

We see that Esolve() is designed to solve a system of differential equations of the form dy/dx = f(y,x) for the unknown vector-valued function y(x).

The intial condition is y(x0) = y0.

The solution is produced by taking N steps of stepsize h.

You are interested in solving a problem of the type dv/dt = F(v,t).  Thus, your v and t correspond to Esolve()'s y and x, respectively.

Let's give it a try with a function f which takes a vector <v[1], v[2]> as argument and returns the vector <-v[2],v[1]>.  Thus, in Maple we set:

f := v -> <-v[2], v[1]>;

For the initial value pick v(0) = <1,0>.  Now solve with stepsize h = 0.1 and take 25 steps:

sol := Esolve(f, 0.1, 0, <1,0>, 25);

Plot the solution, that is, v(t) versus t:

plots:-pointplot([seq(sol[i], i=0..25)], scaling=constrained, color=red, connect=true);

See if you can take it up from there.

This solution is obtained by eyeballing the figure, not through any algorithm:

Replace 1 with 1.0001 in the square root:

plots:-shadebetween(2,1/sqrt(1.0001-x^2), x=0..sqrt(3)/2);

That looks like a bug to me.  I suggest that you report it.

In the meanwhile, you may get the desired plot by "cheating" as follows.  Exchange the x and y axes temporarilty, and plot whatever you want "sideways":

plot(
  [[2, x, x=0..sqrt(3)/2],
   [1/sqrt(1-x^2), x, x=0..sqrt(3)/2]
  ], color=[red,blue], thickness=3, filled=[color=yellow]);    p := %:

Then apply plottools:-transform() to restore the x and y axes to their standard positions:

plottools:-transform((x,y)->[y,x])(p);

Producing a plot of that motion is quite trivial in Maple, and it is quite likely that that several people will show you how.  However, since you are taking a course in advanced dynamics, I think you will benefit from figuring this out in your head.  I suggest that you begin with simpler problems.

  1. What does the motion

    r(t) = cos(ωt) i + sin(ωt) j

    look like?  If you don't see that, then I am afraid that this is not quite the right time for advanced dynamics.

  2. What does the motion

    r(t) = (a cos(ωt))i + (b sin(ωt))j

    look like?  This is only slightly different from the previous one.

  3. Now you should be ready to answer your original question.  None of these requires help from Maple.

The equation of motion given in Peter Stone's note is not correct.  The correct equation is

(1 + f'(x)^2)*a + f'(x)*f''(x)*v^2 + g*f'(x) = 0,

where a = diff(x(t),t,t),  v = diff(x(t),t), assuming zero friction. I haven't worked out the case with nonzero friction but that should make no difference to you since you are setting the friction to zero anyway.

This is not ideal, but may be of some use to your students.

Define

    f := (r,t) -> r*exp(t/180*Pi*I):
    F := proc(z) polar(z); evalf(op(1,%)), evalf(op(2,%)*180/Pi); end proc:

Then the equivalent of your 4 < 45 + 5 < 30 = 8.9240 < 36.332 would be

    F(f(4,45) + f(5,30));
                            8.923958373, 36.66193394

And in the same vein:

    F(f(4,45) + f(5,30) - f(3,60));

                            6.282837822, 25.75811853

    F(f(4,45) * f(5,30));
                            20., 74.99999999

de := diff(y(x),x,x) + y(x) = sin(x);

eval(de, y(x)=sin(x));

I see that you have posted an answer to your own question.  In the meantime I came up with my own solution which, in retrospect, is very similar to yours, but perhaps a little more organized.  Here it is  mw.mw for whatever it's worth.

with(LinearAlgebra):
A := Matrix(3,3, symbol=a);
B := Matrix(3,3, symbol=b);
M1 := DiagonalMatrix([A,0,0]);
M2 := DiagonalMatrix([0,0,B]);
M := M1 + M2;
 
First 50 51 52 53 54 55 56 Page 52 of 58