Earl

930 Reputation

8 Badges

19 years, 22 days

MaplePrimes Activity


These are questions asked by Earl

Can Maple determine the value of DthetaZero such that the solution to the ODE, for some specific value of t, simultaneously provides the two values theta(t)=Pi and diff(theta(t),t)=0?

sol:=dsolve({4*sin(theta(t))*cos(theta(t))-9.8100*sin(theta(t))-(diff(theta(t), t, t)) = 0, theta(0) = 2*Pi*(1/3), D(theta)(0) = DthetaZero}, numeric)

odeplot(sol,[t,theta(t),diff(theta(t),t)],t=0..5) for trial values of DthetaZero shows that the desired value is

1.0340*Pi <DthetaZero<1.0345*Pi.

I am trying to duplicate the answer to a problem of the nutation of a spinning top. The problem is number 6.1.3 in the book Computer Algebra Recipes for Classical Mechanics by Richard Ens and George McGuire.

TopSC := `<,>`(5*sin(z)*exp(-(Pi-z)/(1.5)), 0, z) for z = 0..Pi

Spacecurve TopSC, when rotated about the z axis, generates the surface of revolution of the top.

The solution requires knowing the moments of inertia (MI) of the top about the z axis and the x or y axis.

Does the following integral correctly calculate the MI about the z axis?

int(2*Pi*TopSC[1]*(TopSC[1]^2), [z = 0 .. z, z = 0 .. Pi])

What sequence of Maple 2016 commands will calculate the top's MI about the x or y axis?

The code below projects a torus illuminated by a point light source located at the origin onto an ellipsoid as the torus's centre moves along the x axis from [-0.8,0,0] to [0.8,0,0].

Ellipsoid := (1/32)*x^2+(1/18)*y^2+(1/12)*z^2 = 1:
EllipsoidTitle := Typesetting:-Typeset((1/32)*x^2+(1/18)*y^2+(1/12)*z^2 = 1):
DispEllipsoid := implicitplot3d(Ellipsoid, x = -10 .. 10, y = -10 .. 10, z = 1.25 .. 5, style = surface, color = yellow, grid = [30, 30, 30]):
TorusVorig := Vector([(1+.25*cos(v))*cos(u), (1+.25*cos(v))*sin(u), .6+.25*sin(v)]):

i := 0;

for x from -.8 by .1 to .81 do

i := i+1;

TorusV := `<,>`(x, 0, 0)+TorusVorig:

DispTorusV := plot3d(TorusV, u = 0 .. 2*Pi, v = 0 .. 2*Pi, shading = xyz):

NormTorusV := Normalize(TorusV, Euclidean):

Vadj := solve((1/32)*w^2*NormTorusV[1]^2+(1/18)*w^2*NormTorusV[2]^2+(1/12)*w^2*NormTorusV[3]^2 = 1, w):

if evalf(eval(Vadj[1]*NormTorusV[3], [u = Pi, v = Pi])) > 0 then

DispTorusVproj := plot3d(Vadj[1]*NormTorusV, u = 0 .. 2*Pi, v = 0 .. 2*Pi):

else

DispTorusVproj := plot3d(Vadj[2]*NormTorusV, u = 0 .. 2*Pi, v = 0 .. 2*Pi):

end if:

Disp[i] := display(DispTorusV, DispEllipsoid, DispTorusVproj, view = [-10 .. 10, -10 .. 10, 0 .. 5], scaling = constrained, Plot3Daxes, title = typeset("Project %1 onto %2 from a light at the origin", TorusV, EllipsoidTitle), titlefont = [Courier, bold, 14]):

end do:

display(seq(Disp[j], j = 1 .. i), insequence = true);

How can I plot the unmoving torus centred on the z axis projected onto the ellipsoid illuminated by a point light source moving on the x axis from [-0.8,0,0] to [0.8,0,0]?

Executing HelpTools:-Database:-ConvertAll(): produced file DirectSearch.help apparently without content. How can all content within DirectSearch.hdb be converted to a .help file accessible through help in Maple 2016?

In a post of April 15, 2013 by Kitonum, the procedure named Picture accepts a list of polygon segments, creates a plot of these as a 2D polygon's boundaries and fills the polygon with a color.

The code below attempts to modify Picture to produce a 3D filled polygon in a plane parallel to the xy plane.

When invoked by the code below the procedure, the filling color conforms to the straight line boundaries but overflows the curved, parabolic boundary. How can this be corrected?

Picture:=proc(L, C, N::posint:=100, Boundary::list:=[linestyle=1])

 local i, var, var1, var2,e, e1, e2,e3, P, h ;

 global Q,Border;

 for i to nops(L) do    

#` set P`[i] = list of points for each segment.    

#` for a segment defined as a list of points, P[i] = the segment's definition`

#` for a curve definition, approximate it with a list of [x,y] points of its function evaluated at N even intervals in its

# range`  

  if type(L[i],listlist(algebraic))  then P[i]:=op(L[i]);   else  

  #` for curve def'n, set var = def'n and h= `(variable range)/(2)

  var:=lhs(L[i,2]);  var1:=lhs(rhs(L[i,2]));  var2:= rhs(rhs(L[i,2])); h:=(var2-var1)/(N);

  #` for function def'n, set e=function`

 if type(L[i,1], algebraic) then  e:=L[i,1];

  #` for polar function r=f(t) create N values of the [cos*r,sin*r] i.e. the equivalent [x,y] values for r valued at N even

  # divisions of its range`  

 if nops(L[i])=3 then P[i]:=seq(subs(var=var1+h*i,[e*cos(var), e*sin(var)]), i=0..N);  else

    #` for non-polar function y=f(x) create N values of [x,y] for x values at N even divisions of its range`  

 P[i]:=seq([var1+h*i, subs(var=var1+h*i,e)], i=0..N)  fi;  else

 #` for parametric function [f`(t),g(t)] create N values of [f(t),g(t)] for t values at N even divisions of its range.

     e1:=L[i,1,1];  e2:=L[i,1,2];

#` P`[i]:=seq(subs(var=var1+i*h,[e1, e2]), i=0..N):

 P[i]:=seq([subs(var=var1+i*h,e1), subs(var=var1+i*h,e2),0], i=0..N) fi; fi; od;  #`  MODIFIED FOR 3 D `[f(t), g(t), 0] 

  Q:=[seq(P[i], i=1..nops(L))];

 Border:=plottools[curve]([op(Q), Q[1]],  op(Boundary));

     #` the shaded figure is a polygon whose vertices are Q, whose interior color is C`  

 #` return a list of the polygon and its border`

   [plottools[polygon](Q, C),  Border];

 end proc: 

L := [[[0, 0, 0], [0, 1, 0]], [[x, x^2+1, 0], x = 0 .. 2], [[2, 5, 0], [2, 2, 0]], [[x, x, 0], x = 2 .. 0]]:

plots[display](Picture(L, color = yellow), axes = normal, scaling = constrained)

First 22 23 24 25 26 27 28 Page 24 of 28