Set the koristuvach function in SCM maxima. Tikhon Tarnavsky. Maxima – maximum freedom of symbolic calculations. Most common problems with running TeXmacs

Golovna / Zakhist

Free math

Oleksandr Bikmeev Of course, how free computer mathematics is and how free it is to be mathematical.

Be it a science, from physics to philology, the vikoryst achievements of mathematics. In connection with these fahivts, non-mathematicians need resources that would allow them to put problems in mathematical form and extract solutions from the form of formulas or set values, so that the required computer mathematics systems can be taken into account I work on mathematical tasks using different methods.

Unfortunately, in our region, such programs are widespread in the narrow field of scientific activity, and it is not always due to the fact that schoolchildren and students are not taught about professional mathematical packages, art. There are just one license, which most often costs thousands and tens of thousands of rubles.

We encourage you to take a look at a wide range of mathematical packages that you can easily access from the Internet, search for all kinds of searches (sometimes with security), as well as the full availability of output texts , change their internal devices and, therefore, expand their functionality by powerful forces.

Symbolic calculation

Systems of computer mathematics (SCM) have been disintegrating for a long time, and Maxima() was one of the first. Initially, it was a commercial product, but without facing competition, the system moved to the category of free ones.

Obolonka wxMaxima This menu item allows you to display or access the mathematical operations panel from the screen.

The main advantage Maxima before other free systems - this is an emphasis on symbolic calculations. Then, having entered the analytical view and calculation, you can see the result in the same way as in the analytical view.

Maxima Allows you to develop rank algebras, rank systems, construct operations of integration, differentiation, stacking, and so on. In addition, there will be differential equations, boundary data, Cauchy equations, concatenation of algebraic calculations with matrices, there will be graphs and surfaces, specification of various functions for Cartesian polars th coordinate systems. It is important to overestimate all possibilities.

For SCM Maxima a bunch of shells are broken up, the most handy ones (for the peeler-cob) є wxMaxima(Div. Fig. 1). Starting with version 0.8.0, it will quickly change to something better. The remaining version (0.8.3) contains such popular commercial packages as Mapleі MathCAD. The work in this process is quite simple and allows you to obtain pleasant results in just a few minutes. There are a lot of operations, such as those present in the menu and on the toolbars, provided by manual masters that allow you to change settings without knowing the stored language and commands Maxima. Well, one more important fact - all shells for this SCM are Russified. In addition, having inserted a large package Maxima Students can more easily get used to commercial packages, which are characterized by both a clear similarity in interface and syntax (especially Maximaі Maple).

The system is miraculously documented, but the pre-modern material of the presentation is not in English. Our magazine published initial materials about work at SCM Maxima(LXF81-86). Being a console add-on, Maxima can be processed in batch mode, so that a text file with a list of commands can be sent for processing and a text file with the results can be retrieved, and the output can be formatted using the markup system TeX, then this allows vikorystuvovat її as a basis for inducing power additions. One of the applications of such development is the expansion TeXmacs.

On the basis of obvious knowledge, it can be said that junior year students master work in Maxima fill up the liquid and begin to vikorystvovat in the near future to conquer the task of other subjects. If they take a skin course, they end up with more problems.

On the right, there are a great number of positive moments in Maxima Yes and negative. First of all, the final result, especially in the hour of rising complex tasks, has a lot to do with the level of knowledge of mathematics and the knowledge of the SCM data, which is why it is sometimes necessary to proceed with the first transformation independently. In a different way, Maxima She works very well with algebraic expressions, as well as transcendental, logarithmic and similar ones, which make her more difficult. However, since it is not possible to eliminate analytical solutions, it is possible to speed up numerical development. Thirdly, feasibility Maxima To create folding graphs or visualize, for example, a vector field, one should not compete with one’s capabilities Maple. I, fourthly, for full-fledged work it is necessary to calculate numerical commands and constants Maxima, and this is what terpiness means.

SCM Maxima be included in most Linux distributions or, if necessary, be present in the repositories. It is included in the stock of such light products as AltLinux School, Edubuntu and EduMandriva.

Vikno SMath Studio, in which the function is defined, it is calculated and the graph is generated.

It should be noted that engineers finally decided to work with such a powerful calculator appendage as MathCAD. This system of engineering developments is available for all platforms (div. Commercial packages), but for serious money. Prote robot sellers are trying to force graduates to work in this system. How about lighting installations?

Our country has a ritual project: SMath Studio(http://ua.smath.info/forum/). This is a costless, but, unfortunately, not yet a good product, the distributor of it, Andriy Ivashov, is trying to create an alternative to the monster MathCAD, І in the new place (div. Fig. 2). The program is divided for the middle .NET, and then adapted for Mono.

SMath Studio allows you to perform analytical calculations, operations with matrices, graphs and calculations, and also supports programming functions. Unfortunately, analytical integration is not yet supported, but the product is successfully developing, and in the fall of 2009. The author will complete the development of the infrastructure to allow third-party modules that are connected to be used. It is possible that software developments will reach a new level, and we will lose a valuable alternative MathCAD.

It should be noted that in the spring of 2009, after a year with the author, the product was included in the warehouse of the lighting distribution kit EduMandriva. Regardless of the limited functionality, this addition allows you to save on daily fees on the level of schoolchildren and junior students, as well as simple engineering developments. And yakshcho vrahuvati, scho SMath Studio It is wonderfully felt on modern computers and smartphones powered by Windows Mobile, so getting to know it is simply a must for schoolchildren and students.

On the official website there is always documentation in DOC and ODT formats, and on the official forum you can supply information to the developer and discuss vikoristana when developing program algorithms.

Vikno wxMaxima with the results of symbolic calculations and function graphs

At the end of this section, I would like to point out that packages of symbolic mathematics, as a result, are a form, not a number. Let's take a look at the butt, indications in Fig. 3, in which the koristuvalnitsa function is identified and another method is found for it; Then the function is integrated. At the same time, a schedule was created. In this way, schoolchildren and students can visualize a new analysis of the function. And this is not all: Maxima It is possible to feel the expression of the path of the opening of the arches, the presentation of similar additions, the appearance of substitutions and the assignment of active minds and assumptions that are superimposed on the expression. Add to this the possibility of a symbolic level of leveling and leveling systems, as well as differential levels, and you will understand that the current student cannot do without these tools, and through the contributions of natural disciplines can learn lessons Practical activities for introducing interactive tasks and demonstration material.

Numbers rozrakhunki

Apparently, not every problem can be analyzed analytically, in order to remove decisions from the appearance of a song formula. Then a variety of numerical methods come to the rescue for deriving solutions with great accuracy. The most well-known representative of additives for numerical developments is the computer algebra system (CAS) Matlab.

Matlab widely expanded throughout the world (div. Change in LXF109), but it is possible to issue new licenses not only to schools, but also to rich Russian universities. Behind the cordon they also respect for better chances to grab money – and invest human resources in the development of alternative analogues Matlab. Let's take a look at their actions.

In my opinion, we are ready to start focusing on the project GNU Ostave(http://www.gnu.org/software/octave/). Retailers position this system as “high-level language programming for numerical divisions.” Like many great *nix projects with a long tradition, it provides a command line interface. Enter at the terminal octave- I (usually, initially GNU Octave installed on your computer) you will be prompted by this system. Start entering commands, and the calculation results will be displayed in the terminal.

The command line interface has its advantages in that it practically does not take up the computing resources of the computer, depriving all the effort of the processor on the calculations themselves, and not on displaying the text of commands and the results of the calculations. And yet, the current koristuvach is rarely ready to put up with it.

. Obolonka qtOctave From the financial calculations.

Long time GNU Octave a lot of graphical interface, until you decide without showing up qtOctave(Div. Fig. 4). This shell can even guess the interface Matlab allows you to automate the execution of certain routine operations (for example, daily schedules) with the help of additional masters.

The language system is fragmented to be as similar as possible to mine Matlab; Well, man, I've mastered it GNU Octave, it is possible to practically practice without retraining and in Matlab And this is also necessary for robot sellers. In addition, enthusiasts of the free software security movement have created a sufficient number of expansion packages for the system. Therefore, the functionality of the SKA itself is gradually increasing. Well, the availability of comprehensive documentation (even in English) both for the system and for expansion packages makes this product not only visible, but also accessible for implementation.

The downside is that the shell interface is not very user-friendly qtOctave, especially since the version has not been updated since the fall of 2008 (there is a feeling that the project has been abandoned). Extension packages are not rich in functions and do not boast graphical capabilities; In addition, the smells are not equal, since the situation is such that one project was developed by a first-year student, and the other, for example, is being carried out by a team of contributors. This is a completely free project, so you don’t have to worry about the licensing purity of the solutions obtained.

The upcoming package that I would like to look at is called Scilab(http://www.scilab.org), the very name indicates the similarity between Matlab. Initially it was also a commercial product and was called wine Blaise, and then Basile. Our creators were inspired by the first versions Matlab And the stench competed for an hour. However, at the beginning of the 90s, the company Simulog added its sales, and then six distributors of the French National Research Institute (INRIA) started the project Scilab.

Scilab clearly differs from its counterparts in the processing interface, is likely to require a large number of specialized extension packages, and also because it is supported by the Consortium Scilab, To the warehouse which includes the great world and scientific installations from this world.

Interface Scilab 5

Scilab- a single free system, similar Matlab What is your powerful tool for block modeling called Scicos. The distribution of the product includes a script editor and functions with the possibility of enhancement. Scilab It is possible to develop graphical capabilities for the creation of high-tech additives. You can get acquainted with the functionality of the system by looking at the demo butts - the actions from them even work (select menu items ? > Demonstration of ability).

Scilab It has functions not only for various operations on matrices, but also for generating graphs and trivial surfaces in different coordinate systems, functions for working with genetic algorithms, linking tasks on graphs, specific functions, features of simulation modeling and much more . A number of conferences dedicated to SKA will soon be announced Scilab in science, education and in the field of production.

The whole world has published a number of books dedicated to the description of work in Scilab, and assign the most low-specialized tasks. It’s a pity that the thirst for them was not transferred to the Russian mine. Russia has published only two books, one within the framework of the national project, and the other Scilab The order of the incorrect packets is described. Our magazine has also repeatedly written handbooks about work in Scilab(LXF106–109 i), other documentation is not yet available, and preliminary materials will not always allow us to understand how this other function works.

Freemat- The hostile result of what a team of three like-minded people was created for.

Release of the fifth version Scilab marking the beginning of a new stage in the development of the system. The program interface has changed (the developers have seen GTK-interface), starting to change the block modeling tool Scicos, which in 2009 may change your name to Xcos.

Another variation on the theme Matlabє Freemat(); This package holds another important, hearty rice with Matlab, And the very support of object-oriented programming. The program interface is receptive. In the main window, auto-completion of commands has been implemented. On the official website there is a new guide to work with the system (in English). The distribution package of the program is small, by today's standards, the volume is 18 MB.

The system allows you to construct numerically decoupled levels and level systems, both linear and nonlinear, and numerical signal processing (div. Fig. 6); It is good to work with rich matrices. Main positive points Freemat, in the same place Scilabі Octave, there is great insanity of the internal language system with mine Matlab that vikoristannya OpenGL For everyday graphics and surfaces, the results will look clearer.

Disadvantages Freemat There is a low speed (activities vary at times higher than in other packages) and the availability of expansion packages. This system is being developed by a team of three individuals. The project doesn’t have much momentum.

Distance mathematics

The main system is local projects, so that work on them is carried out on one machine. Ale tse happens inexplicably - for example, under the hour of distance learning; In addition, not all students will be able to (and some will be able to) install these programs on their home computers. Which type of equipment is required for remote work with mathematical packages.

SMath Studio Live: respect without leaving your browser

The midst of what we have looked at suggests such possibility SMath Studio. In separate Live The official website (http://smath.info/live) contains a virtual worksheet on which anyone can enter their accruals. The system is very user-friendly, although it doesn’t come across as fast-coded.

And yet the system is professional in this regard SAGE(http://www.sagemath.org/). This system consists of a web server that provides a graphical interface for interacting with the code Python on which the kernel is written. Any user using your favorite web browser can connect to the server, register and take advantage of your personal space. It can be either opened or closed, so that it is accessible only to the server administrator and the leader himself. In a special space, work sheets can be created, and all calculations can be completed with them.

Within the framework of a working arcush, you can vikoristovvati be-yak accessible to the mov, but there are few of them. Behind the system SAGE will eat the following products: GAP, Maxima, Python, R, LaTeX. In addition, you may be connected Octave, Axiom, Magma, Mathematica, Matlab, Maple, Mupad and others. As a result, we have created a single server for remote work, which allows us to launch any mathematical packages and compare fees with the help of free and commercial computer mathematics systems.

. For ignorant reasons, Sage You are encouraged to practice in Firefox But in another place in the distance there is a solution for remote work.

The system of access rights to special areas and the ability to work with a worksheet for several employees allows you to organize a distance from the sheet of explanation of the initial material, so as to place the butts of the task, and sheets of special task for the skin student.

At this hour there are a number of public SAGE- servers – you can connect to them, see the links that have access to the public, create your own special space and, in case of difficulties, ask for help from the public. Why just make your worksheet public? I sing to you: there are plenty of people who can help, the only problem is that the working language is English.

On the official website there is a post on the test public server (http://www.sagenb.org), as well as the initial materials and books created for this system. Register and try it out SAGE- Maybe, what are you kidding? Varto also means that we were not able to log into the server in Firefox There were no problems in other browsers.

Well, we looked at the most popular systems of computer mathematics in the world. Whether you can use them as a beginner and for work – you will see. We have already made our choice and have no information about it.

Commercial systems

Among the commercial systems, the three most popular are: Matlab(numerical calculations), Maple(the main emphasis is on symbolic calculations) and Mathematica(the aspiration of the first two rises in the distance). The heavy engineering package is worth a lot MathCAD The fragments are a great engineering calculator, and are not suitable for developing complex tasks in mathematical physics or the theory of encryption, signal processing, and so on.

All these packages are available in versions for the most advanced platforms: Windows, Linux and Mac OS X. We are releasing one license for these packages for academic installations, according to the Softline price list:

  • Matlab- RUB 30,765;
  • Mathematica- 9002 rub;
  • Maple- 36286 rub;
  • MathCAD- 5290 rub.

You can earn bonuses yourself.

The Maxima system has a wide range of functions. For the skin function, you can view the description of the documentation that is located in the prenatal system. You can click on the additional function key F1. Maxima also has a special function that displays information from the documentation for specific words. Shortened version of this function: ?? name (Fig. 12). Here? - this is the name of the operator, and the argument must be supplemented with a blank. Operator? You will see a list of these help sections and function names, as well as the text of the tasks, then prompt you to enter the number of that section or a description of the function you need to follow:

Fig. 12. Click on the command of the Maxima system.

Please note that the Maxima system does not have a clear distinction between operators and functions. Moreover, the skin operator is the real function.

All Maxima functions and operators operate not only on real numbers, but also on complex numbers. The complex numbers themselves are written in algebraic form, with an explicit unit denoted by %i; then you see a+b*%i, de Aі b- the parts of the number are clearly operational and obvious.

Let's take a look syntax of basic functions Maxima systems.

1. Arithmetic operators: +, -, *, /, ->. Butt:

3. Logical operators: and, or, not. Butt:

4. Function for determining the factorial of a number: !

The factorial of tasks, in the most formal form, is, in essence, a gamma function (more precisely, x! = gamma(x+1)), which calculates values ​​on many complex numbers, in addition to negative integers. The factorial of a natural number (and zero) is automatically reduced to a natural number.

5. Significance function napivfactorial: !! (tvіr all guys (for a paired operand) and unpaired numbers less than and equal to this).

6. Function of syntactic equalization: # The entry a#b is equivalent to not a=b.

7. Function for finding the modulus of a number x: abs(x) The modulus is calculated for all complex numbers. Butt:

8. Function that rotates the sign of a number x: signum(x)

9. Functions that rotate the largest and smallest values ​​from given real numbers: max(x1,...,xn) and min(x1,...,xn).

10. The following mathematical functions are used:

sqrt(x) Square root of x
acos(x) Arc cosine of x
acosh (x) Hyperbolic arc cosine of argument x
acot(x) Arccotangent of argument x
acoth(x) Hyperbolic arccotangent of argument x
acsc(x) Arccosecant of argument x
acsch(x) Hyperbolic arccosecant of argument x
asec(x) Arcsecant of the argument x
asech(x) Hyperbolic arcsecant to argument x
asin(x) Arcsine of the argument x
asinh(x) Hyperbolic arcsine of argument x
atan (x) Arctangent of argument x
atanh (x) Hyperbolic arctangent of argument x
cosh(x) Hyperbolic cosine of the argument x
coth(x) Hyperbolic cotangent of the argument x
csc(x) Cosecant of x
csch(x) Hyperbolic cosecant of argument x
sec(x) Secant of argument x
sech(x) Hyperbolic secant to argument x
sin(x) Sine of x
sinh(x) Hyperbolic sine to argument x
tan(x) Tangent to x
tanh(x) Hyperbolic tangent to argument x
log(x) Natural logarithm of x
exp(x) Exponent x

11. Functions before working with matrices:

determinant – value of the matrix sign:

eigenvalues ​​- value of the matrix values:

invert- Removing the gate matrix:

minor- Indicates the minor of the matrix. The first argument is a matrix, the other is

third – indexes of the row and the article are consistent:

rank– matrix rank:

submatrix- Rotates the matrix, removed from the output views

from the main rows and (or) stovpts. How to follow the parameters

row numbers, output matrix, column numbers, which are removed.

transpose- matrix transposition:

The Maxima system contains the basic operators that are included in any program. Let's take a look.

Operators of given value (name of expressions).

1. Operator ":" (operator for setting the value of the change).

2. Operator “:=” (operator of the assigned function of the correspondent).

3.Expansion of operator options is assigned to a given function, which is clearly indicated through: and::=.

The use of the operator for the assigned function of the operator significantly simplifies the work with it, since you can navigate to it by name and easily and manually calculate the significant functions at given points.

Example: we know the meaning of the function f (x,y)=cosx + sin y at the point

Loop operator. A loop operator can be specified in a number of ways. The way to keep in mind is that it is clear in advance how many times it is necessary to end the cycle.

Butt: setting the cycle to display the change value A in the range from -3 to 10 with threshold 5:

The advanced and important capabilities of the Maxima system work with lists and arrays.

To create vikory lists, use the makelist command. For example, for additional help

We have formed a list with the names x, which consists of ten elements, the values ​​of which are included in the formula.

To form arrays, use the array command. For example, for additional commands,

We formed a two-dimensional array A, which consists of 10 rows and 5 columns. To fill the array with elements, it is done quickly using a loop using a parameter. For example,

To display the elements of the array on the screen, you can quickly use the command:

The massif can be formed without further confusion. At the same time, we formed a one-dimensional array x, which consists of 5 elements, the values ​​of which are calculated by the formula x( i)=sin i

The inconsistency of working with arrays lies in the fact that the determined value of the elements of the array depends on everyone. It is much clearer, since the values ​​of the array (two-dimensional) are displayed in the matrix view. For this you can quickly use the genmatrix command. For example, to form a two-dimensional array (matrix) of the following, enter the command in the following form:

Vivedemo otrimany array:

6. The simplest transformation of viruses.

By default, the Maxima system has an active auto-forgiveness function. The system is designed to be simple to enter itself without any command.

butt. Please, you need to know the meaning of the upcoming numeric expression:

I'm asking you to follow the rules of the Maxima movie system.

As a matter of fact, the system displayed a significant expression, although we did not give the same command.

How can you improve the system and show not the result, but the result? For this simple function you need to enable simp: false$. To be taken away:

To activate the simplified function, you need to issue the command simp:true$. The auto-forward function can be used with both numeric and non-numeric expressions. For example,

When entered, we can turn to any of the front centers on its name, presenting it in any form. In addition, the remaining half of the output is indicated by %, and the remaining half of the input by _. This allows you to continue until the final result, without being satisfied with what your number is. If such experiments lead to the destruction of the application, due to the re-evaluation of the entire document and the number of middles entered, there may be a difference between the numbers of the middles.

butt. Find out the meaning of the virus and increase the results of 5 times.

It is necessary to replace the names of the middle vicors with changes and assign their names to any virus. And here the meaning of the change may be more mathematically correct.

The meanings of the change names are saved throughout all work with the document. We guess that if it is necessary to remove the values ​​from the change, then you can use the additional function kill(name), where name is the name of the virus that is being found; Moreover, this may be the same as the name assigned by you, so it may be the order introduced or withdrawn. So you can clear all memory and delete all names by entering the kill(all) command (or selecting the menu Mahta->Clear memory(Clear Memory)). In this mode, all insertion and output sequences will be cleared, and their numbering will begin to count as one again.

The auto-forgiveness function has been around for a long time. In addition to it there is a whole series of commands that are used for working with viruses: rational and irrational. Let's take a look at their actions.

rat (viraz) - transforms the rational viraz to its canonical form: opens all the arms, then brings everything to the final sign, suggesting and shortening; bring all numbers in the end tens notation to rational ones. The canonical form is automatically “skewed” whenever there are any transformations that are not rational.

ratsimp (viraz) - I will forgive viraz for the rational solution. I want to move “in depth” so that the irrational parts of the understanding are not seen as atomic, but say goodbye, in isolation, and all the rational elements in the middle of them

fullratsimp(viraz) - a function for simplifying rational expression using the method of sequential distillation to the ratsimp() function passed to the virus. This function works much more efficiently than ratsimp() and produces more reliable results.

expand (viraz) - opens the arms of the virus at all levels of insertion. When substituting for the function ratexpand(), do not bring stock fractions to the final sign.

radcan (viraz) - a function of simplifying logarithmic, exponential functions and static functions with non-integer rational indicators, such as roots (radicals).

Often, when you try the simplified expression of the Maxima, you may end up actually losing its complexity. Greater results can be achieved through those unknown values ​​that can be generated by changes that enter before the virus. To avoid this, apply boundaries to the values ​​that can be changed. Try for the additional function of assume (mind). Therefore, in some cases, the best results can be achieved by combining radcan() with ratsimp() or fullratsimp().

All commands are entered in the ENTERED field, the command separator is the symbol; (a speck with a clod). After entering a command, you must press the Enter key 2 U wxMaxima You need to press Shift+Enter. For this purpose, processing and displaying the result. In earlier versions Maxima and other shells (for example, xMaxima) the presence of mottling with coma after the skin command suvoro ob'yazkovo. Completing the input with a $ symbol (substituting a dot with a dot) allows you to calculate the result of the entered command, rather than display it on the screen. Whenever a value needs to be represented rather than calculated, it is necessary to put the sign “(single foot) in front of it. However, this method does not work if the value is clearly significant, for example, the value is replaced with a value that is less than zero.

Two single legs are sequentially pressed together until the input row is aligned until the input row is replaced by the result of calculating the input row.

Butt:

(%i3) sqrt(aa)+bb;

(% i4) "(sqrt(aa)+bb);

2.5.1 Assignment of commands and calculation of results

After entering a skin command, a serial number is given. In the above example, the commands entered are numbers 1–5 and are designated separately (%i1), (%i2) etc.

The calculation result also has a serial number, for example etc., where i- Short version in English. input (introduction), and O- English output (visnovok). This mechanism allows for repeated recording of previous commands in the next calculations, for example (%i1)+(%i2) significant addition to the first command - the next one and the next calculation of the result. You can also use results numbers to calculate, for example . For the remaining command, Maxima has a special meaning - .

Butt:

Calculate the values ​​of the walking function :

(%i1)diff(x^2*exp(-x),x);

(%i2) f(x):=""%;

The sliding foot in front of the symbol of the forward operation allows you to replace this symbol with the values, then. in a text row, we will take away the differentiation from the result.

Another butt (with an obvious change):

2.6 Numbers, operators and constants

2.6.1 Introduction of digital information

Rules for entering numbers Maxima the same as for many other similar programs. Whole and fractional parts of tens fractions are marked with a dot symbol. The leading numbers are preceded by a minus sign. The numerator and the signifier of primary fractions are separated by the symbol / (forward slash). Please note that if as a result of this operation a certain symbolic expression appears, and it is necessary to remove the specific numerical values ​​from the form of a tenth fraction, then it is necessary to allow the stagnation of the ensign. Zokrema allows you to go from fractions to tens. Converting to a form with a floating point has the same function.

(%i2) 3/7+5/3, float;

(%i3) 3/7+5/3, numer;

(%i4) float(5/7);

2.6.2 Arithmetic operations

Designation of arithmetic operations on Maxima There is nothing different from the classic expression: +, -, *, /. The number of steps can be indicated in a number of ways: ^, ^^, **. The degree of the root step n is written as a step. The operation of finding a factorial is indicated by a sign, for example 5!. To increase the priority of the operation, such as mathematics, round arms are used: (). A list of basic arithmetic and logical operators is given in table. 2.1 and table 2.2 lower.

Table 2.2. Logical operators
< operator pay less
> operator
<= operator equalization less than one
>= operator equalization more than one
# operator
= operator one
and logical operator
or logical operator abo
not logical operator not

When a skin command is entered, a serial number is given to the result, as indicated above.

The value style, which is vicorized, allows, when writing commands further, to send the results earlier, for example, in this manner (% o 1)*(% o 2) – the results need to be multiplied.

For the remaining type Maxima є special purpose%. And for the remaining command _ (chair symbol).

butt: Calculate the values ​​of the functionat points x= a, and count it out.

The command (%i1) was issued by Wikonan (the result of %o1 appeared) and was assigned to the function. Therefore, the next two teams (%i2) and (%i3) called (albeit in different ways) this function in order to reveal the meaning of the given points. 3 (%i4) it is clear that an extension of the result (%o2) can be written without bows ().

Basic mathematical operations V Maxima is designated by the primary rank: +,-, *, /. The steps at the levels of proficiency are transferred to write in three different ways ^, ^^, **. The assigned sign is a double mark« : ", command for Maxima "a:2;" next read like this: “changeable A assign the number 2." For example, the commands around the specks with whom " ; It is acceptable to put the dollar sign $. For the obviousness of the point at which the result is displayed on the screen, for the obviousness of the dollar, the result is not displayed on the screen, so set commands for displaying graphs that end in a dollar, but rather display the graph on the screen.

3.1. Zminni Maxim

Zminni inMaximacan save symbols, analytical expressions, valued functions, logical values ​​“true”, “false”, lists, equals, rows of text placed in folding tabs, which have Cyrillic characters, and especially numbers : goals, rational fractions , speech fixed precision and speech floating point uncircumscribed precision type %pi.

From the butt you can see whatMaxima is a complete mathematician, for her it’s important X And now - no one cares about the unreasonable object “Petya”. Maxima

In whose case Maxima divided ("Petya" 2-4) / ("Petya" -2) and subtracted "Petya" +2. Then from “Petya” +2 Maxima took “Petya” and as a result took away the whole number 2.

3.2. Can you count the benefits?

From the front butt it vibrates, which in operations with numbersMaxima “vouches” only for 16 significant figures and “nothing is different from a computer”, it also has a lot of calculation problems (div. %o3) with rounding when calculating.

On the right in the one at the pointed butts Maxima The current calculation is not in whole numbers, but in approximations. The expansion is carried out over the tenth system and the way of formally replacing the division with the introduction of a multiplier of 10 –5. The floor actually vibrates in a dual system. Approaching numbers indicate a standard dowzhin, which floats to whom. The results are rounded so that 16 digits are removed.

Whose butt has appeared unconvinced″ additive ″ is insignificant and becomes greater than 0.3*10 –21.

The front butt has a much larger value. Ale, as in the previous episode, is also a legacy of the computer’s technical capabilities in performing arithmetic operations with a floating coma

For a real rahunok When performing arithmetic calculations, the results are inaccurate: the percentages %o3 and %o4 vary from zero.

3.3. Records of Rivnyans

The command to take revenge as a sign of jealousy is written down,Maxima considers them as equals, from the left and right parts of which you can select one and the same value, and you can multiply both equal parts by the same value, with multiple two equals directly multiplying their lefts and the right parts.

3.4. The form of the viruses is unknown

Virazi at Maxima There can be two forms: I'm dyingі unimportant. Todi, if you need more to imagine, and what not to count ( undefined form ), preceded by put up a sign (Single foot). For example, we were encouraged to represent those treasures that we were treated to first at the age of XMaxima Then we copy the text of the assignment, add a foot, and select the interpreter. Cannot be rejected

Bachimo's news that the first butt is at the window XMaxima dedication to the calculation of the integral presented here.

However, the method does not require meanings, since the expression has obvious meanings, for example, the expression sin(π ) Maxima looks like a zero for the obviousness of the apostrophe. It's clear cos(2 π ) for Maxima definitely ancient units.

On the other side, in order to primus musk and calculate it, in order to transfer it into the form that is present, then place a single foot twice (stall the operator of the active form - ′′ ).

3.5. Viklik dovidki

It is important to understand the variety of possible options for writing commands using the vikoristan method. Maxima for the decomposition and transformation of viruses. In folding cases, you can remove the English version.

For Vikliku dovidki should I write a trace?topicand click on the interpreterShift+Enter, de topic– this is the keyword (topic) of development.

Team? topic calls the search to all those proofs to replace the keywordtopic.

They wanted to ask about the factorial sign, but they didn’t put a clearing after the food sign (they had mercy). Maxima she confirmed that the dream is not exactly the same as in the drink, ( exact match) those.

I pleased you to try (Try) suddenly (??) Ask for a not entirely accurate version. About those whose testimony was unsatisfactory, Maxima told the view falsein the row of species (%o1).

We also had mercy on the new feeder (they didn’t put a clearing again), but wanted to ask about the function cos( x), It turned out to be unreasonable for the program and therefore the burning waters were not removed.

In the case of a factorial (!), when asked again, Maxima gave the following confirmation (how we whiled away our time)

Maxima first created a numbered list of testimonials (in this category there are two numbers 0 and 1), then asked to enter separated by a space ( space - separated ) section numbers or enter all ( all) or none (none ) from them. After clarification ( A), yake won realized how ( all ), Maxima prepared the argument with the “factorial” theme.

3.6. Introduction of digital information

Rules for entering numbers Maxima exactly the same as for many other similar programs. Whole and fractional fractions of tens fractions are divided by the symbol speck. Negative numbers are preceded by a sign minus. The numerator and signifier of primary fractions are marked with the symbol / ( forward slash).

Please note that if the result of a symbolic operation is a symbolic expression, and it is necessary to remove specific numerical values ​​from the form of a tenth fraction, then it is necessary to allow the option to be set. number. Zokrema, option number allows you to change from prime fractions to tens fractions:

Maxima here she was doing the washing up right before us. Vaughn added the fractions 3/7 and 5/3 exactly according to the rules of arithmetic: she found out and brought the fractions to the next standard and added the numbers. The result was 44/21. Moreover, after we asked her to remove the numerical answer, she showed the closest, with an accuracy of 16 decimal places, the numerical answer 2.095238095238095.

3.7. Rank at the steps and seniority of operations

How was it meant more, the designation of arithmetic operations on Maxima The mathematical signs themselves are not distinguished from the classical phenomenon: + – * /. The number of steps can be designated in three ways: ^, ^^, **.

The square root is vibrated by the sqrt() function, the root stage n write down as step ^^(1/ n).

Maxima assigned to the standard operation – finding the factorial of a number (for example, 6! = 1· 2 · 3 · 4 · 5 · 6 = 120) and the value of the secondary factorial (for example, 6!! = 2· 4 · 6 = 48; 7! = 1 · 3 · 5 ·7= 105).

To increase the priority of the operation under the hour of recording commands for Maxima, use round () arms.

As is obvious from calculating the results (%о13)–(%io5), Maxima correctly understands the seniority of the operations: firstly the next step and then the operation below. By finishing the command (%i13), it took the root of the third step, the result (%15) and the previous addition (%13) and (%14).

3.8. Constanti

Maxima For ease of calculation, there are a low number of constants, the broadest of which are shown in the following table (Table 1):

Table 1

Name the constants and their meanings in Maxima

Name

Appointment

π (Pythagorean number)

e(Eulerian number)

One is visible ()

+∞ (plus inconsistency)

– ∞ (minus inconsistency)

minf

Truth

true

Nonsense

false

Complex inconsistency

infinity

left hand (shodo inter)

minus

right-handed (shodo inter)

plus

Golden retina ()

%phi

3.9. Changes and expressions

To preserve the results of intermediate developments, use vicoristic changes. Please note that when entering names of variables, functions and constants, the register letter is important. Yes, dear xіX - These are two different changes.

The assigned value of the change is indicated by the corresponding symbol : (double), for example x: 5.

If it is necessary to delete the change values ​​(clear them), the method will freeze kill : kill(x ) – displays the values ​​of variable x, and the kill(all) command – displays the values ​​of all selected variables. And, in addition, the kill method begins a new numbering for the commands that are ending (return to the name that I will respond to the command (%i3), hovered below, there was a reply with number zero (%o0) done, And the numbering of commands started again from one).

We can also guess what is in one row (div.% i 1), you can write a number of commands, separating the remaining symbols ; (dot with a dot) or a $ sign (dollar), since we do not need to display the result on the monitor.

Mathematical operations in Maxima are used to record expressions. Everything in Maxima is expressed, including mathematical expressions, as well as objects and program blocks. The simplest way to express it is an atom or an operator with arguments.

atom - a symbol (name), a row at the lower legs, or a number (whole or with a floating point).All non-atomic expressions are served at your fingertips oper(a1 ,.., aN), de oper - Operator name, a1,..., aN - yogo argumenti. Viruses can appear in different ways, but the internal manifestations are always the same. The arguments can be made by atoms or by non-atoms.

Team op operator turns, args turns the arguments, atom This means that it is an atom.

For example:

Function symbolp turns "true" as its argument is a symbol.

The two-argument function freeof(,) turns “true” because the other argument is valid (does not interfere with) the first argument.

The function zeroequiv(,) checks what its argument is -function of one argument - zero. Zeroequiv reverses "true" as its argument to zero and "false" to another form.

The function zeroequiv can be null in these situations, if as a result of the series of transformations there is no difference in the fact that the function and the same output are removed.

3.10. Mathematical functions

Maxima has a large set of built-in mathematical functions. The most frequently used points are in the table. 2.

Table 2

Introduced mathematical functions Maxima

Functions

Appointment

Trigonometric

sin (sine),

cos (cosine),

tan (tangent),

cot (cotangent)

Zvorotny

trigonometric

asin (arcsine),

acos (arc cosine),

atan (arctangent),

acot (arc cotangent)

Secons, coscons

sec (x) = 1/cos (x), (secons),

csc (x) = 1/sin (x), (cosec)

Natural logarithm

log()

square root

sqrt()

module

abs()

surplus from division

mod(,)

Minimal from the list

min(x1, ..., xN)

Maximum in the list

max(x1, ... ,xN)

Sign to the argument

Pos (x>0),

Zero (x=0),

sign(x); =neg(x<0),

Pnz – (not specified)

Vipadkov number

random(N ) – whole, from between

as N-tsile

random(float(P )) – number with a floating point

It is important to note that the actions that are called functions differ from the names that are used in modern literature. Maxima is victorious for the substitution tg – tan, substitution ctg – cot, substitution arcsin – asin, substitution arccos – acos, substitution arctg – atan, substitution arcctg – acot, substitution ln – log, substitution cosec – csc.

Apply the following functions:

3.11. Rule for writing functions

To write a function, you need to enter its name, and then write the values ​​of the arguments in the round arms. Since the value of the argument is a list, it is located at the square arm, and the elements of the list are also divided into coms.

3.12. Functions of a koristuvach

The user can install power functions. For which the name of the function is indicated, the names of the arguments are indicated in the arms, after the signs := (double and double) The following is a description of the function, which may not be mathematical. After the specified function of the user, the user responds exactly as the function was activated Maxima.

It is necessary to remember so as not to misuse the names reserved for the implemented functions.Maxima(Recorded in Table 2).

3.13. Translation of folding lines into a linear form of writing

One of the most difficult things to borrow for the beginning of the koristuvach system Maxima є recording folding expressions to place steps, fractions and other structures, linear form(in the text form I’ll write it down, for help ASCII characters, in one row).

To make this process easier, please do not give any recommendations:

1. Don’t forget to put the multiplication sign! At the graphic window Maxima according to the rules of mathematics there is a subordinate meaning X writes with view 2 x, but when recording, the command for Maxima may look like 2*x.

2. A multiplication sign should not be written between the names of the functions and the bow with the argument; sin*(x ) – here is the sign of multiplying zaive.

3. If you have any doubts, it’s better to overdo it and put “zaks” or additional ones. temples(). The numeral and the sign must first be placed at the bow. When recording the step into the base step, that step is better to be taken into the arms first.

4. The function does not include its arguments (such as those). Therefore, for example, when a function has been reduced to the stage of a certain argument, then take the entire function with arguments from the handle, and then reduce the removed construction to the required stage: ( sin(x ))**2. Very often, cob-cobs try to put only the name of the function into the stage, forgetting about the arguments: sin**2(x ) - this is not correct!

5. It is also necessary to remember that a number of function arguments are written in the handles, through whom, for example min(x 1, x 2, x 3, x N ).

6. Invalid function entry sin (2* x ) in appearance sin *2* x or sin 2 x . Remember how it isMaximawhen recording bows: just as you are about to write a bow, immediately write to a friend - her boyfriend - the bow that is closing. Therefore, when writing a function, write the name of the function, then put empty arms after it and only then write all the arguments in these arms, separating them. There is no design between the name of the function and the bow that opens, but it is not to blame!

7. Whenever you write a folded word, break it down into a bunch of simple words, add them together, and then combine them with the ones you looked at earlier.

Apply simple commands for Maxima :

Mathematical notation

Team for Maxima

(x+2)/(y–7)

(x+3)**(2*y)

sin((x–2)/(a+3))

((x–2)/(a+3)+2)/(4–(y–7)/(b+4))+12*x

Right: N it is necessary to enter the step:

Vkazivki before Vikonanny: Let's divide this expression into three sections: we will take into account the number, the expression that stands in the arms of the banner, and the step. We introduce the skin called storage part, and we understand them in the virus.

When entering commands, the row with the command entry for Maxima you can see and delete from the graphic screen (from the keyboard), and instead write and write a wiki (from the keyboard).Shift+ Enter) the correct command, make sure that your line number changes.

If you click a bear on an unfilled trikutnik, the trikutnik will be filled, and the row with the result of the clicks will appear as a record (1 lines hidden). To remove both the input and the command from the screen (the block of left-handed values ​​using the square arm), follow the mouse clicks to see the square arm of the input-response pair, click the right mouse button click on the context menu and select options yu Delete Selection. So, in the front butts there is no row with the command (%i4) and with the line (%o4) - the stench has been removed.

Dear, I will also write down the command for Maxima (%) ). Ale Maxima correctly understood us and without many “twisted arms” and calculated mathematically that the expression should be introduced, correctly, as far as we understand in mathematics seniority of operations: first the arguments are calculated (the fragments are in the arms) and functions, then the reduced step is completed, then the operations of subdivision and multiplication and then the addition and addition.

by 0):
a) y: 2/ x; x: 0; b) u: 0; v :2/u; c) z: 0; t: 2/ Z; and why?

3. What is the operator in the expressions a) x^y; b) - t; c) x + y;

4. What does Maxima say, when you enter the command: u – v; op(%);?

5. Why are the equal expressions: a) 4 * - 2; b) 4*+2; c) 4** - 2;?

6. What are the arguments of the virus? fas(p, q): = p - q?

7. What is the atom of abc?

8. Why in the Maxima foot butts did they numerically expand tg(π /2) Have you ever thought about doing numerical calculations for ctg(0)?

9. How to give Maxima a confirmation, because the command for her will be like this:

10. More eπ or π e?

11. By how many hundreds of hundredths does the greater number of equal numbers exceed the lesser?

12. What does Maxima say, because the command for her will be like this:

Maxim has implemented the ability to assign mathematical functions. Let me begin by talking about the awakened functions. As a rule, these functions are written in a similar way to mathematics.

Only mathematics is American, not foreign. That’s why it’s important for us to replace tg trace with tan. This is a list of these functions that I could find out on my own:

Function in Maxima

Function of mathematics

Hyperbolic sinus.

Hyperbolic cosine.

Hyperbolic tangent.

Natural logarithm.

Arctangent

arcsine

acos(x) Arc cosine

Did you know that if you take the arc sine/arc cosine of a number greater than 1, you get complex values?

Chantly, there are much more new functions. If you still need it, try accessing the helper from wxMaxima/Maxima. There's a lot of good stuff there for the amateur numeric doer.

Figure 8: Implemented Maxima functions.

If you enter a function that is not visible to the program, it will show you the same row as you entered. Please be respectful! If you have the numeric ensign installed in the default position, then it will behave the same way with the given function. So if you still intend to cancel your response, then switch the ensign, or pass the speech parameter to the function.

Now about those how to set power functions. Like mathematics, the function can be expressed in terms of expression. To install the function, you must quickly follow the next operator:

Once selected, you can use it in the same way as the function: f(3)

The function can also contain a number of parameters that are set and transmitted through the system. The butt can be seen on the next screenshot.

Malyunok 9: Power functions wxMaxima

As you say, there’s nothing foldable. Vikorist functions to simplify the layout. If you consistently honor your data and vikory function, then you will have a beautiful sign.

Cyclical collection of data.

This, perhaps, is the most difficult part of kerivnitsa, because there are little-understood and unprogrammed cycles. If you enter the commands carefully and don’t worry, everything will be fine.

Let's say you have list A, which you followed the rules outlined in the section about introduction. It is possible that the amplitude values ​​of the struma are found in this area. Then, to remove the active values, you need to divide them by 2.

for I in A do ldisp(I/sqrt(2))

In order. Here for is a keyword that means loop. I have an hourly change, which corresponds to one of the elements in the list. A tse masiv, which was already introduced earlier. The key word is do to speak maxim, what is required is work, passing through the massif. The array is passed through, so that the action after do is completed as many times as there are elements in the array, and the change I is taken at each iteration (iteration - one iteration I cycle) values ​​a, a, …, a [n]. Next comes the clever ldisp function, which allows us to figure out what the heck was wrong there. And the parameter of this function is the expression. If you don’t understand anything, then don’t go into such descriptions. Just try issuing this command and changing its parameters yourself.

Note: The names of changeable and other objects are in the maximum registry. This means that there are two different changes.

Figure 10: Cyclic processing command.

This method is suitable for you if you want to marvel at the different meanings and then write them down somewhere in your notebook. And if you need to do some kind of work on them, then, obviously, they need to be paid to a handyman for this purpose. For example, you can enter data into a list similar to the weekend one. To begin with, you need to create an empty list, so that you can then add data to the new one cyclically. This can be reached with the command:

Now you can remember:

for i in a do b:append(b, )

This cycle is similar to the one in the front, but in the new one it was necessary to introduce steps

change, adequate to the task. Now each iteration of the cycle in the new one is reassigned to list b. This creates a list that combines the append function from the previous list and another list, which contains at least one value of the new unlocked element. The result is a complete list b, which you can operate on if you have sent it yourself. To marvel at what's there, just enter the command

Check out your list.

Baby 11: Growth from saving results.

What has already been said is enough, just give it to the original laboratory robot. Especially if you read everything. The sequence of your actions will be something like this:

1. Enter a list of output experimental values.

2. Set the functions to expand the value.

3. Command data cyclical appearance of lists.

4. Enter your data in your lab.

5. Close your laptop and go drink beer on the parapet, otherwise Kudis yet.

A Now I’ll tell you about some additional tricks that can help you during the preparation time before submitting your work.

© 2024 androidas.ru - All about Android