Modern systems of computer mathematics. ACS software and mathematical software
The first stage - a computer, justifying its name (translated from English as "calculator"), worked as a powerful programmable calculator capable of quickly and automatically (according to a given program) performing complex and cumbersome arithmetic and logical operations on numbers.
Advances in computational mathematics and constantly improving numerical methods make it possible to solve any mathematical problem in this way in relation to any branch of knowledge. It is important to note that the result of the calculations in this case is represented by one finite number in arithmetic form, that is, using decimal digits. Sometimes the result is represented by a set (array, matrix) of such numbers, but the essence of the representation does not change from this - the result is in the form of a finite decimal arithmetic number.
However, such a result often did not satisfy professional mathematicians, and here is why. The vast majority of the results of non-trivial mathematical calculations in classical mathematics are traditionally written in symbolic form: using special well-known numbers: , , , and irrational values - using a radical. It is believed that otherwise there is a fundamental loss of accuracy.
Another classic example that causes a mathematician's remark is an expression familiar to any schoolchild:
always equal to one; and the computer will either attempt to evaluate this expression (with the inevitable rounding errors), or a message will be issued about the uncertainty of the argument X and all further actions will be stopped.
This completes the first step...
Naturally, following the rapid improvement of computer systems, a person in computer calculations wanted more: why not make the computer perform transformations in the traditional ways for mathematics (fractional-rational transformations, substitutions, simplifications, solving equations, differentiation etc.).
They are usually called transformations in symbolic form or analytical transformations, and the result is obtained not as before - in the form of a single number, but in the form of a formula.
By this time, almost all areas of human activity were covered by each with its own mathematical apparatus and acquired their own application software packages (APS). At the same time, everyone needed a universal mathematical tool aimed at a wide range of users who are neither professionals in mathematics nor programmers brought up in highly specialized computer languages that are incomprehensible to most end users.
This led to the creation of computer systems of symbolic mathematics, designed for a wide range of users - non-professionals in mathematics. This is how the era of computer mathematics systems (CCM) began in the mid-60s of the twentieth century, in English CAS - Сomputer algebra system.
At the end of the 60s in Russia, on domestic computers of the Mir series, developed under the guidance of Academician V. Glushkov, SCM was implemented in the Analyst programming language, which has all the capabilities of symbolic calculations, however, with very modest, according to current concepts, characteristics.
Of course, even the simplest non-intelligent computer mathematical reference books are of great practical interest - after all, not a single most capable person is able to fit in his head all the mathematical laws and rules created over the centuries-old history of mankind.
Data on the features of existing SCM are given in Table. 12.1.
System | Purpose and opportunities | disadvantages |
---|---|---|
Mathcad 13, Mathcad 14 | General purpose system mainly for non-professional mathematicians and educational purposes at all levels. A well-thought-out interface for presenting data in a traditional mathematical form and amazing graphics at all stages of work, including input. Input via selection from toolbars or from menus with little to no use of the keyboard. Powerful and comprehensive set of operators and functions. Many examples, e-books and libraries, ready-made solutions to practical problems. Symbolic calculation core imported from SCM Maple. Provision of professional package server services. Ease of transferring the document to other applications | Rather primitive programming tools. The high cost of e-books and libraries, the lack of Russified versions of the package itself and additional libraries (books). Difficulty character processing differential equations. The final executable *.exe file is not created; To run the document, you must have the SCM Mathcad package. Difficulties when performing trigonometric transformations |
Maple V R4/R5/R6 | University higher education and scientific calculations. Powerful symbolic calculation core - features similar to SCM Mathcad, containing up to 3000 functions. Powerful graphics. Convenient help system. Document Formatters | Increased requirements for hardware resources. Lack of sound synthesis. Targeting experienced users and mathematicians. All the shortcomings of analytical actions are similar to SCM Mathcad |
Mathematica 5/7 | Higher education and scientific calculations. The most developed system of symbolic mathematics. The only SCM that provides symbolic solution of differential equations. Compatibility with different computer platforms. Unique 3D graphics. Sound synthesis support. Advanced document formatting tools. Software synthesis of sounds. | High requirements for hardware resources. Excessive copy protection. Weak protection against incorrect tasks. Focus on experienced users. Enter tasks in a unique functional programming language. Unusual indication of calculation start functions. |
MATLAB 7.* | Education (including technical), scientific calculations, numerical modeling, and calculations oriented to the application of matrix methods, while the scalar is considered as a 1x1 matrix. Unique matrix tools, abundance of numerical methods, descriptive (descriptor) graphics, high computational speed, ease of adaptation to user tasks thanks to a variety of system extension packages. Advanced programming language with object-oriented programming (OOP) capabilities, compatibility with Java algorithmic language | Very high requirements for hardware resources. There is practically no possibility of symbolic calculations. Relatively high cost. Enter tasks in a unique programming language |
Let's consider the internal architecture of SCM on the example of the most powerful, according to a number of authoritative experts, SCM Mathematica, which has the most developed system of symbolic mathematics. Figure 12.1 shows its software architecture.
Rice. 12.1.
The central part - the core ( Kernel ) of the SCM system implements functioning algorithm The SCM ensures the joint functioning of all its parts, organizes the reception and intellectual processing of the user's request, and then the call of the required decision procedure. The kernel contains a large number of built-in functions and system operators. Their number in modern SCM can reach many thousands. For example, the core of Mathematica 4 contains data from more than 5000 integrals alone, although only a few built-in functions are used for integration.
Finding and executing functions and procedures built into the SCM core is fast if there are not too many of them. Therefore, the volume of the kernel is limited, but libraries of procedures and functions built into the SCM that are used relatively rarely are added to it. At the same time, the total number of mathematical functions of the kernel available to the user and these built-in libraries reaches many thousands.
Cardinal expansion of SCM capabilities and their adaptation to the needs of specific users for in-depth solution of a certain range of problems (for example, problems of theoretical and applied statistics, vector analysis) is achieved by installing external expansion packages. These packages, purchased separately, make the possibilities of SCM virtually limitless.
All these libraries, extension packages and reference system modern SCM (let's call them SCM tools) contain not only and not just knowledge in the field of mathematics, accumulated over many centuries of its development (this will not surprise anyone: these are the capabilities that are characteristic of the widespread class of IEP - information retrieval systems). But it is amazing that these tools surprisingly automatically and creatively use such knowledge to solve problems where you need to choose and be able to apply one, the only one of many dozens, non-obvious solution method. For example, SCM can instantly find indefinite integral or immediately report the impossibility of representing it by elementary functions - a difficult task, even for a professional mathematician. No less impressive is the fact that if, after obtaining the desired formula, go to the beginning of the document and set the parameters included in this formula to specific numerical values, its numerical result will be instantly obtained. Any SCM includes a set of editors (in Fig. 12.1 they are called editors by direction): text, formula, graphic editors, network support tools and HTML (XML) tools, animation packages and audio tools.
Thanks to all these capabilities, SCM can be classified as software products of the highest level today - intellectual. Such programs are currently grouped under the term "knowledge bases". Modern SCM, according to recognized authorities [ , ], provides an inexperienced user with the opportunities of a graduate of a mathematical university in the fields of numerical calculation methods, mathematical analysis, matrix theory and other general sections higher mathematics to obtain constructive results.
Of course, in abstract areas of mathematics, such as functional analysis or questions of "existence and uniqueness ..." SCM can hardly be useful so far (except for providing the necessary information, which is quite a lot), but in applied problems, for which SCM and were created, such branches of mathematics are usually not involved.
12.2. Integrated Environment SCM MathCad
MathCad SCM Integrated Environment is a general-purpose SCM system and is most suitable for solving a wide range, or rather, almost any mathematical problems, mainly by non-professional mathematicians, as well as for effective use in all areas of education.
To this day, they remain the only mathematical systems in which the description of the solution of mathematical problems is given using familiar mathematical formulas and familiar symbols. The results of calculations have the same form. SCM MathCad is not very suitable for serious professional scientific activities of mathematicians, it is more intended for solving not too sophisticated mathematical problems, performing technical calculations of any complexity, and most importantly, it has no competitors in the field of education. Due to its high performance, SCM MathCad fully justifies the term "CAD" in its name (Computer Aided Design), confirming that it belongs to the class of the most complex and advanced automatic design systems - CAD. The MathCad system is a typical integrated system, that is, it combines several separate software tools for solving a certain range of independent problems. Initially, it was intended for purely numerical calculations and focused on MS-DOS, but starting from version 3.0 (1990 ), runs under Windows and has a fairly wide range of tools for symbolic and graphical calculations.
All actions in SCM MathCad are immediately drawn up in the form of a document consisting of worksheets containing a description of the algorithm, working formulas, comments, illustrations, graphs, tables. The form of such a document is maximally adapted for printing, transmission by Internet networks and does not require additional editing. On the other hand, this document, which has the .mcd extension, contains the entire calculation program in a hidden form. It can be imported both for publishing purposes and for the continuation and improvement of software calculations. The entire document or parts of it can be locked for editing by setting a password.
Figure 12.2 shows the architecture of the SCM MathCad. The central block is two cores: the core of SCM itself and the core of symbolic calculations, similar to SCM Maple, purchased from the developer - Waterloo Maple.
Electronic books (e-Books) built into the MathCad environment contain examples, references and typical calculations from various fields of science, technology, and economics. Any fragment from these books can be copied to the worksheet of the document and executed.
Libraries and extension packages focused on solving various applied problems are supplied and installed by the developer separately.
The powerful SCM MathCad interface does not require programming when entering tasks and displaying results - all this is done in the traditional form in the generally accepted language of mathematical symbols and formulas without the use of any special commands or operators. It is significant that in every algorithmic language, simple exponentiation, to the extent of the imagination of the language developers, is performed using unique own conventions - all kinds of arrows, caps, double asterisks and God knows what else, if not completely absent and requires calling special functions - as in the languages of the C family. In MathCad, this operation has a familiar form.
The interface is visual - that is, almost any action in SCM can be performed without using the keyboard, simply by selecting the desired menu items or tools on the panels. This interface implements the principle of "WYSIWYG" - what we see on the screen is what we get in work and output.
The interface is intelligent - of course, it is far from the intelligence of Visual Studio-2010, but in many cases it will not allow erroneous user actions.
The mentioned input language is interpretive, that is, intermediate results appear as you enter the next formula. The SCM MathCad itself is written in one of the most powerful languages - C++. As the user types the text of the calculation algorithm on the worksheet, the environment itself creates a hidden program in the intermediate communication language, which is then saved as a file with the extension .mcd. Unfortunately, the MathCad package does not generate an executable file with the .exe extension - to work with an imported document, you must have the MathCad application installed. But to insert an image of a document or a separate fragment of it into text editor, for example, MS WORD, through the system buffer is no problem. This is how all the illustrations in this chapter were inserted. I recommend that after such an insertion of a fragment, call the context menu on it - the "Picture Format ... / Size" item and set the "Scale in Height" window to 128% - the most suitable for the font of the 12th size.
Worksheet objects can be formulaic text or graphic blocks. Actions on blocks are performed in strict order from left to right, top to bottom. Blocks that prepare operations must precede the execution of those operations. At the same time, end-to-end data transfer from one object to another is organized. Changing the input data instantly provides a recalculation of the results.
The content (content) of this SCM can be considered as an extremely powerful reference tool for mathematics. In addition, formula, text and graphics editors are integrated into MathCad SCM, which make it possible to simplify the input of multi-level complex formulas and obtain the final document. Intermediate actions in the course of symbolic transformations in SCM MathCad are hidden from the user, but one should not forget that the most complex recursive algorithms are used to obtain the final result, little known to the general user and often not optimal from the point of view of a mathematician. At the same time, no one forbids the user stepping and indication of algorithms familiar from the literature, which greatly simplifies the solution with a known end result. The final executable *.exe file is not created in SCM MathCad, which means that to view the finished (for example, imported) document, the presence of the installed SCM MathCad package is required.
We list the main features of the MathCad Environment.
General features
- Development and editing of documents containing both mathematical formulas of any complexity, and all the built-in tools of the MathCad Environment. Preparation of these documents for publication or transmission over the Internet.
- Use of the generally accepted extensible markup language XML as a universal way to organize data exchange with other applications. This allows you to convert MathCad files into HTML pages and into PDF format.
- Ability to insert a wide range of objects into the document (see Fig. 12.3.)
- Development of web documents and networking capabilities to share them, receive updates and support.
- Documents receiving
- Performing calculations of any complexity - using the MathCad environment as a super-powerful scientific intellectual calculator using a rich library of built-in functions (more than 680; for comparison, in MS Excel there are about 200 of them), with an accuracy of up to 17 significant digits (and when using special operators - up to 250) and with unlimited possibilities for memorizing intermediate results. At the same time, it is possible to calculate both according to the formula entered into the document as a whole, and according to a separate, selected fragment of the formula.
- Using a graphics editor to build two-dimensional and three-dimensional graphs of any complexity, visual diagrams and not only for simple construction, but also for connecting a graph with a formula, in which a change in a parameter is immediately reflected in the graph curve. It is also possible to create moving animation objects and view imported files, for example, video films in AVI format, using the Playback player built into the MathCad environment.
- Actions with dimensions.
Numerical calculation methods
- Solving equations and systems of equations, both linear and non-linear. Finding the roots of a polynomial.
- Solution of inequalities.
- Calculation of a definite integral.
- Calculation of improper integrals.
- Calculation of multiple integrals.
- Numerical methods of differentiation.
- Numerical solution of ordinary differential equations - the Cauchy problem.
- Numerical solution of ordinary differential equations - solution of a boundary value problem.
- Solution of differential equations in partial derivatives.
- Calculation of the determinant, dimension, rank and trace of a matrix, scalar and vector multiplication of vectors, calculation of the Jacobian, for example, to change to other coordinate systems in a triple integral. Calculation of eigenvalues and eigenvectors , search for the maximum and minimum element of the matrix.
- Matrix transformations: scalar and vector multiplication of vectors, finding the inverse matrix and solving a system of algebraic linear equations, all possible decompositions of a matrix into a product of matrices of a special type: two triangular ones - upper and lower (LU-transform), triangular and its transposed (Cholesky decomposition), orthogonal and upper triangular (QR-decomposition), singular value decomposition.
- Integration of the MathCad environment with the MATLAB matrix mathematical system and the possibility of using its apparatus opens up amazing possibilities for effectively solving matrix problems of unlimited complexity.
Solution of differential equations
Programming
Programming and performing calculations in a simplified procedural algorithmic language with the ability to use all procedural constructs: conditional statements, loops, arrays, module-functions, module-procedures.
Complex numbers
- Representation of complex numbers in the traditional form, the ability to perform basic arithmetic operations with them.
- The ability to automatically obtain the results of many calculations in the form of a complex number (for example, all the roots of a polynomial).
- Ability to set a complex argument for many library functions and obtain a mathematically correct result.
Data processing and financial calculations
Theory of Probability and Mathematical Statistics
Mathematical modeling
Special opportunities for applied engineering and scientific calculations
- Processing of electrical signals and calculation of electronic devices.
- Virtual generation of electrical signals and their processing.
I will not hide the fact that the catalyst for writing this post was the lovers of hiking, taken from the book by V. I. Arnold. In this regard, the idea arose to consider a simple mathematical problem, the solution of which shows that the capabilities of the SCA often rest on a rather natural upper limit, and in order to obtain a compact solution suitable for further analysis, it is necessary to tighten the convolutions a little.
1. System trigonometric equations
When, in the not too distant year of 2003, I started working on my Ph.D. thesis, I was faced with the need to solve a system of trigonometric equations of the formParameters a, b, A, B are positive. Conditions are imposed on the roots of the equation
Where do we encounter such systems? When calculating the kinematics of closed four-link, for example. Such a closed four-link was in my work, I came across almost the same about a year ago when I undertook to make a “coven” (I helped one professor in his work).
Then, in 2003, I just got acquainted with the Maple system and was delighted with its capabilities, naturally I entrusted this system to her. And a "bummer" was waiting for me ... Let's see what solution Maple 18 and Mathematica 10 give for this task today.
2. Solution of the problem in the SKA "on the forehead"
In my favorite Maple, we set the system of equationsrestart; eq01:= a*cos(x) + b*cos(y) = A; eq02:= a*sin(x) - b*sin(y) = B;
And we try to solve
Solv:= solve((eq01, eq02), (x, y));
And we get...
This bug didn't fit into the online LaTeX, so I had to provide a screenshot. This result is obtained due to the fact that the formulation of the problem is too general. It is necessary to indicate to the system which solution we are interested in using the condition (3)
Solv:= solve((eq1, eq2, x > 0 and x< Pi, y >0 and y< Pi}, {x, y});
In this case, the result looks better
Once again I apologize to the reader for the clumsy screenshot and note that we have received two solutions to the system (1) - (3) and now we still have to figure out which answer corresponds to the mechanical meaning of the problem (it is there, yes), and given that behind a, b, A and B can be quite significant expressions (not dependent, of course, on x and y) we should be pretty sad at this point.
Mathematica 10 does better with these equations in the sense that it gets the final form common solution, part of which is on the screen
If the system is supplemented with condition (3), then Wolfram tells us that Solve[...] does not have a solution method for such a case (I would be grateful to the reader for a hint on this issue, because I think that I myself have not fully studied the issue, but for now continue the story).
In addition, both SKAs give out a blasphemous arc tangent in their solution, which is not always convenient for various reasons, which I will not talk about - in each case there are different reasons.
When my late “boss” saw these decisions in 2003, he thought and said that “these crocodiles need to be combed”, which made me plunge into further thought. And I again armed myself with a piece of paper and a pencil ...
3. SKA + brain
To obtain a sufficiently compact solution, it is necessary to transform the system (1) - (3) to a linear one with respect to the unknowns. To do this, you need to use the school knowledge of trigonometry.So, let's square equations (1) and (2) and add them, moving everything that does not depend on x and y to the right side of the equation
Left1:= lhs(eq01): left2:= lhs(eq02): right1:= rhs(eq01): right2:= rhs(eq02): eq03:= simplify(left1^2 + left2^2)= right1^2 + right2^2; eq03:= eq03 - (a^2 + b^2); left3:= combine(lhs(eq03)); eq03_1:= left3 = rhs(eq03);
Using the formula "cosine of the sum", we obtain a new equation
Now, resolving it with respect to the sum of unknowns, we arrive at the linear equation
A linear equation is also linear in Africa - having found one unknown, we get another. Let's deal with another unknown by eliminating x from one of their equations. Since we have condition (3), it is obvious that
And this gives us the opportunity to use the basic trigonometric identity without the ambiguity "plus or minus"
We take the cosine of x from the first equation
Getting, thus for the sine x
In order not to puff over the paper, let's entrust all this to Maple
Eq01_1:= subs(cos(x) = u, eq01); slv:= solve(eq01_1, u); eq02_1:= subs(sin(x) = sqrt(1-slv^2), eq02); eq02_1:= eq02_1 + b*sin(y);
Having the output equation
Equation (7) must be squared and some transformations carried out
Left:= expand(lhs(eq02_1)^2): right:= expand(rhs(eq02_1)^2): eq02_2:= collect(simplify(right - left), b); eq02_3:= subs(coeff(eq02_2, b) = tmp, eq02_2); slv2:= solve(eq02_3, tmp); eq02_4:= -2*A*cos(y) + 2*B*sin(y) = slv2; eq02_5:= eq02_4/(-2);
And now let's perform, known to many, "feint with ears"
Left2:= lhs(eq02_5); left3:= subs(A = O2A*cos(xi), B = O2A*sin(xi), left2); left4:= subs(O2A = sqrt(A^2 + B^2), combine(left3));
That is, we divide both sides of the equation by and fold the left side according to the cosine formula of the sum, rightly assuming that
We get a new equation
Which we successfully solve for y
Eq02_6:= left4 = rhs(eq02_5); slv3:= subs(xi = arccos(A/sqrt(A^2 + B^2)), solve(eq02_6, y)):
As you can see, the game came out quite compact. We return to equation (5) and find x
The computer is a very complex system. It consists of different components (How a computer works.) - the central processor, RAM and external memory, displays, printers ...
And all these devices must work in concert, as one mechanism.
Consistency is achieved through the operating system. It is not a device, not a node. The operating system of a computer is a program. But the program is not simple. It ensures the operation of all computer devices, monitors the execution of other work programs.
These points are especially important when many users work on the same computer. And this is a common thing for large, medium and even small computers.
For example, the Sirena railway ticketing system (How Sirena works.) has dozens of terminals that must work simultaneously. Moreover, if all cashiers have their own printing devices, then the central processor, tape drives and disk drives are common to them.
The task of the operating system is to organize work with shared devices so that they do not interfere with each other.
And then quite unpleasant situations are possible. Imagine that you are solving two tasks that require the use of a tape drive and a printer.
And then one of them "captured" the tape drive and is waiting for the printer to be released. The other one managed to occupy the printer and is waiting for the tape drive. So they can wait for each other forever. No wonder programmers call such situations “death hugs”.
Or it took one task to print the results, it printed a line. Then another task did the same, then a third. It is unlikely that anyone will be able to understand the resulting printed "porridge".
Here are the operating systems and are designed to ensure that such situations do not happen.
There are several ways to organize the work of computers while being used by several users at the same time.
You can solve tasks coming from different terminals sequentially, one after another. The operating system queues them either in order of arrival or in order of importance. As soon as the solution of one task is completed, the next one is loaded, and so on.
At the same time, while the next task is being solved, you can print the results of solving the previous one.
This mode of operation is called batch. It is most convenient when large tasks are solved that do not require human intervention.
You can organize work in real time. This is necessary when the computer is used to control an aircraft or operate a power plant.
Here it is important to immediately process information from the controlled object, receive a response to a change in the situation and transmit control signals.
There is also a time-sharing regime in which every programmer working on a machine has the impression that he is working alone.
This method is chosen when the work is in dialogue mode: the question of a person is the answer of a computer. In this case, the answer comes almost instantly.
In general, there are many ways to build operating systems. The same computer can run different operating systems. Which one to use depends on the types of tasks solved on the computer.
Commenting is closed now!
In this article, our readers are offered an overview of the most popular mathematical systems presented on the Russian software market.
Recently, in wide circles of computer users different class the term "computer mathematics" has become quite popular and widely used. This concept includes a set of both theoretical and methodological tools, as well as modern software and hardware tools that make it possible to perform all mathematical calculations with a high degree of accuracy and performance, as well as build complex chains of computational algorithms with wide possibilities for visualizing processes and data during their processing.
The demand for universal and specialized software packages for solving various applied problems caused the appearance on the market of software products of computer mathematics systems, which quickly became popular. There are currently a number of large companies on the market of modern mathematical systems: Macsyma, Inc., Waterloo Maple Software, Inc., Wolfram Research, Inc., MathWorks, Inc., MathSoft, Inc., SciFace GmbH, etc. To develop each Such a mathematical system involves hundreds of professionals from well-known universities and major research centers, as well as highly qualified programmers and experts in the design of complex software systems. As a result, we have very perfect, flexible and at the same time universal products that include essential mathematical concepts and have a rich set of methods for solving general mathematical and scientific and technical problems. This article is devoted to the review and brief analysis of such software products.
MATLAB
MATLAB is a product of MathWorks, Inc. (http://www.mathwork.com/), which is a high-level language for scientific and technical computing. Among the main areas of application of MATLAB are mathematical calculations, algorithm development, modeling, data analysis and visualization, scientific and engineering graphics, application development, including a graphical user interface. MATLAB solves many computer problems - from collecting and analyzing data to developing ready-made applications. The MATLAB environment combines mathematical calculations, visualization and a powerful technical language. Built-in universal interfaces make it easy to work with external information sources, as well as to integrate with procedures written in high-level languages (C, C++, Java, etc.). The multi-platform nature of MATLAB has made it one of the most widespread products - it has actually become the standard of technical computing accepted all over the world. MATLAB has a wide range of applications, including digital signal and image processing, control system design, natural sciences, finance, economics, instrumentation, and more. Price - $2940
maple
This product of Waterloo Maple Software, Inc. (http://www.maplesoft.com/) is often referred to as a symbolic computing system or a system computer algebra. Maple allows you to perform both numerical and analytical calculations with the ability to edit text and formulas on the worksheet. Thanks to the presentation of formulas in polygraphic format, magnificent two- and three-dimensional graphics and animation, Maple is at the same time a powerful scientific graphics editor. A simple and efficient interpreter language, open architecture, the ability to convert Maple codes to C codes makes it very effective tool creation of new algorithms. With an intuitive interface, simple rules work and wide functionality, this product has already gained popularity among Russian mathematicians and engineers. Maple 7 price - $1695
Mathematica
Mathematica - Wolfram Research, Inc. (http://www.wolfram.com/) has an extremely wide range of tools that translate complex mathematical algorithms into programs. In fact, all the algorithms contained in the course of higher mathematics of a technical university are embedded in the memory of the Mathematica computer system. In some countries (for example, in the USA), the higher education system is closely related to this product. The great advantage of Mathematica is that its operators and ways of writing algorithms are simple and natural. Mathematica has a powerful graphics package with which you can plot very complex functions of one and two variables. The main advantage of Mathmatica, which makes it the undisputed leader among other high-level systems, is that this system has become very widespread throughout the world today, covering huge areas of application in scientific and engineering research, as well as in the field of education. Price - $1460
Macsyma
Macsyma by Macsyma, Inc. (http://www.macsyma.com/) is one of the first mathematical programs to operate with symbolic mathematics. Strengths Macsyma - advanced tools of linear algebra and differential equations. The system is focused on applied calculations and is not intended for theoretical research in the field of mathematics. In this regard, the program lacks or reduces sections related to theoretical methods (number theory, group theory, etc.). Perhaps the main advantage of Macsyma over other universal mathematical packages is that the user can analytically and numerically solve a large number of different types of partial differential equations. Macsyma has a very user friendly interface. The working document of the program is a scientific notebook, which contains editable fields of text, commands, formulas and graphs. A distinctive feature of the package is compatibility with Microsoft Word text editor. Almost all Macsyma commands in library files are loaded automatically; very handy and view window (browser) of mathematical functions. Macsyma generates FORTRAN and C code, including control statements. The system runs on an Intel platform running OS Windows.
MuPAD
Compared to other mathematical packages, MuPAD - a product of SciFace GmbH (http://www.sciface.com/) - is a relatively young product, but this does not prevent it from confidently competing with them. MuPAD is a computer algebra software package designed to solve mathematical problems of various levels of complexity. The main qualitative differences of MuPAD are low requirements for PC resources, the presence of its own core of symbolic mathematics, the ability to develop by the user himself and powerful visualization tools for solving mathematical problems. The package supports a large set of mathematical objects and algorithms for a wide range of tasks. The user's work takes place in a notepad window that allows text to be interspersed with mathematical formulas, formatted text, and solution output, including 2D and 3D graphics. To develop your own algorithms and functions based on the MuPAD function library, the system provides a special Pascal-like programming language and an interactive step-by-step debugger. Algorithms created by the user can be combined into separate libraries. MuPAD 2.0 price - $700
S-PLUS
S-PLUS is a product of Insightful Corporation (http://www.insightful.com/), formerly known as a division of MathSoft, and now one of the world leaders in statistical data analysis, visualization and prediction. S-PLUS is an interactive computer environment that provides full-featured graphical data analysis and includes an original object-oriented language. The flexible S-PLUS system can be used for exploratory data analysis, statistical analysis and mathematical calculations, as well as a convenient graphical representation of the analyzed data. The main advantages of S-PLUS include unsurpassed functionality, the possibility of interactive visual analysis of data, an intuitive user interface and methods for preparing analyzed data, ease of use of the most advanced statistical methods, powerful computing capabilities, an expandable set of statistical methods, and a flexible user interface. Price - $2865
ComputerPress 12"2001
Send your good work in the knowledge base is simple. Use the form below
Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.
Course work
COMPARATIVE ANALYSIS OF COMPUTER MATHEMATICS SYSTEMS
INTRODUCTION
CHAPTER 1
1.1 Variables and constants
1.2 Vectors and matrices
1.3 Operators
1.4 Built-in functions
1.5 Programming
1.6 Solving Equations
1.7 Symbolic calculations
1.8 Graphs
1.9 Polar plots
1.10 Surface plots
CHAPTER 2
2.1 Operating environment of the MATLAB system
2.2 Arrays, matrices and operations with them
2.3 Mathematical functions and operations
2.4 Linear algebra
2.5 Data analysis and processing
2.6 Graphic commands and functions
2.7 Programming in the MATLAB environment
CHAPTER 3
3.1 Mathematica as a calculator
3.2 Palettes and buttons
3.3 Computing power of the Mathematica system
3.4 Mathematica features
3.5 Building calculations
3.6 Visualization in Mathematica
3.7 Basic approach to describing objects
3.8 Mathematica as a programming language
CHAPTER 4 Comparative analysis. Conclusion
CHAPTER 5. Practical part
List of sources used
Appendix 1
Annex 2
Appendix 3
Appendix 4
Appendix 5
Appendix 6
Appendix 7
Appendix 8
Appendix 9
APPENDIX 10
Introduction
In our time, in connection with the development of information technology, the so-called computer mathematics systems have appeared, or they are also called mathematical packages that facilitate the performance of various mathematical tasks, help to check the solution of the problem using a computer program. The time for completing tasks of varying complexity is greatly reduced. For hundreds of thousands of professionals in various industries involved in engineering and scientific research, computer mathematics systems have provided an excellent environment for organizing calculations. Therefore, familiarity with the basics of organizing mathematical packages can be useful both for specialists starting to master this system and for university students in various specialties. They have an extremely wide range of tools that translate complex mathematical algorithms into programs, the so-called elementary functions and a huge number of non-elementary functions. , algebraic and logical operations. Most of the exercises from the course of higher mathematics can be solved with just one command. You can calculate integrals, solve differential equations, ordinary equations and systems of linear equations. Provided a wide range of work with matrices, vectors. It is possible to build two-dimensional and three-dimensional graphs. There are several mathematical packages such as Mathcad, MATLAB, Mathematica, Maple, Statistica and others. But on an example, consider three of them: Mathcad, MATLAB and Mathematica; each separately - its features and interface, and then we will conduct a comparative analysis between them.
Chapter 1.Mathcad
Mathcad is a software tool, an environment for performing various mathematical and technical calculations on a computer, equipped with an easy-to-learn and easy-to-use graphical interface that provides the user with tools for working with formulas, numbers, graphs and texts. More than a hundred operators and logical functions are available in the Mathcad environment, designed for numerical and symbolic solving of mathematical problems of varying complexity. The menu in Mathcad is nothing unusual: like many other programs, there are various toolbars, a formatting bar. In addition, there is a "Math" panel, which includes such panels as "Calculator", "Graphics", "Matrices", "Calculations", "Calculation", "Logic", "Programming", "Greek" and "Symbol" . These panels contain various non-keyboard characters and functions.
1.1 Variables and constants
Valid Mathcad variable and function names, predefined variables like this, and number representations are described here. Mathcad handles complex numbers just as easily as real numbers. Mathcad variables can take complex values, and most of the built-in functions are defined for complex arguments.
Names
Mathcad distinguishes between Greek and Roman letters.
If you use a Greek character instead of the corresponding Roman character in a variable or function name, Mathcad will treat it as a different name.
Letter indices
If you place a dot in a variable name, Mathcad displays everything that follows it as a subscript. You can use these literal subscripts to create variables with names like vel init and u air .
Predefined Variables
Mathcad contains eight variables, the values of which are determined immediately after starting the program. These variables are called predefined or built-in variables. Predefined variables or have a common meaning, like p and e, or used as internal variables that control how Mathcad works, like ORIGIN and TOL.
You can control the TOL, ORIGIN, PRNPRECISION, and PRNCOLWIDTH values without having to explicitly define them in the worksheet.
The complete list of predefined Mathcad variables and their default values is given below. See "Table 1" ("Appendix 1").
Numbers
This section describes the different types of numbers used by Mathcad and how to write them into formulas.
Numbers Used
Mathcad interprets anything that starts with a digit as a number. The figure may be accompanied by:
other numbers,
decimal point
digits after the decimal point,
one of the letters h or o for hexadecimal and octal numbers, i or j for complex numbers.
Mathcad uses a dot to separate the fractional part of a decimal, while a comma is used to separate numbers from each other, such as discrete argument values or numbers in an input table.
imaginary numbers
To enter an imaginary number, you need to enter the symbol of the imaginary unit after its modulus i or j, for example, 1 i or 2.5 j. Can not use i or j by themselves to denote the imaginary unit.
1.2 Vectors and matrices
Arrays in Mathcad are described here. While ordinary variables (scalars) store a single value, arrays store many values. As is common in linear algebra, arrays that have only one column will often be called vectors, all others matrices.
Array Calculations
Variables can represent arrays just like scalars. Defining a variable as an array is much like defining a scalar.
For example, if we define a vector v, You can now use the name v instead of the vector itself in any expression.
Subscripts and superscripts
You can access individual array elements using subscripts. You can also refer to an individual array column using a superscript. To print a subscript, use the buttons on the toolbar.
The vector and matrix elements are usually numbered starting from row zero and column zero.
Vector and matrix operators
Some of the Mathcad operators have special meanings when applied to vectors and matrices. For example, the symbol for multiplication simply means multiplication when applied to two numbers, but it also means dot product when applied to vectors, and matrix multiplication when applied to matrices. The list of vector and matrix operators is given below. See "Table 2" ("Appendix 2").
Vector and matrix functions
Mathcad contains functions for common linear algebra operations with arrays. These functions are intended for use with vectors and matrices. Unless it is explicitly stated that a function is defined for a vector or matrix argument, you should not use arrays as an argument in it.
Array Dimensions and Range
Mathcad has several functions that return information regarding the size of an array and the range of its elements: rows(A)- number of rows in the array A,cols(A)- number of columns in the array A, length(v)- the number of elements in the vector v,max(A)- the largest element in the array A.
Special Matrix Types
You can use the following functions to generate from an array or scalar a matrix of a special type or shape. These are the features diag(returns a diagonal matrix) , reref(Step Matrix) identity(n) (identity matrix n x n) and other functions.
Matrix Special Features
You can also find the rank of a matrix: rank(A) and the norm: normal1(A).
Formation of new matrices from existing ones
Mathcad has functions for joining matrices together -- side by side, or one on top of the other. One of them: stack (A, B) - array formed by location A above B. Mathcad also has a function to extract a submatrix: submatrix (BUT, ir, jr, ic, jc) - A submatrix consisting of all elements contained in rows with ir on jc and columns with ic on jc.
1.3 Operators
Mathcad uses common operators like + and /, as well as operators defined for matrices, such as transposition and determinant operators, and special operators such as integrals and derivatives.
List of operators
A partial list of Mathcad operators is given below. See "Table 3" ("Appendix 3"). Most operators can be entered into a working document using the operator palettes. To open the operator palette, click on the desired button on the button strip directly below the menu commands.
All operators listed in the table can be typed from the keyboard, can be found on the toolbar in the menu Mathematics. These are the panels Arithmetic, Mathanalysis, Boolean.
1.4 Built-in functions
Many of Mathcad's built-in functions are listed and described here.
The functions used to work with vectors and matrices are described in Section “Vectors and Matrices”.
Inserting built-in functions
To insert a function in Mathcad, you can click on the toolbar Paste ->Function.
Transcendent Functions
This section describes Mathcad's trigonometric, hyperbolic, and exponential functions, along with their inverses.
Trigonometric functions and their inverses. Mathcad trigonometric functions and their inverses are defined for any complex argument. They also return complex values wherever needed.
Here are some of them: sin(z)- returns the sine of z, asin(z)- returns the angle in radians whose sine is z, sec(z)- returns 1/cos(z), secant z. Other trigonometric functions are defined similarly.
Hyperbolic functions
These functions can also take a complex argument and return complex values. Hyperbolic functions are closely related to trigonometric functions.
One of them - sinh(z)- returns the hyperbolic sine of z.
Logarithmic and exponential functions
Mathcad logarithmic and exponential functions can take a complex argument and return complex values: exp(z)- returns e to the power of z, log(z)- returns the natural logarithm of z,
log(z)- returns the logarithm of z to base 10.
Truncation and rounding functions
All of these functions extract some part of their argument.
Functions Re, Im and arg extract the corresponding part of the complex number (real, imaginary, and when z is in the form re i q). Functions ceil and floor return the nearest integer greater than and less than the argument, respectively. These functions can be used to create a function that returns the fractional part of a number.
Sort functions
Mathcad contains three functions for sorting arrays and one for reversing the order of their elements:
sort(v)- returns the elements of the vector v, sorted in ascending order.
1.5 Programming
Mathcad allows you to write programs. A program in Mathcad is an expression, which in turn consists of other expressions. Mathcad programs contain constructs much like programming language constructs: conditional control transfers, loop statements, variable scopes, subroutines, and recursion. Writing programs in Mathcad allows you to solve problems that are impossible or very difficult to solve in another way.
Creating programs
The Mathcad program is a special case of the Mathcad expression. Like any expression, a program returns a value if it is followed by an equals sign. Just as a variable or function can be defined with an expression, it can also be defined with a program.
The main difference between a program and an expression is how the calculations are specified. When using an expression, the algorithm for obtaining a response must be described by a single operator. As many statements as needed can be used in a program.
Conditional statements
Normally, Mathcad executes program statements in order from top to bottom. There may be cases in which a statement needs to be executed only if a certain condition is met. This can be achieved using the “ if”.
Cycles
One of the greatest advantages of programming is the ability to repeatedly execute a sequence of statements in a loop. Mathcad offers two types of loops that differ in the way they define the end condition of the loop.
If the required number of loop executions is known in advance, it is advisable to use a loop of the type for.
If the loop must terminate upon the fulfillment of a certain condition, and the moment of fulfillment of this condition is not known in advance, then it is advisable to use a loop of the type while.
Programs within programs
One of the features that determine the flexibility of programming methods is the ability to use some program structures within others. In Mathcad, this can be done in three ways:
· One of the statements of the program can be made, in turn, a program.
· You can define a program somewhere else and call it from other programs as if it were a subroutine.
You can define a function in a recursive way.
1.6 Solving Equations
Learn how to use Mathcad to solve equations and systems of equations. It is possible to solve both one equation with one unknown and systems of equations with several unknowns. The maximum number of equations and unknowns in the system is fifty.
Solving one equation
To solve one equation with one unknown, the function is used root(f(z), z) - returns the z value at which the expression or function f(z) goes to 0.
Function root designed to solve one equation with one unknown.
Systems of equations
Mathcad makes it possible to solve systems of equations as well. The result of the solution of the system will be the numerical value of the desired root. For symbolic solution of equations, it is necessary to use blocks of symbolic solution of equations. In the symbolic solution of equations, the desired root is expressed in terms of other variables and constants.
find (z1, z2, z3, . . .) - returns the solution of the system of equations. The number of arguments must be equal to the number of unknowns.
Keyword Given, standing at the beginning of the definition of the equation, the equations themselves and the inequalities that follow it, and any expression containing the function find, called block for solving equations.
1.7 Symbolic calculations
This describes symbolic transformations in Mathcad. Symbolic conversions are described below. See "Table 4" ("Appendix 4").
1.8 Graphs
Plots in Mathcad are both versatile and easy to use. To create a graph, click where you want to insert the graph, select Cartesian Graph from the Graph menu, and fill in the empty fields. You can format graphs in every possible way by changing the appearance of the axes and the style of the curves and using various labels.
Insert a graph
To insert a graph into Mathcad, you can click on the toolbar " Graphic arts".
In general, graphs are built on the basis of available templates. Initially, you need to define the graph function.
The bottom, top, left and right borders of the chart are edited. If you double-click on the graph with the left mouse button, the graph setting will appear: coordinate axes, color, line output style. You can also set the range in increments. A range is required to define a function parametrically.
1.9 Polar plots
In some cases, when plotting graphs, it is more convenient to use polar rather than Cartesian coordinates. Mathcad allows you to build polar plots.
Here you can also edit the graph and place multiple graphs in one area.
1.10 Surface plots
Along with two-dimensional and three-dimensional graphs, you can include in Mathcad working documents. Unlike 2D plots, which use discrete arguments and functions, 3D plots require a matrix of values. This shows how a matrix can be represented as a surface in 3D space. It also covers the creation, use, and formatting of surfaces in 3D space.
Chapter 2 MATLAB
MATLAB is an interactive system whose main object is an array, for which you do not need to specify the dimension explicitly. This makes it possible to solve many computational problems associated with vector-matrix formulations, significantly reducing the time that would be required for programming in scalar languages like C or FORTRAN.
MATLAB is both an operating environment and a programming language. One of the greatest strengths of the system is that programs can be written in MATLAB for reuse. The user can write specialized functions and programs himself, which are issued in the form of M-files.
2.1 OpMATLAB iteration environment
The operating environment of the MATLAB system is a set of interfaces that support the connection of this system with the outside world. This is a dialogue with the user through the command line or a graphical interface, viewing the workspace and access paths, the editor and debugger of M-files, working with files and the DOS shell, exporting and importing data, interactive access to help information, dynamic interaction with external Microsoft systems Word, Excel Microsoft Word, Excel, etc. These interfaces are implemented through the command window, toolbar, workspace and access path viewers, M-file editor/debugger, special menus, etc.
command window
The MATLAB command window contains options that can be viewed in "Table 5" ("Appendix 5").
Dashboard
The toolbar of the command window of the MATLAB system allows you to provide easy access to operations on M-files.
These operations include:
Creation of a new M-file (New File);
Opening an existing M-file (Open File);
Fragment copying (Copy);
Fragment insertion (Paste);
Viewing the workspace (Workspace Browser);
current help (Help).
M-file editor/debugger
The MATLAB system includes the M-file Editor/Debugger, which can be called from the command line with the edit or edit command<имя М-файла>.
2.2 Arrays, matrices and operations with them
Arrays are the basic objects in the MATLAB system. Functions for forming arrays and matrices, operations on matrices, and special matrices are described below.
Formation of arrays of a special type
ZEROS - formation of an array of zeros
ONES - formation of an array of units
EYE - formation of an identity matrix
CROSS - vector product
Matrix operations
DIAG - formation or extraction of matrix diagonals
TRIU - formation of an upper triangular matrix (array)
· FLIPUD - rotation of the matrix relative to the horizontal axis and others.
Special matrices
· MAGIC - magic square
2.3 Mathematic functions and operations
MATLAB has an extensive library of mathematical functions. Each function has a specific name. The function maps the values of its arguments to the value of the result.
Function arguments are always specified in parentheses after the function name and, if there is more than one, separated by commas.
Mathematical operations
a+b - addition
a=b - assignment operator
a.*b - element-wise multiplication
a*b - matrix multiplication
a.^b - element-wise exponentiation
a^b - matrix exponentiation
a>b - more
a>=b - greater than or equal to
a~=b - unequal
a==b - equals
a&b - logical AND
a|b - logical OR
~a - logical NOT
a." - transposition
a" - complex conjugate transposition
b(a) - indexing
Basic Functions
ABS - absolute value
ANGLE - complex number argument
REAL, IMAG - real and imaginary parts of a complex number
· CEIL, FIX, FLOOR, ROUND - rounding functions
Transcendent Functions
SQRT - square root
EXP - exponential function
LOG - natural logarithm function
LOG10 - logarithm functions
Trigonometric functions
SIN, SINH - sine functions
COS, COSH - cosine functions
TAN, TANH - tangent functions
COT, COTH - cotangent functions
2.4 Linear algebra
A matrix as a mathematical object arises when solving specific computational problems, and primarily when solving systems of linear algebraic equations and eigenvalue problems. Applied problems that generate matrices determine for them a special set of admissible operations, among which the multiplication operation occupies a special place.
Consider the functions of the MATLAB system that support working with matrices.
Matrix characteristics
NORM - norms of vectors and matrices
RANK - matrix rank
DET - matrix determinant
RREF - triangular matrix
2.5 Data analysis and processing
This chapter describes the functions of the MATLAB system that are designed to analyze and process data specified as numeric arrays. Here, the functions of calculating the average, median, finite differences, gradient are considered. Numerical integration functions, solutions of the Cauchy problem for systems of ordinary differential equations are presented.
Basic operations
· SUM, CUMSUM - summation of array elements
· PROD, CUMPROD - product of array elements
SORT - sort array elements in ascending order
MAX - determination of the maximum elements of the array
MIN - definition of the minimum array elements
Numerical integration
TRAPZ - trapezoidal integration
· QUAD, QUAD8 - calculation of integrals by quadrature method
Integration of ordinary differential equations
· ODE23, ODE45 - solution of the Cauchy problem for systems of ordinary differential equations
Calculation of minima and zeros of a function
FMIN, FORTIONS - minimization of a function of one variable
FMINS - function minimization of several variables
FZERO - finding zeros of a function of one variable
· FPLOT - plotting functions of one variable
2.6 Graphic commands and functions
Starting from version 4.0, the MATLAB system includes a powerful graphics subsystem that supports both visualization tools for two-dimensional and three-dimensional graphics on the terminal screen and presentation graphics tools.
The elementary graphical functions of the MATLAB system allow you to build on the screen the following types graphs: linear, logarithmic, polar.
For each graph, you can set a title, apply the designation of the axes and scale grid.
2D Plots
PLOT - graph on a linear scale
LOGLOG - graph on a logarithmic scale
· SEMILOGX, SEMILOGY - graph in a semi-logarithmic scale
· POLAR - graph in polar coordinates
3D Graphs
The MATLAB system provides several commands and functions for constructing three-dimensional graphs.
The values of the elements of a numeric array are treated as the z-coordinates of points above the plane defined by the x and y coordinates. There are several ways to connect these points. The first of them is the connection of points in a section (the plot3 function), the second is the construction of mesh surfaces (the mesh and surf functions).
· PLOT3 - construction of lines and points in three-dimensional space
MESH, MESHC, MESHZ - three-dimensional mesh surface
SURF, SURFC - shaded mesh surface
· ZOOM - chart scale control
COLORMAP - color palette
Labels and explanations for charts
· TITLE - titles for two- and three-dimensional graphs
XLABEL, YLABEL, ZLABEL - designation of axes
· TEXT - adding text to the current chart
Special Graphics
The dedicated graphics section includes graphics commands and functions for bar graphs, histograms, vector and complex element displays, discrete data sequence output, and moving paths for both 2D and 3D graphics.
BAR - bar charts
HIST - building a histogram
STEM - discrete graphics
STAIRS - step chart
WATERFALL - three-dimensional surface
2.7 Programming in the MATLAB environment
Programming
Files that contain MATLAB language codes are called M-files. A text editor is used to create an M-file; the M-file call is preceded by the assignment of values to the input arguments; the result is the value of the output variable. Thus, the whole procedure includes two operations:
· Create an M-file using a text editor.
Call an M-file from the command line or from another M-file:
Types of M-files. There are two types of M-files: M-scenarios and M-functions with the characteristics indicated in "Table 6" ("Appendix 6").
M-file structure.
An M-file designed as a function consists of the following components:
function definition string
The first line of the comment
· Comment
function body
Creation of M-files. M-scenarios. M-functions
M-files are plain text files that are created with a text editor. For the operating environment of a personal computer, the MATLAB system supports a special built-in editor/debugger, although any other text editor with ASCII codes can be used.
M-scenarios
Scripts are the simplest type of M-file - they have no input or output arguments. They are used to automate repetitive calculations. Scripts operate on data from the workspace and can generate new data for further processing in the same file. The data that is used in a script is stored in the workspace after the script ends and can be used for further calculations.
M-functions
M-functions are M-files that allow input and output arguments. They operate on variables within their own workspace, separate from the workspace of the MATLAB system.
The structure of the M-function. The M-function consists of:
function definition strings;
the first line of the comment;
The actual commentary
body of the function
inline comments
Every function in the MATLAB system contains a function definition string like this one.
If the function has more than one output argument, the list of output arguments is enclosed in square brackets. Input arguments, if present, are enclosed in parentheses. Commas are used to separate arguments in the input and output lists.
The names of the input variables may, but need not, be the same as the names specified in the function definition line.
Comment. For M-files, you can create an online tooltip by entering text on one or more comment lines.
Function body. The body of the function contains the MATLAB language code that performs the calculations and assigns values to the output arguments. Statements in a function body can consist of function calls, program flow control constructs, interactive I/O, calculations, assignments, comments, and empty strings.
Chapter 3 Mathematica
The Mathematica system, created ten years ago, has an extremely wide range of tools that translate complex mathematical algorithms into programs. All the so-called elementary functions and a huge number of non-elementary ones; algebraic and logical operations. The Mathematica system is very widespread in the world, it has captured huge areas of application in scientific and engineering research, as well as in the education system.
3 .1 Mathematica as a calculator
You can use Mathematica just like a calculator: you enter data and Mathematica outputs the result.
Mathematica automatically handles numbers of any size.
You can work in standard mathematical notation using palettes or special keyboard shortcuts.
An important feature of the Mathematica system is its ability to operate with symbolic expressions as easily as with numbers.
Solving an equation in Mathematica. The roots of the equation are found using the function solve. The roots of the equation are functions that depend on a parameter.
The calculation of the integral is carried out similarly to the calculations in other
math packages.
You can use Mathematica to plot 2D and 3D function graphs.
The graph of this function is shown in "Figure 1" ("Appendix 7").
You can take advantage of the many computing capabilities of Mathematica by simply clicking one of the buttons in the standard palettes.
3.2 Palettes and Buttons
Palettes and buttons provide a simple and fully customizable point-and-click interface for Mathematica.
Mathematica comes with several standard palettes.
Part of the palette BasicCalculations shown in "Table 7" ("Appendix 8").
Palettes are an extension of the presented keyboard.
In the palette, the symbol means the position where you want to insert some expression: Log , 2 , Exp, etc.
Creating your own palette is very easy.
Using the Create Table/Matrix/Palette command in the Input menu, you can create your own palette.
You can create your palettes to enter any function or operator, such as Expand, Factor, Simplify.
3.3 CalculateThe power of Mathematica
Mathematica provides great computing power while remaining as easy to use as a calculator.
This command creates a 100x100 matrix of random numbers.
On most computers, Mathematica takes less than a second to calculate all the eigenvalues of this matrix and present their moduli in the form of a graph, which is shown in "Figure 2" ("Appendix 9").
Mathematica can operate on numbers of any size. On most computers, calculating the exact value of 1000! in Mathematica takes less than a second. Mathematica easily copes with algebraic transformations, such as factoring a polynomial into factors: the command factor() .
Mathematica uses sophisticated algorithms to simplify expressions: the command Simplify() .
In many types of calculations, the Mathematica system is the world record holder in terms of the speed of calculations and the amount of information processed.
3.4 Mathematica features
The Mathematica system combines a large stock of mathematical knowledge and uses its own algorithms.
Mathematica implements hundreds of special functions used in pure and applied mathematics.
The Mathematica system can calculate the values of special functions with any parameters and with any precision.
Mathematica can calculate many different types of integrals.
Mathematica can also calculate finite and infinite sums and products.
Mathematica can solve a wide range of ordinary and partial differential equations.
The built-in algorithms of the Mathematica system are able to cope with a wide range of mathematical problems.
3.5 Building calculations
The ability to work with formulas will allow you to easily combine all parts of the calculation together.
Calculating Matrix Eigenvalues: Command Eigenvalues[{{},{}}].
Mathematica can calculate eigenvalues even if there are symbolic parameters in the matrix.
Built-in system functions Mathematica is designed so that the result of one function can be easily used as input to another function.
3.6 Visavisualization in Mathematica
Mathematica makes it easy to create great images.
This command draws a 3D parametric plot with most options automatically selected.
The graph itself is presented in "Figure 3" ("Appendix 10").
Mathematica contains graphical primitives with which you can build 2D and 3D graphs of any complexity.
List of primitives representing a point.
3.7 Basic approach to describing Mathematica objects
Mathematica is based on the idea that everything can be represented as a symbolic expression.
All symbolic expressions are written in a single form: head.
Item List:
Algebraic expression:
The equation:
Boolean expression:
Team:
Schedule:
3.8 Mathematicsatica as a programming language
Mathematica has a very flexible and intuitive programming language built into it.
The Mathematica language supports all major modern methods programming, and also provides some new features.
procedural programming
Many operations are automatically propagated to lists.
This command concatenates nested lists.
Functional programming
The command is a "pure function". An argument is substituted for the character.
Chapter 4. Comparative analysis. Conclusion
We will carry out a comparative analysis of computer mathematics systems in the form of a table.
Comparison criterion |
||||
Interface |
Like "wysiwyg". The set of expressions comes from the position of the cursor. You have to enter relatively few keyboard expressions, as there are various tool palettes in the command window. |
Three windows: a command window, all variables and their types, and a hint window. There is a prompt string, denoted by ">>". Unlike Mathcad, all functions have to be entered from the keyboard. |
The prompt line, unlike MATLAB, is divided into two regions: input and output, which together make up the region of the entire expression. The input area can be edited. There is also a palette with Greek letters, various symbols and a math analysis panel. |
|
Working with arrays and matrices |
A sufficient set of functions is provided for performing various operations with matrices and vectors. Some operations can be taken from the corresponding palette, others can be entered from the keyboard or pasted from the menu Insert->Functions. |
Similarly to Mathematica, matrices and vectors are formed using a list of elements. Functions are entered from the keyboard. |
A multidimensional dataset is created using a list entered from the keyboard. Also, functions for working with matrices and vectors are introduced from the keyboard. |
|
Solving Equations |
Distinguishes between solving equations and systems of equations. Commands can be typed from the keyboard, can be inserted from the menu. |
Solves equations and systems of equations by a function with different parameters. |
Contains several functions for solving equations and systems of equations. Functions can find roots of equations with a parameter. There is also a function for special solutions. |
|
Mathematical Operators |
The table contains a number of operators, both simple ones like addition, and calculating the sum, product, integrals and derivatives, etc., which can be entered from the keyboard or inserted from the appropriate palette. |
Here, unlike Mathcad, all operators are entered from the keyboard as separate symbols and functions. A relatively detailed list of operators is given. |
Just like in MATLAB, operators have to be entered from the keyboard, but some can also be found on the tool palette. |
|
Built-in Functions |
They are built on the principle of all functions: the name of the function and the parameters in brackets. It is possible to single out the functions of simplifying the expression, opening brackets, trigonometric and a number of others. |
Here, only functions that are entered from the keyboard are mainly used. |
A lot of functions for various purposes with a different number of parameters are given. Help the user in solving various problems. |
|
Programming |
Templates are provided for creating programs and subroutines. The output value is the last value calculated by the program. Also inside the program, you can use the functions described earlier. Programs are written in the same file as all calculations. |
Here programs are created as separate M-files. If you write a program for a function, then this function can be used as a standard one. You can also insert comments into the program. |
You can create various functions and operate on them. Allows you to create programs within one input block. The result will be the last calculated value. Unlike Mathcad, where programs are written "in a column", here they are written in a line. |
|
Graphic features |
Graphs are built on the basis of available templates. Main views: graph in the Cartesian plane, in polar system coordinates, three-dimensional in the form of a smooth surface, in the form of contour curves, etc. First, the function of the graph, the range, is set, then the graph itself is built, which can be edited. |
The graph function is created from the command line. Graphs are created on forms in a certain coordinate system. You can specify chart properties in the plotting command. |
The function that draws the graph ends with "PLOT" in the 2D case, and "PLOT 3D" in the 3D case. To build a graph, you must first define a function. You can also edit the chart. |
Conclusion
As can be seen from the comparative analysis, all mathematical packages are similar to each other. They have similar principles for constructing calculations, graphs of functions. Mathcad, MATLAB, and Mathematica both have lists of built-in functions and operators. But there are also differences, for example, in the interface, programming methods. At this level of development of education, I think that it is impossible to do without computer mathematics systems. Otherwise, why did they appear then?
Chapter 5. Practical part
It was required to create a website with the same title of the term paper, namely "Comparative analysis of computer mathematics systems".
The site was created to bring information about the purpose of computer mathematics systems to everyone.
The site contains the following html pages: 1 - Main page; 2 - Mathcad; 3 - MATLAB; 4 - Mathematica; 5 - Comparative analysis. Conclusion.
Pages Mathcad, MATLAB, Mathematica, in turn, also contain several pages.
The folder structure for storing the structure of the site is as follows: a folder "sweta" has been created, which contains all the pages and all the contents of the site. This folder contains the main page ind.htm and all pages of the site.
Also in this folder is the ind.files folder, which contains the mystyle.css style sheet, graphic files connected to the site pages, and several folders, which in turn also contain graphic files connected to the site pages.
File ind . htm, as mentioned earlier, is the main page.
On this page in the upper left corner there is a label that is directly related to the name of the site and illustrates it to some extent. The label is a necessary link of the main page of the site.
Next to the label is the actual name of the site. In the center of the page is a table consisting of two columns: the first contains a menu, also designed as a table; in the right - part of the narrative, that is, the introduction.
At the bottom of the main page there is a ticker with the email address of the site creator.
Using hyperlinks from the main page, you can get to four pages - these are the files ind1.htm - general about Mathcad, ind2.htm - general about MATLAB, ind3.htm - general about Mathematica and ind4.htm - comparative analysis of mathematical packages and output.
On these pages, a menu is located at the top, followed by general information about a particular package and hyperlinks to individual pages of the site intended for Mathcad, MATLAB, and Mathematica, respectively. You can return back to the main menu using the hyperlinks located at the top of these pages. Most of the pages include pictures illustrating the theory posted on the site.
All html files, numbered from one, belong to the Mathcad system, numbered from two - to MATLAB, from three - to the Mathematica system.
The general background of the site is light lilac, which makes it easier to read the text and is prudent if the user begins to print the web page.
Font - 13.5 size, therefore, reads well.
All pages of the site are created using a style sheet called mystyle.css. It includes headings of levels 1-4, menu items of levels 1-4, hyperlinks, tables and table cells, body text.
The style sheet is connected as an external file, a link to it is embedded in the document using the tag .
The following tags were used to create the site.
- is a container that contains all the content of a web page.
- title of the document.- designed to create one table cell.
- designed to display on a web page images in GIF, JPEG or PNG graphic format. Specifies a text paragraph. Sets a newline at the location where this tag occurs. - container for changing font characteristics: size, color, typeface.
|