Applications, Examples and Libraries

Share your work here

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.

Maple 17 adds several new visualizations in Graph Theory as well as updates to inequality plotting and visualizing branch cuts in mathematical expressions.  In preparing the “what’s new” pages for Maple 17, we decided to showcase several of these plots alongside some of our other favourites.

The following file contains code to create most of the “what’s new” plots, as well as some quick tips and techniques for using the ColorTools package to enhance your plots:...

Animation spatial lever mechanism on the basis of one of the sets of solutions of systems of polynomial equations. The Draghilev method. MECAN123.mw 

http://hostingkartinok.com/show-image.php?id=fe0ac50ab68d6ab66a3469394654a260

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...

Several months ago, I'd posted a two-letter-words quiz and a two-to-make-three quiz meant for fans of the Scrabble game. Here is a third worksheet that tests your ability to find anagrams of seven-letter words. The worksheet is structured around six-letter stems and the lists of seven-letter...

Maple IDE team is launching a Tester Program that will allow us to incorporate more input in the product design and development process.

We are looking for regular testers for Maple IDE. Your testing complements our in-team testing of new software versions. By enlisting a diverse group of beta testers, we can see how the software performs when it's being used for normal, ordinary tasks. This lets us provide a more стабле Maple IDE with better user experience. As a member...

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...

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

Throughout evolution, natural selection is one source of genetic change in populations. However it is possible for a mutation to become common in a population entirely by accident through a phenomenon known as genetic drift. 

It works most strongly in small populations or dramatically fluctuating populations.  When non-lethal mutations occurs it is possible not just because of adaptation but by chance it will have more offspring than it's neighbors. 

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...

Consider two sets in the Euclidean plane, each consisting of 4 points.

First set:  A(0, 0),  B(3, 4),  C(12, 4),  E(4, -1)

Second set:  F(0, -8),  G(12, -4),  H(9, -8),  K(4, -9)

It is easy to check that the set of all pairwise distances between the points of each of the given sets (6 numbers for each set ) are the same. At the same time it is obvious that there is no any...

The following (downsized) images of Lyapunov fractals were each generated in a few seconds, in Maple 16.

 

I may make an interface for this with embedded components, or submit it in some form on the Application Center. But I thought that I'd share this version here first.

I'm just re-using the techniques in the code behind an earlier Post on Mandelbrot and Julia fractals. But I've only used one simple coloring scheme here, so far. I'll probably try the so-called burning ship escape-time fractal next.

 

 

 

 

Here below is the contents of the worksheet attached at the end of this Post.

 

 

The procedures are defined in the Startup code region of this worksheet.

 

It should run in Maple 15 and 16, but may not work in earlier versions since it relies on a properly functioning Threads:-Task.

 

The procedure `Lyapunov` can be called as

 

          Lyapunov(W, xa, xb, ya, yb, xresolution)

          Lyapunov(W, xa, xb, ya, yb, xresolution, numterms=N)

 

where those parameters are,

 

 - W, a Vector or list whose entries should be only 0 or 1

 - xa, the leftmost x-point (a float, usually greater than 2.0)

 - xb, the rightmost x-point (a float, usually less than or equal to 4.0)

 - ya, the lowest y-point (a float, usually greater than 2.0)

 - yb, the highest y-point (a float, usually less than or equal to 4.0)

 - xresolution, the width in pixels of the returned image (Array)

 - numterms=N, (optional) where positive integer N is the number of terms added for the approx. Lyapunov exponent

 

 

The speed of calculation depends on whether the Compiler  is functional and how many cores are detected. On a 4-core Intel i7 under Windows 7 the first example below had approximately the following performce in 64bit Maple 16.

 

 

Compiled

evalhf

serial (1 core)

20 seconds

240 seconds

parallel (4 cores)

5 seconds

60 seconds

 

 

 

with(ImageTools):


W:=[0,0,1,0,1]:
res1:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):

memory used=46.36MiB, alloc change=65.73MiB, cpu time=33.87s, real time=5.17s


View(res1);


W:=[1,1,1,1,1,1,0,0,0,0,0,0]:
res2:=CodeTools:-Usage( Lyapunov(W, 2.5, 3.4, 3.4, 4.0, 500) ):

memory used=30.94MiB, alloc change=0 bytes, cpu time=21.32s, real time=3.54s


View(res2);


W:=[1,0,1,0,1,1,0,1]:
res3:=CodeTools:-Usage( Lyapunov(W, 2.1, 3.7, 3.1, 4.0, 500) ):

memory used=26.18MiB, alloc change=15.09MiB, cpu time=18.44s, real time=2.95s


View(res3);


W:=[0,1]:
res4:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):

memory used=46.25MiB, alloc change=15.09MiB, cpu time=33.52s, real time=5.18s


View(res4);

 

 

Download lyapfractpost.mw

Today's SMBC strip by Zach Weinersmith is a silly math joke but it was pretty much begging for implementation.

So, here is a simple brute force Maple program to compute the Fouriest transform of an integer.

fouriest := proc(n::posint, ob::posint:=10)
local b,f,cap,i,rdx,fc;
...
First 54 55 56 57 58 59 60 Last Page 56 of 76