Education

Teaching and learning about math, Maple and MapleSim

Mechanics of Materials toolbox for Maple: 10 (or bit more :)) free licences for Maple fans.

For students, engineers and simply creative fans of Maple.

If you are concerning mechanics of materials or structural mechanics, please feel free to

send Hardware ID code via e-mail: support@orlovsoft.com after downloading from

http://www.orlovsoft.com/download.html

and installing MM Toolbox for Maple.

(Maple 32 bit only)

Thanks to Maplesoft for analytic power

Given a figure in the plane bounded by the non-selfintersecting piecewise smooth curve. Each segment in the border defined by the list in the following format (variable names  in expressions can be arbitrary):

1) If this segment is given by an explicit equation, then  [f(x), x=x1..x2)]

2) If it is given in polar coordinates, then  [f(phi), phi=phi1..phi2, polar] , phi is polar angle

3) If the segment is given parametrically, then  [[f(t), g(t)], t=t1..t2]

4) If several consecutive segments or entire border is a broken line, then it is sufficient to set vertices the broken line [ [x1,y1], [x2,y2], .., [xn,yn]]

 

The first procedure symbolically finds perimeter of the figure. Global variable  Q  saves the lengths of all segments.

Perimeter := proc (L) #  L is the list of all segments of the border

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

global Q;

for i to nops(L) do if type(L[i], listlist(algebraic)) then P[i] := seq(simplify(sqrt((L[i, j, 1]-L[i, j+1, 1])^2+(L[i, j, 2]-L[i, j+1, 2])^2)), j = 1 .. nops(L[i])-1) else

var := lhs(L[i, 2]); var1 := min(lhs(rhs(L[i, 2])), rhs(rhs(L[i, 2]))); var2 := max(lhs(rhs(L[i, 2])), rhs(rhs(L[i, 2])));

if type(L[i, 1], algebraic) then e := L[i, 1]; if nops(L[i]) = 3 then P[i] := simplify(int(sqrt(e^2+(diff(e, var))^2), var = var1 .. var2)) else

P[i] := simplify(int(sqrt(1+(diff(e, var))^2), var = var1 .. var2)) end if else

e1 := L[i, 1, 1]; e2 := L[i, 1, 2]; P[i] := abs(simplify(int(sqrt((diff(e1, var))^2+(diff(e2, var))^2), var = var1 .. var2))) end if end if end do;

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

add(Q[i], i = 1 .. nops(Q));

end proc:

 

The second procedure symbolically finds the area of the figure. For correct work of the procedure, all the segments in the list L  of border must pass sequentially in clockwise or counter-clockwise direction.

Area := proc (L)

local i, var, e, e1, e2, P;

for i to nops(L) do

if type(L[i], listlist(algebraic)) then P[i] := (1/2)*add(L[i, j, 1]*L[i, j+1, 2]-L[i, j, 2]*L[i, j+1, 1], j = 1 .. nops(L[i])-1) else

var := lhs(L[i, 2]);

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

if nops(L[i]) = 3 then P[i] := (1/2)*(int(e^2, L[i, 2])) else

P[i] := (1/2)*simplify(int(var*(diff(e, var))-e, L[i, 2])) end if else

e1 := L[i, 1, 1]; e2 := L[i, 1, 2]; P[i] := (1/2)*simplify(int(e1*(diff(e2, var))-e2*(diff(e1, var)), L[i, 2])) end if end if

end do;

abs(add(P[i], i = 1 .. nops(L)));

end proc:

 

The third procedure shows this figure. To paint the interior of the boundary polyline approximation is used. Required parameters: L - a list of all segments of the border and C - the color of the interior of the figure in the format color = color of the figure. Optional parameters: N - the number of parts for the approximation of each segment (default N = 100) and Boundary is defined by a list for special design of the figure's border (the default border is drawed by a thin black line). The border of the figure can be drawn separately without filling the interior by the global variable Border.

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

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

global Border;

for i to nops(L) do

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

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

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

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

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

e1 := L[i, 1, 1]; e2 := L[i, 1, 2]; P[i] := seq(subs(var = var1+h*i, [e1, e2]), i = 0 .. N) end if end if

end do;

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

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

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

end proc:

 

Examples of works:

Example 1.

L := [[sqrt(-x), x = -1 .. 0], [2*cos(t), t = -(1/2)*Pi .. (1/4)*Pi, polar], [[1, 1], [1/2, 0], [0, 3/2]], [[-1+cos(t), 3/2+(1/2)*sin(t)], t = 0 .. -(1/2)*Pi]];

Perimeter(L); Q; evalf(`%%`); evalf(`%%`); Area(L); 

plots[display](Picture(L, color = grey, [color = "DarkGreen", thickness = 4]), scaling = constrained);

plots[display](Border, scaling = constrained);

Example 2.

The easiest way to use this  procedures for polygons.

 L := [[[3, -1], [-2, 2], [5, 6], [2, 3/2], [3, -1]]];

Perimeter(L), Q;

Area(L);

plots[display](Picture(L, color = pink, [color = red, thickness = 3]));

 

 

Example 3 (more complicated )

3 circles on the plane C1, C2 and C3 defined by the parametric equations  of their borders. We want to find the perimeter, area, and paint the figure  C3 minus (C1 union C2) . For details see attached file. 

C1 := {x = -sqrt(7)+4*cos(t), y = 4*sin(t)};

C2 := {x = 3*cos(s), y = 3+3*sin(s)};

C3 := {x = 4+5*cos(u), y = 5*sin(u)};

L := [[[-sqrt(7)+4*cos(t), 4*sin(t)], t = -arccos((1/4)*(7+4*sqrt(7))/(sqrt(7)+4)) .. -arctan((3*(-23+sqrt(7)*sqrt(55)))/(23*sqrt(7)+9*sqrt(55)))], [[3*cos(s), 3+3*sin(s)], s = -arctan((1/3)*(9+sqrt(7)*sqrt(55))/(-sqrt(7)+sqrt(55))) .. arctan((1/3)*(-9+4*sqrt(91))/(4+sqrt(91)))], [[4+5*cos(u), 5*sin(u)], u = arctan((3*(41+4*sqrt(91)))/(-164+9*sqrt(91)))+Pi .. arctan(3/4)-Pi]];

Perimeter(L), Q; evalf(%);

Area(L); evalf(%)

 A := plot([[rhs(C1[1]), rhs(C1[2]), t = 0 .. 2*Pi], [rhs(C2[1]), rhs(C2[2]), s = 0 .. 2*Pi], [rhs(C3[1]), rhs(C3[2]), u = 0 .. 2*Pi]], color = black);

B := Picture(L, color = green, [color = black, thickness = 4]);

plots[display](A, B, scaling = constrained);

More examples and all codes see in attached file

Plane_figure.mw

Consider a signal which is a real sine series, f(x)=2*sin(2*Pi*x) + 5*sin(2*Pi*6*x) + 9*sin(2*Pi*11*x).

Let F(w) be its Fourier transform. Answer F(w) is purely complex and expressed in terms of symbol Dirac.

Maple "plot" fails.

Plots of impulse trains like F(w)=sqrt(Pi)*I*(2*Dirac(w-Pi)+4*Dirac(w-4*Pi)) involve user intervention. Maple won't plot such expressions, because they are DISTRIBUTIONS (not FUNCTIONS).

Try plotting F(w) to see the engine's uninformative error message....

Since it is not possible for me to reply directly in that new Maple Primes:
I branched. Feel free to re-join for a reasonable structure. What a mess.

http://www.mapleprimes.com/questions/145527-Is-This-Matrix-Primitive

 

I am rusty on such (may be it is 'obvious' via Lie theory). Your group is just the
group of invertible matrices over the integers (this follows from algebra). And as

This is an effective method of solving systems of  N nonlinear and nonalgebraic equations in N+1 real-valued variables:
F(x)=0, where F=(f1,f2,..., fN) and x=(x1,x2,...,xN+1). (1)               
                                                                  
All the functions fj(x) are assumed to be continuously differentiable in some domain D in R^(N+1).
In general, such systems have an infinite set of the solutions which form a space curve in R^(N+1).
 The Optimization and DirectSearch solvers have difficulties with it.
The idea of the Dragilev method consists in the following. Let us assume that the space curve (1) can be parametrized through the  parameter t
which can be taken as the  length of the arc (for example, see http://en.wikipedia.org/wiki/Curve ).
That presentation provides to avoid the difficulties associated with self-intersections and singularities.
We will obtain the coordinates of the points of the space curve under consideration as the solution
of the Cauchy problem for certain system of ODEs. We put the coordinates of a known point of (1) as the initial conditions.
The system of ODEs is obtained by the differentiation  with respect to t:

We treat (2) as a linear system in the derivatives diff(xj(t),t),j=1..N+1. In general, its solutions form an infinite set.
We choose the  solution of (2) as follows. We put diff(xN+1)= -Determinant(Matrix(n, (i,j)->diff(fi(x),xj))).
This is one of the key points of the method under consideration.
Next, we find diff(xj,t), j=1..N. At last, we numerically solve that system of ODEs, obtaining an array of points.
 The general case of a system of N nonlinear  equations in N variables
G(y)=0, where y=(y1, y2, ..., yN), G=(g1,g2,..., gN) (3),
is reduced to the previous one by homotopy. We choose a point y0= (y01, ..., y0N) and consider the system
G(y)- v*G(y0)=0 (4)
of N equations in N+1 variables (v is taken as  a dummy variable). Changing v from 1 to 0, we arrive to (3).
We don't consider any mathematical justification of the above pattern here as that does not deal with Maple.
I would like to point out the sites

http://forum.exponenta.ru/viewtopic.php?t=3892 and
http://forum.exponenta.ru/viewtopic.php?t=11284 , where the Dragilev method is discussed. Unfortunately, in Russian.
The googling of "Dragilev" and "Draghilev" does not produce many info.
A short biographical sketch: Dr. Anatoliy Vladimirovich Dragilev (1923 - 1997) was a professor at  Rostov State University in Russia.
See his articles here: http://www.mathnet.ru/php/person.phtml?&personid=32359&option_lang=eng and
http://www.zentralblatt-math.org/zmath/en/search/?q=au%3A%22dragilev%2C%20a*%20v*%22 .
 

I am very grateful to Professor Alexey B. Ivanov, who is an enthusiast of the Dragilev method, for the very useful discussions.

Dear friends,

I am reporting with a brief comment concerning the integral int(1/(1+x^a), x=0..infinity) with a>=2 a real number. This was evaluated here.

Now Maple 15 (X86 64 LINUX) will quite happily compute this in its most simple form involving the sine when a is not a positive integer or a rational number. If it is, however, a beta function term results,...

In Maple 17, the Student MultivariateCalculus package has been augmented with fifteen new commands relevant for defining and manipulating lines and planes. There already exists a functionality for this in the geom3d package whose structures differ from those in the new Student packages. Students...

I propose a different proof of this remarkable identity (see  http://www.mapleprimes.com/posts/144499-Stunningly-Beautiful-Identity-Proved ) in which  directly constructed a polynomial, whose root is the value of LHS, and this is expressed in radicals.

For the proof, we need three simple identities with cubic roots (a, b, c -any real numbers):

I present this proof-in-Maple not just for its own sake, but because I think that it illustrates effective techniques for working with complicated algebraic numbers.

Proof...

Never before has the educational landscape been changing as fast as it is today, driven by a new generation of students who are growing up with instant access to on-demand information. This generation relies on ubiquitous network access and takes for granted technology that permeates every aspect of their lives. Phones and tablets are everyday companions and are used to connect with their peers, take classroom notes and research school projects. Beyond being mere consumers...

It is known that the trigonometric functions of an integer number of degrees may be expressed by radicals if the number of degrees is divisible by 3. Simple code finds all these values ​​in the range 0 to 90 degrees:

 [sin(`0`^`o`)=0,`   cos`(`0`^`o`)=1,`   tan`(`0`^`o`)=0,`   cot`(`0`^`o`)=infinity];

for n from 3 to 87 by 3 do

[sin(n^`o`)=convert(sin(n*Pi/180),radical...

Dear friends,

this is to share with you what a joy it was to work with Maple on the problem of enumerating non-isomorphic graphs. This problem goes back to Polya and Harary and it is a beautiful example of Polya counting, while also being of notable simplicity, so that a high school student or an undergraduate can follow it easily.

I have worked on this problem over the years, adapting my solutions in Cocoa and Lisp as I gained insights. My first attempt used...

The Maple dsolver is very powerful, but everything has advantages and disadvantages. I was recently asked the following question.
Let us consider the system of ODEs
>restart; sys := [diff(y(x), x) = -(4*cos(x)*y(x)+z(x)*cos(x)^2+3*z(x))/(sin(x)*(cos(x)^2-9)),
>diff(z(x), x) = -(y(x)*cos(x)^2+3*y(x)+4*z(x)*cos(x))/(sin(x)*(cos(x)^2-9))]:
The functions
>y1 := C[1]*(cos(x)+1)^(1/2)/(cos(x)+3)^(1/2)+C[2]*(1-cos(x))^(1/2)/(3-cos(x))^(1/2):
>z1 := -C[1...

Clock:=proc(H, M)  # H and M - time in hours (0 <= H <= 23) and minutes (0<=M<60)

local A1,A2, A, B, B1, C1, C, E, F,alpha,t, T, T1, T2, P, G;

uses plottools, plots; 

 

A1:=(irem(H,12)+M/60)*30;  A2:=M*6;

A:=circle([0,0], thickness=5);

P:=disk([0,0], 1, color=grey);

Here are two procedures associated with a clock with hands. I think they are interesting not only for fun, but will be useful for teachers in schools in the preparation of such tasks.

The first procedure called  ClockHandsAngle  finds the angle between the hands of the clock at any time.

The second procedure called  TimeFromAngle , for a given angle finds all times in a given time range. The first procedure  is...

First 42 43 44 45 46 47 48 Last Page 44 of 59