Manual (English)

15 downloads 15125 Views 14MB Size Report
Page 1. MANUAL. WIRIS 2.2 www.wiris.com. ©2007 maths for more sl. All rights reserved. Page 2. Table of Contents. 1 minute ...
MANUAL WIRIS 2.2

www.wiris.com ©2007 maths for more sl. All rights reserved.

Table of Contents 1 minute ...............................................................................................................................................4 Mathematical Objects .........................................................................................................................7 Numbers............................................................................................................................................................................................. 7 Variables.............................................................................................................................................................................................8 Assigning and defining of values to variables ................................................................................................................................ 8 Other objects..................................................................................................................................................................................... 9

WIRIS ++ ............................................................................................................................................ 14 Programming language.................................................................................................................................................................. 14 Data structures................................................................................................................................................................................15

Arithmetic .......................................................................................................................................... 20 Symbols............................................................................................................................................................................................20 Parentheses..................................................................................................................................................................................... 21 Divisibility.........................................................................................................................................................................................22

Linear algebra ................................................................................................................................... 25 Operations........................................................................................................................................................................................25 Functions......................................................................................................................................................................................... 27

Equations and systems of equations ............................................................................................ 30 Solving equations and systems of equations............................................................................................................................. 30 Equation .........................................................................................................................................................................................30 System of Equations ..................................................................................................................................................................... 31 Linear systems in matrix form...................................................................................................................................................... 31 Numerical methods.........................................................................................................................................................................32 Using solutions............................................................................................................................................................................... 32 Ordinary differential equations..................................................................................................................................................... 33 Solving equations and systems of inequalities.......................................................................................................................... 33

Analysis ............................................................................................................................................. 35 Differentiation.................................................................................................................................................................................. 35 Integration........................................................................................................................................................................................ 36 Integral calculus .............................................................................................................................................................................36 Definite integral ..............................................................................................................................................................................37 Calculus of limits............................................................................................................................................................................ 38 Limit ............................................................................................................................................................................................... 38 Horizontal limit ............................................................................................................................................................................... 39 Taylor Series....................................................................................................................................................................................39 Series................................................................................................................................................................................................40 Differential equations..................................................................................................................................................................... 41

Functions ...........................................................................................................................................43 Defining functions...........................................................................................................................................................................43 Real functions................................................................................................................................................................................. 45

Progressions ..................................................................................................................................... 49 Functions......................................................................................................................................................................................... 49

Geometry ........................................................................................................................................... 51 Geometric objects...........................................................................................................................................................................51 Functions......................................................................................................................................................................................... 56 Geometric study ............................................................................................................................................................................ 56

Transformations ............................................................................................................................................................................. 63

2D Graphics ...................................................................................................................................... 66 Draw command............................................................................................................................................................................... 66 Region drawing............................................................................................................................................................................... 71 Display command........................................................................................................................................................................... 72 Commands for writing text............................................................................................................................................................ 73 Plotter............................................................................................................................................................................................... 74 Interactive geometry....................................................................................................................................................................... 77

3D Graphics ...................................................................................................................................... 79 Draw command............................................................................................................................................................................... 79 Commands for writing text............................................................................................................................................................ 84 Plotter............................................................................................................................................................................................... 85 Interactive geometry....................................................................................................................................................................... 87

Statistics ............................................................................................................................................ 88 Functions......................................................................................................................................................................................... 89 Two variable functions...................................................................................................................................................................91

Combinatorics ...................................................................................................................................94 Functions......................................................................................................................................................................................... 94

Units of measurement ..................................................................................................................... 98 Notation ..........................................................................................................................................................................................99 Arithmetic ....................................................................................................................................................................................... 99 Functions ....................................................................................................................................................................................... 99 Tables............................................................................................................................................................................................. 100 Basic units of the SI ....................................................................................................................................................................100 Units derived from SI .................................................................................................................................................................. 101 Units from other systems ............................................................................................................................................................ 102 Prefixes for the SI System of Units ............................................................................................................................................ 102

Menus, icons,... ...............................................................................................................................104 Toolbar tabs...................................................................................................................................................................................104 Plotter............................................................................................................................................................................................. 114

Toolbar

..........................................................................................................................................117

Who can configure the toolbar?................................................................................................................................................. 117 Why configure the toolbar?.........................................................................................................................................................117 How do you configure the toolbar?........................................................................................................................................... 117 Example..........................................................................................................................................................................................117

Primary

..........................................................................................................................................119

What is it?......................................................................................................................................................................................119 Where is it?................................................................................................................................................................................... 119 1 minute......................................................................................................................................................................................... 119

Desktop........................................................................................................................................................... 122

User interface ..................................................................................................................................122 Menus............................................................................................................................................................................................. 122 User interface................................................................................................................................................................................ 122

Appendix...........................................................................................................................................................................126 Index..................................................................................................................................................................................567

wiris, help materials

1 minute In a work session with the WIRIS calculator various calculations grouped in blocks can be carried out. The calculation process steps are as follow: 1. An expression for calculation is built using the keyboard or using the icons associated with the various commands. 2. In each block as many expressions as desired can be entered. To add a new expression, following the expression where the cursor is located, use the key Enter (Carriage return). 3. Evaluate an expression or block of expressions by clicking on the icon or the key Ctrl + Enter(Ctrl + (Carriage return).). 4. The result is shown to the right of the original expression and separated by the arrow To create more elaborate calculations, bear in mind the following points regarding page layout in WIRIS • A block can be added to the session with the icon • Whenever we evaluate (click on the icon

on the Edit menu.

or Ctrl + Enter), all expressions in the active block are calculated. The

results are shown and a new empty block, which becomes the active block, is created below. The cursor appears in the active block. • The variables and calculations in one block are independent of the variables and calculations in all the other blocks. • To start a new work session, use the icon . • To save the current sesson, click on the icon

and save the HTML page generated.

Return to WIRIS to try it out or see the following examples:

-4-

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

1 minute

NOTE 1

Lower case and upper case letters are understood as different characters. Tan is not the same as tan.

-5-

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials NOTE 2

Parentheses only group, (1,2,3) is the same as 1,2,3.

-6-

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Mathematical Objects

Mathematical Objects Mathematical expressions are primarily based on numbers, variables, mathematical operations and functions. The first two are explained in this chapter: numbers and variables. It also addresses other objects that are more sophisticated, which can be created with WIRIS, such as polynomials and equations. Some other mathematical objects are explained in the following chapters: Geometry and Wiris ++. >>fast Numbers Variables Other objects

integers rational numbers decimals complex numbers Assigning and defining of values to variables polynomials equations and inequalities vectors and matrices mathematical expressions

irrationals

lists

Numbers The types of numbers we can construct are:

integers: an integer is created entering its digits in base 10. If we want a negative number we place the symbol - in 64 front. Integers can have as many digits as the user wishes. To get an idea, calculate 2 or 100!. More information on Integer.

rational numbers: Rational numbers are created as a fraction from two integers, with the icon or with the symbol /. There are two functions associated with rational numbers numerator and denominator. If q is a rational number, then numerator(q) and denominator(q) give us, respectively, the numerator and the denominator of the irreducible fraction equivalent to q. More information on Rational.

irrationals: Irrational numbers that can be manipulated by WIRIS are: #, e, radicals such as the square root of 2, and combinations of radicals. By combination we mean their addition, subtraction, multiplication or division. More information on Irrational.

-7-

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

decimals: a decimal number is created separating the whole number part and the decimal with a point. More information on Float.

complex numbers: a complex number can be created by performing mathematical operations with the imaginary number

i (which can be created using the icon or with the identifier i_) and with the real numbers. It is also possible to use the polar function to create them. Some functions related to complex numbers are real_part, imaginary_part, argument, norm or conjugate. More information on Complex.

Variables In mathematics, and in the WIRIS interface, variables are names, with or without a value. A name is a string of alphanumeric characters which begins with a letter, such as x, y, x1, x2, HAL or alpha. On the other hand 2x or 3ab are not names, because they begin with a digit. WIRIS differentiates between lower and upper case letters. Thus x and X are different variables, as are f1 and F1.

Assigning and defining of values to variables To give a variable a value use the operators = and :=. • If = is used, the variable takes the value of the expression to the right of the equals at that moment. • On the other hand, if :=is used, the variable takes the instantaneous value of the expression to the right of the Therefore, if the value to the right of the expression changes, the value of the variable will also change. If the := sign is used, it can be said that the value of the variable has been defined, and if the said that a value is assigned to the variable.

= sign is used, it can be

If a value has been assigned or defined for a variable and the user wishes to clear the variable, the can be used. -8-

:=.

clear command

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Mathematical Objects

Other objects

polynomials: A polynomial is created using certain mathematical operations (addition, subtraction and multiplication) between numbers and variables. To evaluate a polynomial for a given value use the function evaluate. Two more important commands are: roots and factor which, as their names suggest, allow the user to find roots of a polynomial and to factor one, respectively. More information on Polynomial.

equations and inequalities: The symbols required to define and work with equations and inequalities are set out in the following table. WIRIS has icons that are used to write these expressions (this produces the best typographical quality), but they can also be entered using the keyboard or with a keystroke combination. type equation

NOTE 1

Symbol

Icon

Keyboard

=

equation

==

Ctrl

+=

Not equal to

!=

Ctrl

+!

inequality

> >=

Ctrl

+ Shift + >

< y or x:=>y. The variable or template is called x depending on whether it is a variable or not, respectively. The image is called y and a pair is of the form x=>y or x:=>y. A substitution is a rule defined for variables exclusively. If the user chooses =>, it uses

- 17 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials the value of y to define the rule. On the other hand, if the user chooses of defining the rule. The symbols => and :=> can be created with the icons

and

:=>, it considers y as a variable for purposes

, respectively.

When applying a rule to an expression, all occurrences of each template (or variable) in the expression are replaced by the image of its template (or variable). The terms that do not match the template (or variable) do not change. More information on command Rule or Substitution.

divisors: From the syntactic point of view, a divisor is a vector of objects of type x->y. It can be said that x is an index, y is its associated value and x->y is a pair within the divisor. To retrieve the value associated with an index, apply the object to the divisor. If there is no index associated, the result is 0. The symbol -> can be created using the icon

.

Divisors are particularly relevant in several contexts. For example, the structure returned by the function factor is a Divisor, which has as indices the prime divisors of the factored object (such as a whole number or a polynomial for example) and its values are the exponents of the these prime divisors. Another important quality of divisors is that they can be added, and that the sum is defined such that the values of each index remain summed. For example, when a product is factored this returns the sum of the divisors obtained by factoring the factors. More information on Divisor.

- 18 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

WIRIS ++

relations: From the syntactic point of view, a relation is a list of objects of type x->y. It can be said that x is an index, y is its associated value and x->y is a pair within the relation. The most important aspect of relations is that they permit the user to retrieve the value (or sequence of values) associated with an index. This is achieved by applying the object to the relation. If an object does not have an index associated with a relation, the result of applying it to the relation is null. The symbol -> can be created using the icon

.

More information on Relation.

- 19 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Arithmetic All arithmetic operations are expressed in WIRIS using the common symbols. The symbols can be applied to the different types of mathematical objects with which WIRIS operates: from whole numbers to matrices. >>fast Symbols Parentheses Divisibility

addition fraction

subtraction exponentiation

multiplication factorial

quotient and remainder factor prime?

quotient remainder greatest common divisor least common multiple

Symbols Mathematical operations in WIRIS are represented by a symbol associated with a key on the keyboard. The one exception is integer division, which is carried out with a command or icon. Some entries, such as fractions, can be represented in mathematical notation using the appropriate icons. For example, the

icon allows an expression to be raised to a certain power, represented on screen as a superscript.

Finally, to facilitate entry of complex formulae, some icons are associated with keystroke combinations so they can be entered without using the mouse. In line with the previous example, it is also possible to enter an exponent by using the following keystroke combination: Ctrl + Up arrow . The table below shows the arithmetic operations, their corresponding symbols and, where applicable, corresponding icons and keystroke combinations. It also gives and example of each operation. Operation

Symbol

Icon

Keyboard

+ addition:

subtraction:

* or · multiplication:

/

Ctrl

+/

fraction: Ctrl + Up arrow or Ctrl + Shift + ^

^ exponentiation:

! factorial: The symbol * always appears as in accordance with typographical convention.

- 20 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Arithmetic

Parentheses The parentheses, which can be created with the (and) keys or the icon, are used in line with common mathematical conventions. They allow grouping of terms and the carrying out of operations on them. Where there are no parentheses, calculation progresses in accordance with the standard hierarchy of operations: multiplication, division, addition and subtraction, respectively. To assure operations are carried out correctly, we recommend the use of parentheses where there is any doubt about the order of operations. If parenthesis are created with the icon, then the size of the parentheses will vary depending on the contents. The keystroke combinations Ctrl + ( and Ctrl + ) also create variable size parentheses. If the parentheses are entered by simply keying in (and), parentheses will not be of variable size. Note, however, that the functionality of both types of parentheses is exactly the same. The examples below were created using variable size parentheses. 3

Example: ((2-3/5)·5) ; first, the following is calculated: 2-3/5; then, the result is multiplied by the power of 3.

5 and this result is raised to

The two expressions 2/4+3*2 and (2/4)+(3*2) are equivalent. This demonstrates how the WIRIS icons can be used to build mathematical expressions, while avoiding ambiguities and without the need to use parentheses.

We also use parentheses to denote function arguments, although sometimes we can leave the parentheses out. Where functions have several arguments, these are separated by commas.

- 21 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Divisibility Below, some of the most important mathematical operations and functions are discussed. Unless otherwise indicated, they can be applied equally to whole numbers and polynomials.

quotient and remainder: Icon

, command quotient_and_remainder or quo_rem

Calculates the quotient and remainder of the integer division of the first argument by the second.

quotient: command quo or quotient Calculates the quotient of the integer division of the first argument by the second.

- 22 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Arithmetic remainder: command rem or remainder Calculates the remainder of the integer division of the first argument by the second.

factor: command factor Factors the whole number and returns it as the product of prime numbers. It also factors polynomials with real coefficients.

greatest common divisor: command gcd or greatest_common_divisor Calculates the greatest common divisor of two or more whole numbers or polynomials.

least common multiple: command lcm or least_common_multiple Calculates the least common multiple of two or more whole numbers or polynomials.

- 23 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials prime?: command prime? Given a whole number returns polynomials.

true if it is prime number and false if it is not. This function does not work with

- 24 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Linear algebra

Linear algebra The fundamental tools of linear algebra are vectors and matrices, which are addressed in the chapter, Mathematical Objects. This chapter deals with the operations that can be carried out on vectors and matrices and other functions that take them as arguments. >>fast Operations

Functions

plus multiplication by scalars inverse length linear independence minor

subtraction scalar product exponentiation dimensions rank

times vectorial product transpose determinant

Operations Arithmetic operations with vectors and matrices (addition, subtraction and multiplication) are denoted by the usual symbols of WIRIS.

plus: command + Vector or matrix addition. Operands must be of the same type and have the same dimensions.

subtraction: command Vector or matrix addition. Operands must be of the same type and have the same dimensions.

times: command * or · Product of matrices or scalar product of vectors. The number of columns in the first operand must be the same as the number of rows in the second. In WIRIS, all vectors are row vectors, but this is not a restriction. In order to multiply a matrix by a row vector, the vector is considered as a column vector as long as this permits multiplying. The symbol * always appears as · in accordance with typographical convention.

- 25 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

multiplication by scalars: command * or · Product of a vector or matrix by a scalar. The symbol, * , always appears as · in accordance with typographical convention.

scalar product: Icon

, command * or ·

Scalar product of two vectors of the same length. The symbol * always appears as · in accordance with typographical convention.

vectorial product: Icon

, command vectorial_product

Cross product of two vectors. The cross product is defined for two vectors of length 3.

- 26 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Linear algebra

inverse: Icon

, command inverse

Inverse matrix. If the matrix can be inverted, its inverse is returned.. If the matrix cannot be inverted, an error is returned.

exponentiation: Icon

, command ^

A square matrix can be raised to a whole number power. If we raise it to a negative power and the matrix can be inverted, the inverse of the matrix is raised to the absolute value of the exponent. If the matrix cannot be inverted, an error is returned.

Functions

- 27 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials length: command length If applied to a vector, the number of components is obtained; if applied to a matrix, the number of rows is obtained.

dimensions: command dimensions WIRIS returns the sequence formed by the number of rows and the number of columns in a matrix, respectively.

transpose: Icon

, command transpose or '

WIRIS returns the transpose of the original matrix.

linear independence: command linearly_independents? Given two or more vectors of the same length, the following is obtained: false if they are not.

- 28 -

true if they are linearly independent and

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Linear algebra rank: command rank Calculates the rank of a matrix.

determinant: Icon

or

, command determinant

Given a square matrix, this calculates its determinant.

minor: command minor Given a square matrix, A and two integers i and j, this calculates the minor corresponding to the position Aij of the matrix. This minor is the determinant of the matrix obtained by eliminating, from A the row i and the column j.

- 29 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Equations and systems of equations WIRIS uses the most advanced techniques available to solve linear and non-linear equations and systems of equations. It can also use some numerical methods to approximate solutions to equations and systems. Additionally, WIRIS can solve inequalities and ordinary differential equations. >>fast Solving equations and systems of equations Equation System of Equations Linear systems in matrix form Numerical methods Using solutions Ordinary differential equations Solving equations and systems of inequalities Solving equations and systems of equations

solve is the command used to solve equations and systems of equations. The section, Mathematical Objects explains how to build equations. WIRIS first attempts to find all solutions to the equation or system of equations using exact procedures. If it is not successful in finding an exact solution, it can always attempt to find the numerical solution using the command numerical_solve. WIRIS returns the solutions found in list format. If it cannot find a solution by exact means or by numerical procedures, WIRIS returns an empty list.

Equation To solve an equation, enter it as the first argument in the solve command, followed by the variable to be isolated. If this variable is not specified, WIRIS assumes that the user wishes to use all the variables that appear in the equation and isolate one as a function of the others. Use the

icon to help with this.

Whether or not the variable to be isolated is specified or not, it is possible to add the argument at the end in order to search for solutions among the complex numbers. In that case, the equations and systems of equations must be polynomials.

- 30 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Equations and systems of equations

System of Equations A system of equations is a list of equations. The simplest way to build a system of equations is to use vertical lists, which can be created using the icon

.

As with the solving of equations, if the variables to be isolated are not specified, WIRISconsiders all the system variables, and if necessary, it returns a parametric solution. To specify the variables to be isolated, enter these as the second argument of the solve command within a list.

Linear systems in matrix form T T Given a linear system in matrix form A·x =b , where A is the matrix for the system, x is the vector of unknowns and b is the vector of independent terms, the system can be solved using the command solve(A,b). The elements of matrix A and vector b can be any mathematical expression. The results from this command vary according to the type of system: • If the system is determinate compatible, the result is a vector solution.

- 31 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials • If it is indeterminate compatible, WIRIS returns a list made up of a matrix and a particular solution. The matrix has the T property that its columns form the basis of a vector space of solutions of the homogeneous system A·x =0. • If the system is not compatible, WIRIS returns null.

Numerical methods WIRIS uses different numerical methods to solve equations. In each case it chooses the most appropriate and tries to find a solution starting from an initial point or interval. The command to solve equations using these methods is numerical_solve. WIRIS chooses the most appropriate method for each case, so it is not necessary for the user to understand the different methods available and the advantages of each one. Note that the act of searching for a unique solution to the equation means that the results obtained are different in nature from those obtained by the command solve.

The numerical_solve command can also be applied to a system of equations, but keep in mind that this only returns one solution to the system.

Using solutions The solution of an equation or system of equations is a list of lists. The outermost list is necessary when the equation has more than one solution. The inside list is comprised of pairs x=a where x is a variable of the equation or system and a is its value for the given solution. To work with the solutions, we can obtain the values for these solutions in a number of ways: - 32 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Equations and systems of equations • Using the properties of a list of pairs x=a.

• Via the extraction of elements from a list.

Ordinary differential equations WIRIS has a way to solve ordinary differential equations. Notice that when entering the derived function, the icon can be used.It is necessary to indicate the independent variable that the function depends on, or the dependent variable, by writing it in parentheses after the function:y'(x), y(x).

Solving equations and systems of inequalities

- 33 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials WIRIS is also capable of solving inequalities and systems of inequalities, with a single variable, using exact methods or numerical procedures to obtain an approximate solution. In a similar way to the previous cases, the solve_inequation command can be called without specifying the variable to be isolated, or the variable can be specified as a second parameter after the equation or system.

Notice that if the inequality or system does not have a solution or alternatively if it is true for all variable values WIRIS returns false or true, respectively. This particular behaviour is due to the common use of inequalities for control of flow in programming languages (and specifically in WIRIS). To learn more about this, see the section on WIRIS ++.

- 34 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Analysis

Analysis Analysis is the area of mathematics devoted to the study of functions. >>fast Differentiation Integration Integral calculus Definite integral Calculus of Limit limits Horizontal limit Taylor Series Series Differential vector fields equations

integral curves

integral curve

Differentiation To differentiate use the

icon, the differentiate command or the 'sign, corresponding to the apostrophe.

Clicking on the icon brings up the common expression for differentiation with respect to a variable, including two empty green boxes. In the upper box, enter the expression to differentiate, and in the lower box the variable with respect to which we wish to differentiate. The differentiate command takes 2 arguments; the first corresponds to the expression to be differentiated and the second to the variable with respect to which we wish to differentiate. In the case of a function of a single variable, the second argument may be omitted.

The ' sign can be used after the expression to be derived, in accordance with normal mathematical notation. Note that here there is no need to state the variable with respect to which we are differentiating, because WIRIS will identify it automatically. If this operator is applied to an expression with more than one variable, an error is returned.

- 35 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials The ' sign can also be used to differentiate functions. In fact, if f=f(t) is a function of a single variable f' is the derivative of f with respect to t). Therefore, the derivative of f at point a is f'(a) in accordance with normal analysis notation. Let's look at some examples.

Integration

Integral calculus

To obtain the antiderivative or indefinite integral of a given function, we use the Icon integrate.

or

icons or the command

Clicking on the icon brings up the common expression for the indefinite integral with respect to a variable, including two empty green boxes. In the first box, enter in the expression to be integrated, and in the second enter the variable of integration. If f is the integrand, F is the indefinite integral and x is the variable of integration, it can be said that F is a primitive (or primitive function) of f and it can be verified that the derivative of F with respect to x is f. Alternatively the integrate command can be used with two arguments, the first corresponding to the expression and the second to the variable.

If there is no doubt about the variable of integration, the indefinite integral of the function can also be obtained using the icon,

. On clicking this icon, a symbol appears with an empty green box in which to enter the function to be integrated.

If the expression to be integrated has no variables, WIRIS will integrate it with respect to a made up variable. If there is only one variable, it will be integrated with respect to it, and if there is more than one, an error will be returned. In all cases, the result is a primitive function of the argument. Alternatively, the integrate command can be used, with a single argument, instead of the works exactly as described for the icon.

- 36 -

icon; the command

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Analysis

Definite integral

To calculate the definite integral between two limits, use the or icons or the command integrate. WIRIS attempts to calculate the integral of the function and apply Barrow's rule, which only requires evaluating the integral obtained at the limits of integration and then subtracting. If it cannot find the integral, it carries out the calculation using numerical methods and returns a warning message. Upon clicking the , the standard definite integral symbol will appear with four green, empty boxes. Those which appear at the upper and lower extremes of the integral sign correspond to the upper and lower limits of integration, respectively. In the other two boxes, enter the expression to be integrated in the first and the variable of integration in the second. Alternatively the integrate command can be used with four arguments. The first corresponds to the expression, the second to the variable and the third and fourth correspond to the lower and upper limits of integration, respectively.

Where there is no doubt about the variable of integration, the definite integrals of functions can be obtained using the icon . Upon clicking the icon, the standard definite integral symbol will appear with three empty boxes. Those which appear at the upper and lower extremes of the integral sign correspond to the upper and lower limits of integration, respectively. Enter the function or expression to be integrated in the third box. If the expression to be integrated has no variables, it will be integrated with respect to a made up variable. If there is only one variable, it will be integrated with respect to it, and if there is more than one, an error will be returned.

- 37 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials Alternatively the integrate command can be used with three arguments. The first corresponds to the function or expression to be integrated and the second and third correspond to the upper and lower limits of integration, respectively.

Calculus of limits To calculate function limits, use the

,

or

icons or the command limit.

Limit

Upon clicking the icon, the standard limit symbol will appear along with three green, empty boxes. In the upper box, to the right of lim enter the expression for which the limit should be calculated. In the lower boxes, enter the variable in the first box and the limit we wish the variable to approach in the second. If the limit command is used instead of the icon, the limit of function f when x approaches a can be entered using one of the following methods:

limit(f,x->a) limit(f,x,a) Notice that the

icon allows us to create a symbol equivalent to: ->.

The value for a can be a real number, positive infinity (the

icon), minus infinity (the

icon), or unsigned infinity (the

icon).

- 38 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Analysis

Horizontal limit

The

and

icons allow us to calculate the left and right limits, respectively. The parameters to be entered in the empty

boxes are the same as for the icon

.

To calculate right and left limits, use the command limit. To calculate the limit of function f when x approaches a from the right (or from the left), either of the two following expressions can be used: limit(f,x->a,1) (from the left, limit(f,x->a,-1) ) limit(f,x,a,1) (from the left, limit(f,x,a,-1) )

Taylor Series

- 39 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials WIRIS supports calculation of the Taylor Series of a real function at a given point. To calculate the Taylor Series of a function at a given point, use the taylor_series command with three arguments. The first argument corresponds to the function, the second to the variable and the third corresponds to the value for which the Taylor Series should be calculated (remember that the Taylor Series permits us to approximate the value of any function at a given point). If you would like to view a specific number of terms of the series, which is infinite, specify this number in the fourth argument.

In order to obtain the Taylor polynomial of a given order for a particular function, use the taylor command, followed by the four arguments just described. Note, the fourth argument is necessary for this purpose.

Series WIRIS allows us to determine whether a series is convergent, as well as calculating the sum of a convergent series. Use standard mathematical notation to express the series, as shown in the following examples. The response will give the value for the sum of the series if it is convergent (or if it is divergent, but WIRIS knows how to calculate the relevant infinite value), and the series itself in other cases. To ask WIRIS about whether a series is convergent or divergent, use the convergent? command, and enter the series as the only argument.

- 40 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Analysis

Differential equations See the solve command to find the exact solutions of a differential equation.

vector fields: command vector_field Vector fields in the plane can be used to analyze first degree differential equations. We can plot such a vector field by using the vector_field command.

- 41 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials integral curves: command integral_curves It draws a sample of solutions of a differential equation, which can be plotted over its vector field.

integral curve: command integral_curve Calculates a particular solution of a differential equation.

- 42 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Functions

Functions One of the most valuable capabilities of WIRIS is that it allows us to define new functions in such a way that these functions are treated the same way as those already built into WIRIS. The arguments to these functions can be any mathematical object. In this section we will learn how functions are defined and how they are used. We will also study the various functions of real variables which are of fundamental importance in mathematics, and which WIRIS already has built in. >>fast Defining functions Real functions square root exponential sign

root logarithm maximum

trigonometry absolute value minimum

Defining functions To define functions, use the symbol :=, created using the keyboard or the icon . To the left of this symbol we enter the name of the function followed by the list of function arguments in parentheses. To the right we enter the body of the function. That is, we enter the operations that need to be carried out on the arguments. A function can have as many arguments as we like, or none. The body of the function can use other functions previously defined. To use the function with specific arguments, enter the function name followed by the arguments in parentheses, separated by commas. (This structure is referred to as a Sequence). If you attempt to use a function that has not been defined, no calculation is carried out.

The function f in the example above takes one argument. However, as we have already stated, the number of arguments can be any non-negative number. Furthermore, the same function can have different definitions depending on the number of arguments passed to it.

A function can also have more than one definition depending on the domain of its arguments. In the definition of a function, to specify the domain of one of its arguments, enter the argument followed by the character : and the name of the domain.

- 43 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials It is also possible to define a function for a specific object. The following examples illustrate all these options. Note that the command definition applied to a function, gives us the definitions of that function.

A useful command to define a function, which is evaluated one way with certain elements in its domain of application but in another way for a different subset of the domain is the command check. Write it between the function arguments and the symbol := in the form check , where is a boolean expression (that is, it is an expression that can always be evaluated as true or false) constructed from function arguments. In this way it is possible to define discontinuous functions that cannot be converted into analytical elements (they can be evaluated but limits, derivatives and integrals cannot be calculated).

The names we can give to functions are of the same form as those that can be used with variables. Functions, like any object in WIRIS are entities independent of the names given to them. For example, the function that returns the square of a number and then adds 1 can be understood as a function in its own right. Nonetheless, it is helpful to give it a name for convenience. A function, which does not have a name assigned to it, is called an anonymous function. Anonymous functions are defined using the icon , which is equivalent to --> entering their arguments between parentheses to the left of the symbol --> and the body of the function to the right of this symbol. Note that the command definition, as seen in previous examples, returns a list of anonymous functions.

If a function has been defined, and we wish to delete it, apply the command clear

- 44 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Functions Real functions Here, we will discuss some of the predefined real functions in WIRIS that correspond to basic mathematical functions.

square root: Icon

, command sqrt or square_root

Calculates the square root of the argument. Another way to calculate the square root of a number is to raise it to the 1/2. The command sqrts or square_roots command calculates all the square roots of a real number.

root: Icon

, command root

Calculates the nth root of x, where x is the first argument (the one in the main box if the icon was used) and n is the second (the one in the upper box). As in the previous case, the calculation of the nth root is equivalent to raising x to 1/n. The command roots calculates all the complex (or real) roots of a real number.

trigonometry: The trigonometric functions are as follow:

- 45 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

sin cosec

cos sec

tan cotan

These correspond respectively to the sine, cosine, tangent, cosecant, secant and cotangent. The argument for these functions is assumed to be expressed in radians. To use degrees, apply the symbol º, which is located in the tab Units. The inverse trigonometric functions included in WIRIS are:

asin

acos

atan

These correspond respectively to arcsine, arccosine and arctangent. The argument of these functions is a real number. -1

The result of all these is the main result of the function, expressed in radians (the same given by the keys sin , cos and tan

-1

-1

commonly found on a pocket calculator). If the answer is required in degrees, use the function convert.

exponential: command exp, Icon

or

Calculates the result of applying the exponential function to its single argument (that is, the number that results from raising the number e to the argument). The icon

can be used to obtain exact values (i.e. without evaluating) and the

icon can be used to obtain approximations. WIRIS also incorporates complex exponentials.

logarithm: command ln or log If the commands above are given a single argument, they calculate the natural (Naperian) and decimal logarithms, respectively. If log takes two arguments a and b, it calculates the logarithm of a in base b.

- 46 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Functions

logb(a) calculates the logarithm of a in base b. It is equivalent to log(a,b). Remember that to create a subscript use the icon

absolute value: Icon

, command absolute

Calculates the absolute value of the argument.

sign: command sign Obtains the sign of a real number. Returns 1 if the number is positive, -1 if it is negative and 0 if it is neither positive nor negative.

maximum: command maximum or max Calculates the maximum values of the functions arguments. If the argument is a maximum of its elements.

- 47 -

List or Vector, it calculates the

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials minimum: command minimum or min Calculates the minimum of the arguments entered in the function. If the argument is a the maximum of its elements.

- 48 -

List or Vector, it calculates

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Progressions

Progressions >>fast Functions

step

ratio

sum of the terms in a progression

WIRIS detects if a sequence of numbers, given its first few terms, follows a constant, arithmetic, geometric or polynomial progression. This allows the general term of a sequence to be determined or its terms to be summed using the familiar formulae. The command progression allows us to determine which type of progression a sequence of numbers follows. WIRIS classifies progressions in accordance with the order in which we have just listed them. So, if a progression is constant, it classifies it as constant, even though it is also arithmetic and geometric. Equally, an arithmetic progression, which corresponds to a first degree polynomial, is categorised as arithmetic. For every finite sequence of n numbers, there is a single polynomial of degree no higher than n-1, such that the first n terms in the corresponding polynomial sequence coincide with those of the sequence. WIRIS always forms the polynomial sequence corresponding to the polynomial of the lowest degree that meets this condition. Once the progression is defined, we can save it in a variable. If p is a variable, then the expression p(i) returns its ith term for any number i, and if n is a variable, the expression p(n) returns the formula for the general term of the progression.

Functions The functions associated with progressions are:

step: command step Given an arithmetic progression, it obtains a step (that is, the difference between two terms). If working with a constant progression, the function returns the value 0.

- 49 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials ratio: command ratio Given a geometric progression, its ratio is calculated. If working with a constant progression, the function returns the value 1.

sum of the terms in a progression: command progression_sigma Given a progression, the sum of its terms is obtained. Note that the result does not always have the appearance usually associated with a sum, due to the generality of the methods used. Nonetheless, the value of the expression obtained will logically be the same as for the conventional expression. This command has three arguments: the progression (the first) and the upper and lower summation limits (second and third, respectively). The summation limits can be whole numbers (including negative numbers) or polynomials with whole number coefficients.

If the user wishes to sum an infinite series, i.e. the sum from a coefficient n to infinity, different functionality must be used in WIRIS: limits, which are explained in the chapter Analysis. The following example demonstrates how these functionalities can be combined.

- 50 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry

Geometry WIRIS allows us to work with geometric elements in the plane and in space (Euclidean geometry in the plane and in space) and, in particular, to display them graphically. The first section is dedicated to the different types of geometric objects available. The second section focuses on the functions that permit the user to act on these objects. The graphical display of geometrical elements is discussed in the Graphics chapter (for plane geometry) and in the 3D Graphics chapter (for geometry in 3D space). >>fast Geometric objects

points circumferences

lines conic sections

segments triangles

planes polygons (or polygonals)

Functions

polyhedras Geometric study distance

midpoint

bisector

median line intersect

perpendicular bisector area parallel

translation

rotation

height angle Transformations symmetry

perimeter perpendicular

Geometric objects This section explains the geometrical figures that can be constructed.

points: command point, Icon

or

Constructs a point from coordinates a and b, for which function arguments are real numbers. Note that upon writing the expression (a,b) without the word point, we only have the sequence a and b. We have not defined a point. Some functions related to points are midpoint or colinear?.

For points in 3D space, the command point(a,b,c) constructs a point from coordinates a, b and c, just as for a point on the plane.

- 51 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

lines: command line, Icon Allows us to create a line. The different arguments it can take are: • two points on the line (we can use the icon

),

• a point and a direction vector, • an equation for the line, or • a point and a real number (the slope of the line). If r is a line, then slope(r), point(r) and vector(r) return the slope of the line, a point on the line and a direction vector of the line, respectively. To study other functions that can also be used to build a line, see parallel, perpendicular and bisector.

In the case of lines in 3D space, the following arguments are accepted: • two points on the line (we can use the icon

)

• a point and a direction vector, • two equations (of secant planes).

- 52 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry

segments: command segment, Icon Allows us to create a segment. The different arguments it can take are: • the segment endpoints (use the icon

),

• a point and a direction vector. Some functions related to segments are length or midpoint.

planes: command plane, Icon This allows us to create a plane. The different arguments it can take are: • three points (use the icon

),

• a point and a direction vector (perpendicular to the plane), • a point and two vectors, • a linear equation. Some functions related to planes are parallel, perpendicular or bisector.

circumferences: command circumference or cfr, Icon

,

or

This allows us to create a circle. The different arguments it can take are: • a point (center point of the circumference) and a real number (its radius), using the icon • three unaligned points (representing points on the circumference), using the icon

- 53 -

,

,

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

• two points (the center point and a point on the circumference, respectively) using the icon

,

• the equation of the circumference. If c is a circle, then center(c) and radius(c) return the centre and the radius of the circle, respectively. If P is a point on the circumference c, then tangent_line(c,P) the tangent line to c through point P.

conic sections: command conic, Icon This allows us to create a conic. The different arguments it can take are: • five points (pertaining to the conic), using the icon

,

• the equation of the conic. The commands ellipse, hyperbola and parabola allow us to construct conics from the fundamental elements of a conic such as the focus, the vertex and the focal distance. For a detailed description of the many components used to construct these elements, see the section Reference. Some functions related to conics are center, vertex, semiminor_axis or focal_semidistance.

focus, directrix, semimajor_axis,

triangles: command triangle, Icon This function is used to construct a triangle, using the vertices as arguments. It is also possible to use the icon command equilateral_triangle allows us, as its name suggests, to create an equilateral triangle.

- 54 -

. The

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry

polygons (or polygonals): command polygon or polygonal, Icon

or

Generates the polygon (or the polygonal), which results from joining the points that are entered as arguments. Remember that a polygon is a closed plane, while polygonals are segments that join a set of points, and in general they are open figures and not flat.

polyhedras: command polyhedra, Icon

or

Generates the regular polyhedron with n faces. functions related to the polyhedra are tetrahedron, cube, octahedron, dodecahedron, icosahedron, polyhedra_cylinder_with_lids, polyhedra_cylinder, polyhedra_cone_with_lid, polyhedra_cone, polyhedra_sphere or polyhedra_thorus. Some

- 55 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Functions As arguments, the geometrical functions accept geometrical figures, which are generally constructed using the functions described in the previous section, but they also directly accept the equation of the figure as an argument. The latter feature is used repeatedly in this section.

Geometric study

distance: command distance Calculates the distance between two points, a point and a line or a point and a circumference.

In 3D space, it is also possible to calculate the distance between two non-secant planes, between a non-secant line and plane or between a point and a plane.

midpoint: command midpoint Calculates the midpoint between two given points, on the segment formed by the two points. The command midpoint accepts two points or a segment as an argument. For the latter, it calculates the midpoint of the segment's endpoints.

- 56 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry

perpendicular bisector: command perpendicular_bisector Calculates the perpendicular bisector of a segment, i.e. the line perpendicular to the segment that passes through its midpoint. It can also be defined as the set of points which are equidistant to the endpoints of the segment. This command accepts a segment or two points as an argument, and it calculates the perpendicular bisector of the segment formed by those points. It is also possible to use a triangle and the number of the side for which the perpendicular bisector is required. More information on circumcenter or circumradius.

- 57 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

bisector: Icon

or

, command bisector

We can calculate the bisector of the following objects: • two secant lines, • three unaligned points (thus, defining an angle). • and an angle of a triangle. More information on incenter or inradius.

For the case of geometry in 3D space, it is possible to calculate the bisector of two intersecting planes.

- 58 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry height: command height Calculates the height corresponding to the ith vertex of the triangle, i.e. the line that passes through the vertex and that is perpendicular to the opposite side. This command accepts, as arguments, a triangle and the vertex number for which the user wishes to calculate the height. More information on orthocenter.

median line: command median_line This calculates the line from the triangle vertex to the midpoint of the opposite side. This command accepts as arguments a triangle and the vertex number for which the user wishes to calculate the median. More information on barycenter.

- 59 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

area: command area This calculates the area of a figure, received as an argument, on the basis that the figure is closed (triangle, polygon, circumference or ellipse). More information on oriented_area.

- 60 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry perimeter: command perimeter This calculates the perimeter of a closed figure (triangle, polygon or circumference), which is received as an argument.

angle: command angle This calculates the minor angle defined for two lines or two vectors (planes if working in 3D space). In the first case, it returns a value between 0 and #/2 and in the second case between 0 and #. If F is a Triangle, Polygon or corresponding to its ith vertex.

Polygonal then the command angle(F,i) calculates the angle

More information on oriented_angle.

For work in 3D space, the function is named angle3d and it can also be applied to planes. It is also possible to use the command geometry_status to learn how to simplify this command.

- 61 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

intersect: Icon

, command intersect

This returns a list of the elements that form the intersection of two figures, received as arguments.

parallel: Icon

or

, command parallel

This function accepts a line or segment as the first argument and a point as the second argument. Accordingly, it finds the line parallel to the first argument that passes through the point. More information on parallel?.

When working in 3D space, the function can be applied to a plane just as it is applied to a line or segment in two dimensional space.

- 62 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry

perpendicular: Icon

or

, command perpendicular

This function accepts a line or segment as the first argument and a point as the second argument. Accordingly, it finds the line perpendicular to the first argument that passes through the point. More information on perpendicular?.

When working in 3D space, the function can be applied to a plane just as when working in two dimensional space.

Transformations

- 63 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials WIRIS allows us to calculate and display the transformation of a Figure by way of plane movement. Transformations can also be applied to a list of figures and the result is the list that corresponds to applying the transformation to each of the figures in the list.

symmetry: command symmetry Axial or radial symmetry can be calculated for a given figure. In the former case, the command symmetry takes as arguments the line that acts as axis of symmetry and the figure. In the case of radial symmetry, the arguments are the centre of symmetry and the figure.

- 64 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Geometry translation: command translation Given a vector and a figure, the translation of the figure can be calculated with respect to the vector.

rotation: command rotation Given point P, real number a and figure F, this calculates the centre of rotation P and anglea of figure F. The real number is interpreted as an angle in radians. To work with degrees, use the icon

- 65 -

.

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

2D Graphics WIRIS provides procedures for graphical display in two dimensions. The main application of these procedures is to display 2D geometrical figures and functions. The graphical display is produced on a Plotter using the commands plot, if it you only wish to draw an object, or represent, if we wish the system to draw certain characteristic elements of the object, such as asymptotes and critical points in the case of functions. To add text to the drawing, use the command write. You can also use the command geometry_status to learn how to simplify this command. >>fast Draw command

Region drawing Display command Commands for writing text Plotter Interactive geometry

draw an object drawing an equation options plot region drawing represent write options plotter slider

draw a function vector drawing region options represent options write closest point

Draw command

draw an object: plot(d:Plotable2d) This function is generally used to draw d on a "drawing board". Some objects that can be drawn include: Point, Line, Circumference, Segment, Triangle, Polygonal, Function, Curve or Text_box. If the argument is a List, then all its elements are drawn.

It is worth mentioning the case where parameter d is an identifier (variable). If its value is a drawable object then it is drawn, otherwise no action is taken and a warning is returned. Later, if the value of d changes then the drawing is updated to show the new object. You could say that the drawing board remembers the elements that are drawn on it and redraws them if their value changes. The example below demonstrates this behaviour. If P is defined as point (3,5,0) and we draw it (first block), it appears drawn as point (3,5,0) on the drawing board. If then P takes as its value the point (2,-1), this is the point that appears on the drawing board. Note that this happens without having to use the command plot with point P.

- 66 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

2D Graphics

draw a function : command plot We can specify how to draw a function in many ways. In most cases it is sufficient to specify the expression of the function that we wish to draw and the system will take care of selecting the path and what variables act as x and y coordinates.

The following examples show how we can also indicate the variable and the path.

Parametric curves To draw parametric curves we will always have to indicate the variable that acts as a parameter and its path.

- 67 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Implicit curves In order to plot an implicit function, it is sufficient to provide its formula. Optionally, its variables and the ranges of its variables can be provided.

drawing an equation: plot(eq:Equation) The command plot also accepts an equation as an argument. This command graphs the mathematical object associated with this equation. The equations accepted by the command are those corresponding to objects of type Conic.

Line, Circumference and

vector drawing: plot(v:Vector,P:Point) A vector is drawn by indicating the vector itself and a point. The options indicate the style of the arrow.

options plot: Optionally, the last argument to the plot command can be a List of options.

- 68 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

2D Graphics Options give the user control over the figure appearance (colour, thickness, etc.). The functionality or quality of some options depends on the version of Java™ (JVM) installed on your computer. If you have Java™ version 1.3 (Java 2) or later, then in the second example you can see lines of different width. Download the latest version of Java.

Enter the option values separated by commas in the following format 'option_name=option_value'. Example: color=green. The main options for the plot command are

color Here, enter the colour to be used for drawing. Possible values: lists of three integers between 0 and 255 in '{r,g,b}' form, where r,g,b correspond to the amount of red, green and blue, which define the colour. For simplicity, some colours have been defined: black, white, red, green, blue, cyan, magenta, yellow, brown, orange, pink, grey, dark_grey, light_grey and the complete list of HTML colours. Default value: black

border This defines whether or not the border of closed figures is painted. Possible values: true and false. Default value: true

fill In the case of a closed figure, the command determines whether the interior is filled. Possible values: true and false. Default value: false

fill_color If working with a closed figure, and if the value defined for fill is true, this command indicates the colour to be used to paint the inside of the figures. Possible values: A Color and "automatic"; if the second option is chosen, the inside of the figure is filled using the colour given by the colour option color. Default value: "automatic"

visible This command determines whether the element is visible or not. Possible values: true and false. Default value: true

mobile If the object to plot has not been defined as static, the image is allowed to move, or not move, in the plane. Possible values: true and false. Default value: true

evaluate

- 69 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials This command defines whether the element should be evaluated when drawing or not. Possible values: true and false. Default value: false

fixed_dimensions This defines whether or not objects must be repositioned in the plane, when the drawing board dimensions are changed. By default, they are repositioned. Possible values: true and false. Default value: false

point_size This sets the size of points plotted on the drawing board. Possible values: any positive Realnumber. Default value: 5

line_width This command is used to set the thickness of lines, segments or functions drawn on the drawing board. Possible values: any positive Real number. Default value: 1

show_label This command defines whether or not a label is displayed for the figure. Possible values: true and false. Default value: false

label This defines the label that should be displayed next to the figure. Possible values: any object and "automatic". If we choose the second option, the label will be the name of the figure. Default value: "automatic"

label_font This sets the type of font that should be used to write the labels on the drawing board. Possible values: any object of type Font. Default value: {bold=false,italic=false,name="SansSerif",size=12}

name If the command plot does not know the name of the object to be drawn, enter it. This only has an effect when working with a single element and not with a list. Possible values: any object of type String. Default value: null

seed_name If the command plotdoes not know the name of the object to be drawn, the name of the figure is the value of this option concatenated with a number. Possible values: any object of type String. Default value: null

- 70 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

2D Graphics

Region drawing

region drawing: plot(e:Inequation) We can draw the region delimited by some inequalities directly with the operator to intersect several regions. See also region.

plot command, and using optionally the

region: region(...) The region command can be used to draw a wider set of regions than is available with plot. For instance, you can draw the area delimited by any set of curves, even if defined by implicit functions.

- 71 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Equalities in region are used to indicate that the desired region is the bounded one:

In order to draw the region delimitated by an explicit function, we will just do:

In order to draw the region between two explicit functions, we will write:

Display command

represent: represent(...) The purpose of this function is to draw objects and show the relevant information for each one. For example, functions are represented by plotting the graph and features of interest such as individual points, asymptotes and local maximum values. It accepts the same arguments as the function plot. It is defined for objects of type: Function, Circumference and Conic ( Hyperbola, Ellipse and Parabola) If the command is applied to an object that WIRIS does not regard as applicable or for which it does not know how to calculate any particular element, the command works in the same way as plot.

- 72 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

2D Graphics

options represent: The options for represent are the same as those for plot.

Commands for writing text

write: write(d,P:Point) This function allow us to write d at point P. Usually d will be of type String although it can be any object. In general, you can think of the command write as a quick way of drawing objects of type Text_box.

options write: Optionally, the last argument to the write command can be a List of options. Options that can be used with the command write include the command text_box commands such as plot (they can be viewed here) since write(t,d,P,O) is the same as plot(t,text_box(d,P,O),O), where t is a Drawing board, O is a List of options and d and P are as described in the previous paragraph. The main options for the text_box command are

background This indicates whether or not the background of the object being represented should be painted. Possible values: true and false. Default value: false

background_color If the value for background is true, this indicates the colour to paint the background of the object being represented. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {255,255,255} (white)

- 73 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

border This defines whether or not a border will be applied around the displayed object, and in the former case it defines the border thickness. Possible values: any non-negative Integerinteger. Default value: 0

border_color If the value for border is a positive Integer, the value defines the border colour. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {0,0,0} (black)

horizontal_position This defines the horizontal position of the Text_box from the specified reference point. Possible values: "left", "center" and "right". Default value: "right"

vertical_position This defines the vertical position of the Text_box from the specified reference point. Possible values: "top", "center", "base_line" and "bottom". Default value: "base_line"

max_width This defines the maximum width of the Text_box. When the text exceeds this width, a line break will be inserted. Possible values: any positive Real number. Default value: # (infinity).

font This defines the font to be used when writing text on the drawing board. Possible values: any object of type Font. Default value: {bold=false,italic=false,name="SansSerif",size=12}

bold_font This defines whether or not the text on the drawing board should be bold. Possible values: true and false. Default value: false

italic_font This defines whether or not the text on the drawing board should be in italics. Possible values: true and false. Default value: false

font_name This indicates the name of the font type used. Possible values: "Serif", "SansSerif" and "Monospaced". Default value: "SansSerif"

font_size This indicates the size of the font type used. Possible values: any positive Integer. Default value: 12

Plotter The commands plot, represent or write can optionally accept, as the first argument, the drawing board where the graphic should be displayed. If the first argument is not a drawing board, WIRIS provides one with predefined features. - 74 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

2D Graphics Each set of calculations has a default drawing board. In practice, you can have as many as you wish. The commands to create a drawing board are plotter() or plotter(P,x,y); the latter creates a drawing board centred on point P, of width x and height y.

By default, when a drawing board is created the coordinate axes and an orange grid are shown. If the user does not want these elements to appear, he or she should execute show_axis(false) and show_grid(false), respectively, before creating the drawing board or drawing anything. If a drawing board has a visible grid, the points can only be moved to the vertices of the grid. Once a drawing board has been generated, the axes and grid can be controlled with the icons or

, respectively.

In the example below we create a drawing board where, unlike with the default, there are neither axes nor grid:

The drawing board icons (

,

,

,

, etc. ) are described in the section Menus,icons....

options plotter: The main options for the plotter command are

center Sets the centre point of the drawing board. Possible values: any Point. Default value: point(0,0)

height Sets the height of the drawing board. Possible values: any positive Real number. Default value: 21

width Sets the width of the drawing board. Possible values: any positive Real number. Default value: 21

visible This defines whether the drawing board is visible or not. Possible values: true and false. Default value: true

background_color Sets the background colour of the drawing board. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {255,255,240}(cream)

aspect_ratio

- 75 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials This defines the height to width ratio (aspect ratio) for the drawing board. Possible values: any positive Real number. Default value: 1

information This defines the information that should be displayed when the mouse is scrolled over a figure. This information can be changed, once the drawing is on the screen, using the icons , and toolbar: More information on label or show_label. Possible values: "none", "name", "definition" and "value". Default value: "name"

on the drawing board

· Window attributes

window_height Sets the height of the drawing window, in pixels. Possible values: any positive Integer. Default value: 450

window_width Sets the width of the drawing window, in pixels. Possible values: any positive Integer. Default value: 450

window_aspect_ratio This attribute defines the ratio between the window’s height and width (aspect ratio). Possible values: any positive Real number. Default value: 1 · Coordinate axis attributes

show_axis Determines whether or not the coordinate axes appear in the drawing. Possible values: true and false. Default value: true

axis_color If the value for show_axis is true, this command indicates the colour of the axes. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {150,150,255} (light blue)

axis_style This defines how the coordinate axes will be displayed: as two perpendicular lines or as a pair of arrows, one perpendicular to the other. Additionally, in the second case, the abscissa axis can be identified by x or by X and the ordinate axis can be defined by y or by Y. Possible values: "none", "arrow", "arrow_xy" and "arrow_XY". Default value: "none"

axis_font This defines the font to be used when writing the text and values associated with the axes. Possible values: any object of type Font. Default value: {bold=false,italic=false,name="SansSerif",size=10}

axis_label This defines the coordinate axis names. The first component in the list names the abscissa axis, and the second names the ordinate axis.

- 76 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

2D Graphics Possible values: any List of two components. Default value: {,} (an Empty_list of two elements). · Grid attributes

show_grid Determines whether or not the grid appears in the drawing. If the grid is displayed, the movement of drawn points is limited to the points on the grid. If the grid is not displayed, the points can be moved freely around the drawing board. Possible values: true and false. Default value: true

grid_color Sets the grid colour. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {255,200,100} (light orange)

Interactive geometry We can draw a series of objects using geometrical relations and see how these relations are maintained by moving some of them. To do so, we need to declare what objects depend on others using the symbol :=. After calculating the following example, try moving point P.

slider: command slider We will use the slider command and declare a variable with := for choosing real numbers interactively. This command receives a path and optionally, an initial value as arguments.

- 77 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials closest point: command closest_point In interactive geometry we sometimes need to fix a point to stay over a figure. This command receives as a first argument a geometrical object and as a second argument the value of the initial point.

- 78 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

3D Graphics

3D Graphics WIRIS provides procedures for graphical display in three dimensions. The main application of these procedures is to display geometrical figures and functions. The graphical display is produced on a Plotter" using the command command write3d.

plot3d. To add text to the drawing, use the

You can also use the command geometry_status to learn how to simplify this command. >>fast Draw command

Commands for writing text Plotter Interactive geometry

draw an object drawing an equation vector drawing write3d options plotter3d

Draw a function level curves options plot3d options write3d

Draw command

draw an object: plot3d(d:Plotable3d) This function is generally used to plot an object d on a "drawing board". Some objects that can be drawn include: Point, Line, Plane3d, Segment, Triangle, Polygonal, Polyhedra3d, Surface, Curve3d and Text_box. If the argument is a List, then all its elements are drawn.

It is worth mentioning the case where parameter d is an identifier (variable). If its value is a drawable object then it is drawn, otherwise no action is taken and a warning is returned. Later, if the value of d changes then the drawing is updated to show the new object. You could say that the drawing board remembers the elements that are drawn on it and redraws them if their value changes. In the example below this behavior can be confirmed. If P is defined as point (3,5,0) and it is drawn (first block), it appears drawn as point (3,5,0) on the drawing board. If, then, P takes as value the point (2,-1,0), this is the point that appears on the drawing board. Note that this happens without having to use the command plot3d with point P.

- 79 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Draw a function : command plot3d To draw both curves and surfaces, we use the command plot3d. In most cases, it is sufficient to indicate the expression of the function that we wish to draw and the system will take care of selecting whether it is a curve or a surface, its path and what variables play the part of x, y or z. Let’s look at a few examples of surfaces.

We can also specify the variables and the path.

Parametric curves To draw parametric curves we will always have to indicate the variable that acts as a parameter and its path.

- 80 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

3D Graphics

Parametric surfaces We can draw parametric surfaces by specifying the two variables on which the surface depends and their respective paths.

drawing an equation: plot3d(eq:Equation) The command plot3d also accepts an equation as an argument. This command produces a graph of the mathematical object associated with this equation. The equations accepted by the command are those corresponding to objects of type Plane3d.

level curves: command level_curves

level_curves command allows us to create and draw the level curves of a surface. The result of level_curves can be plotted both in the plane or in 3D. The

- 81 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials vector drawing: plot(v:Vector,P:Point) A vector is drawn by indicating the vector itself and a point. The options indicate the style of the arrow.

options plot3d: Optionally, the last argument to the plot3d command can be a List of options. Options give the user control over the appearance of the figure (colour, thickness, etc.). The functionality or quality of some options depends on the version of Java™ (JVM) installed on your computer. If you have Java™ version 1.3 (Java 2) or later, then in the second example you can see lines of different width. Download the latest version of Java.

Enter the option values separated by commas in the following format 'option_name=option_value'. Example: color=color=green. The main options for the plot3d command are

color Here, enter the colour that should be used for drawing. Possible values: list of three integers between 0 and 255 in '{r,g,b}' form, where r,g,b corespond to the amount of red, green and blue, which define the colour. For simplicity, some colours have been defined: black, white, red, green, blue, cyan, magenta, yellow, brown, orange, pink, grey, dark_grey, light_grey and the complete list of HTML colours. Default value: black

border This defines whether the border of closed figures is painted. Possible values: true and false. Default value: true

fill In the case of a closed figure, the command determines whether the interior is filled. Possible values: true, false and "automatic".

- 82 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

3D Graphics Default value: "automatic"

fill_color If working with a closed figure, and if the value defined for fill is true, this command indicates the colour that should be used to paint the inside of the figures. Possible values: A Color and "automatic"; if the second option is chosen, the inside of the figure is filled using the colour given by the colour option color Default value: "automatic"

visible This command determines whether the element is visible or not. Possible values: true and false. Default value: true

transparency This command determines the element's degree of transparency. Choosing 0 sets transparency to totally opaque. Choosing 1 sets transparency to totally transparent. Possible values: any Real number between 0 and 1. Default value: 0.3

mobile If the object to draw has not been defined as static, the image can move, or not move, in space. Possible values: true and false. Default value: true

wired This option sets whether the image should be shown wire-framed or not. Possible values: true, false and "automatic". Default value: "automatic"

point_size This sets the size of points drawn on the drawing board. Possible values: any positive Real number. Default value: 5

line_width This command is used to set the thickness of lines, segments or functions drawn on the drawing board. Possible values: any positive Real number. Default value: 1

evaluate This command defines whether the element should be evaluated when drawing or not. Possible values: true and false. Default value: false

show_label This command defines whether or not a label is displayed for the figure. Possible values: true and false. Default value: false

label This defines the label that should be displayed next to the figure. Possible values: any object and "automatic". If we choose the second option, the label will be the name of the figure. Default value: "automatic"

label_font This sets the type of font that should be used to write the labels on the drawing board. Possible values: any object of type Font. - 83 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials Default value: {bold=false,italic=false,name="SansSerif",size=12}

name If the command plot3d does not know the name of the object to be drawn, enter it. This only has an effect when working with a single element and not with a list. Possible values: any object of type String. Default value: null

seed_name If the command plot3ddoes not know the name of the object to be drawn, the name of the figure is the value of this option concatenated with a number. Possible values: any object of type String. Default value: null

Commands for writing text

write3d: write3d(d,P:Point) This function allow us to write d at point P. Usually d will be of type String although it can be any object. In general, you can think of the command write3d as a quick way of drawing objects of type Text_box.

- 84 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

3D Graphics options write3d: Optionally, the last argument to the write3d command can be a List of options. Options that can be used with the command write3d include the text_box commands such as plot(They can be viewed here) since write3d(t,d,P,O) is the same as plot(t,text_box(d,P,O),O), where t is a Plotter3d, O is a List of options and d and P are as described in the previous paragraph. To learn more about the options for this command, see the relevant section in the chapter 2D Graphics.

Plotter The commands plot3d or write3d can optionally accept, as the first argument, the drawing board where the graphic should be displayed. If the first argument is not a drawing board, WIRIS provides one with predefined features. Each set of calculations has a default drawing board. In practice, you can have as many as you wish. The command used to create a drawing board is plotter3d() or plotter3d(P,x,y,z); the latter creates a drawing board centred on point P, of width x, height y and depth z.

Once a drawing board has been created its attributes can be modified using the function attributes3d. In the example below we create a drawing board where, unlike in the default case, neither the axes nor the cube are displayed:

The drawing board icons (

,

,

,

, etc.) are described in the section Menus,icons....

options plotter3d: The main options for the plotter3d command are

center Sets the centre point of the drawing board. Possible values: any Point. Default value: point(0,0,0)

height Sets the height of the drawing board. Possible values: any positive Real number. Default value: 21

width Sets the width of the drawing board. Possible values: any positive Real number. Default value: 21

- 85 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

depth Sets the depth of the drawing board. Possible values: any positive Real number. Default value: 21

background_color Sets the background colour of the drawing board. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {255,255,240} (cream)

information This defines the information that should be displayed when the mouse is scrolled over a figure. This information can be changed, once the drawing is on the screen, using the icons , toolbar. More information on label or show_label. Possible values: "none", "name", "definition" and "value". Default value: "name"

or

on the drawing board

visible This defines whether the drawing board is visible or not. Possible values: true and false Default value: true

transform_matrix This command indicates the position of the display cube within the drawing window. Every time the cube is moved, we can find the new position using the icon on the drawing board toolbar: Possible values: any Matrix of Real numbers 3x3. Default value: · Window attributes

window_height Sets the height of the drawing window, in pixels. Possible values: any positive Integer. Default value: 450

window_width Sets the width of the drawing window, in pixels. Possible values: any positive Integer. Default value: 450 · Coordinate axis attributes

show_axis Determines whether or not the coordinate axes appear in the drawing. Possible values: true and false. Default value: true

axis_color If the value for show_axis is true, this command indicates the colour of the axes. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {150,150,255} (light blue) · Cube attributes

- 86 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

3D Graphics

show_cube Determines whether or not a cube appears in the drawing. Points can be moved freely around on the drawing board. Possible values: true and false. Default value: true

cube_color Sets the colour of the cube. Possible values: any Color, in {r,g,b} format, or by name if it has been defined. Default value: {150,150,255} (light blue)

Interactive geometry Interactive geometry acts the same way in space as it would do in the plane. See Interactive geometry in the plane.

- 87 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Statistics >>fast Functions Two variable functions

mean geometric mean standard deviation median covariance correlation

harmonic mean quartile regression line

variance mode

Descriptive Statistics is the branch of statistics that concerns collecting data, analysing it and presenting the results graphically or via the calculation of statistical parameters, numbers used to describe a set of data. However, it is often not possible to obtain the value of a variable for every member in of population. In such a case data is collected from a sample, or a portion of the population, and used to infer information about the characteristics of the population as a whole. This is the situation to which the procedures described in this chapter are best suited. On other occasions observations in Descriptive Statistics relate to the values observed when carrying out a random experiment. In such a case the objective of the sample results is to try to establish a theoretical model which governs the experiment. In Statistics, WIRIS always works with decimal numbers, unlike other areas of knowledge. This is done in order to follow the norms of practice in this area. Take a look at how a sample consisting of 3 zeros and 4 ones can be represented.

In the first case a List, which contains the elements of a sample, was considered, and in the second case, a Divisor was used to indicate how may times each value appears. Now let's look at some operations we can carry out with samples.

To finish the introduction, it should be noted that it is possible to group different samples of random variables using a Divisor. A detailed explanation of this functionality can be found in the Multisample description in the alphabetical index. Before proceeding let's look at some examples to clarify what we mean:

- 88 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Statistics

Functions In this section we explain the functions that WIRIS can apply to a data set (observations from a statistical variable), x={x1,x2,...,xn}.

mean: command mean

where n=length(x).

geometric mean: command geometric_mean

where n=length(x).

- 89 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials harmonic mean: command harmonic_mean

where n=length(x).

variance: command variance Calculates the variance in accordance with the inferential definition. That is,

where n=length(x), mx=mean(x).

standard deviation: command standard_deviation

where n=length(x), mx=mean(x).

- 90 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Statistics median: command median If x1,x2,...,xn is an ordered sample, it is defined as

xk

if

n=2k-1

(xk+xk+1)/2

if

n=2k

where k is a whole number. If the sample is not ordered, it can simply be ordered and the definition above can then be applied.

quartile: command quartile Calculate the various quartiles of a sample. See the complete definition of the command quartile in the alphabetical index.

mode: command mode Calculates the most commonly occurring value in the sample. If there is more than one value occurring the maximum number of times, a list is returned with the various mode values.

Two variable functions WIRIS has various functions that accept samples with bivariate data as the argument, i.e. a sample of the following form (x1,y1),(x2,y2),...,(xn,yn). Notice from the examples below that, although data entry can be carried out independently for the first and second variables, it has to be assumed that they represent bivariate data.

- 91 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials All bivariate data commands accept a list of data points as an argument in place of two lists of numbers. In a perfectly natural way, WIRIS takes the abscissae of the points as the values of the first variable and the ordinates as the values of the second variable observed in the elements of the sample.

covariance: command covariance

where mx=mean(x), my=mean(y).

correlation: command correlation This calculates Pearson's correlation coefficient for a set of bivariate data taken from a sample. This parameter indicates the degree of 'linear relationship' between one sample and another.

- 92 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Statistics regression line: command regression_line Given a data sample (x1,y1),(x2,y2),...,(xn,yn), calculates the regression line determined using the least squares method, taking x as a predictor variable and y as a response variable.

- 93 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Combinatorics >>fast Functions

combinations variations permutations

combinations with repetition variations with repetition permutations with repetition

All combinatorial commands (permutations, combinations and variations, with or without repetition) have an associated icon and text command. These commands are commonly used to calculate the number of components in a list of combinatorial selections, but they can also return the selections themselves. Except for the special case of permutations with repetition, explained below, when the first argument of these commands is a list (shown with curly brackets) or a vector (shown in square brackets), the command returns the corresponding list of combinatorial selections from the set.

In WIRIS the elements of a list or vector are distinct, even if there are repetitions. Thus, when combinations, variations or permutations are calculated they are treated distinctly, rather than as indistinguishable, except in the case of permutations with repetition.

Functions

combinations: Icon

or

, command combinations

The combinations command takes two arguments, m and n. If m and n are non-negative integers, it calculates the number of combinations of m elements taken from n in n. If m is a List or Vector and n is a non-negative integer, it returns the list of combinations of its elements taken from n in n. Upon clicking the icon, the standard combinations symbol will appear along with two green, empty boxes. Enter the argument m in the first and the argument n in the second. Upon clicking the

icon, two boxes will appear. Enter the argument m in the top box and the argument n in the lower box.

- 94 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Combinatorics

combinations with repetition: Icon

, command combinations_with_repetition

The combinations_with_repetition command takes two arguments, m and n. If m and n are non-negative integers, it calculates the number of combinations with repetition of m elements taken from n in n. If m is a List or Vector and n a non-negative integer, it returns the list of the combinations with repetition of its elements taken from n in n. Upon clicking the icon, the standard symbol for combinations with repetition will appear along with two green, empty boxes. Enter the argument m in the first and the argument n in the second.

variations: Icon

, command variations

The variations command takes two arguments, m and n. If m and n are non-negative integers, it calculates the number of variations of m elements taken from n in n. If m is a List or Vector and n a non-negative integer, it returns a list of the variations of its elements taken from n in n. Upon clicking the icon, the standard variations symbol will appear along with two green, empty boxes. Enter the argument m in the first and the argument n in the second.

- 95 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

variations with repetition: Icon

, command variations_with_repetition

The variations_with_repetition command takes two arguments, m and n. If m and n are non-negative integers, it calculates the number of variations with repetition of m elements taken from n in n. If m is a List or Vector and n a non-negative integer, it returns the list of the variations with repetition of its elements taken from ninn. Upon clicking the icon, the standard symbol for variations with repetition will appear along with two green, empty boxes. Enter the argument m in the first and the argument n in the second.

permutations: Icon

, command permutations

The permutations command takes one argument, n. If n is a non-negative integer, it returns the number of permutations of n elements, that is n!. If n is a List or Vector then it provides the list of all the permutations of its elements. Clicking the icon will bring up the standard permutations symbol, containing an empty green box corresponding to the argument n.

permutations with repetition: Icon

, command permutations_with_repetition

The permutations_with_repetition command has an initial argument, n, which must be a non-negative whole number (otherwise the command has no effect) and a sequence of one or more additional arguments n1 , n2 ,..., nr. If the additional arguments are non-negative whole numbers such as n = n1+n2+...+nr, the command will obtain the number of permutations for n elements taken from r different elements and such that the ith element repeats ni times. If these conditions are not met, the command has no effect. In place of the sequence of additional arguments it is possible to enter a List (or a Vector) L of nelements, comprised of r different elements and such that the ith element repeats ni times. If n = n1+n2+...+nr, the command provides the list of all the different distinct permutations of L otherwise it has no effect. To calculate the set, enter the list of the elements to be combined as the second argument. Clicking the icon, the standard symbol for permutations with repetition will appear along with two green, empty boxes. Enter the additional arguments (that is, the sequence ni, or the List or Vector) and the argument n in the second box.

- 96 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Combinatorics

- 97 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Units of measurement >>fast Notation Arithmetic Functions convert conversion factor coefficient unit Basic units of the SI Units derived from SI Units from other systems Prefixes for the SI System of Units

Tables

Units of measurement are the basic tools of physics and also some aspects of mathematics. Units of measurement that WIRIS allows us to represent include all of those in the International System of units (SI) and some others, such as the litre and the bar (atmospheric pressure), which have a practical relevance. It also allows users to define their own units with the command unit. In addition to the principal units, the SI system includes decimal multiples and submultiples, denoted using the prefixes deka, hecto, kilo, deci, centi, milli... The complete list of units in the SI, along with their prefixes, names, abbreviations and the corresponding conversion factors with respect to basic units, can be found in the tables at the end of the chapter. The icons on the tab Units of measurement can be used to create units and measurements. For example, to express the metre, use the icon and then click on the icon

to express the decimetre, select the icon deci from the drop-down menu on the left,

.

Some of the more common units we can use, from the SI or other systems, are:

meter, gram, amper, kelvin, mol, liter, hour, minute, second, coulomb, henry, newton, joule, volt, ohm, hertz, pascal, bar, radian, siemens, farad, tesla, watt, weber You will find the complete list of units included in WIRIS in the tables at the end of the chapter. Units can be multiplied and divided together to define new units. If a unit of measurement is multiplied by a number we obtain a quantity, which can represent the value of a measurement. Quantities corresponding to measurements of the same magnitude can be summed, multiplied or divided together even if not expressed in the same units. The units in which they are represented can be changed. To express a complex quantity in a single unit, use the command convert with the quantity as the first argument and the unit in which we wish the express the result as the second argument. Let's look at some examples:

- 98 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Units of measurement

Notation Physical quantities can be added, subtracted, multiplied and divided. In general, to add or subtract quantities we use the notation we refer to as complex. That is, we separate the quantities (remember that a quantity is a number followed by a unit) with spaces. WIRIS understands complex notation. Nonetheless, when in doubt it is advisable to use the usual symbols for addition and subtraction.

Arithmetic When adding and subtracting physical quantities, negative quantities can arise. When possible, WIRIS transforms these into the positive equivalent. Let’s look at some examples:

Functions The functions to convert quantities to different units are:

convert: command convert The command convert can take one or two arguments. In the first case, we get the quantity that was entered, expressed in SI basic units. In the second case, the second argument is the unit of measurement in which the specified quantity should be expressed.

conversion factor: command conversion_factor

- 99 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials This command can take one or two units of measurement as arguments. If it is given two arguments, it returns the factor by which the quantities expressed should be multiplied in the first unit to obtain the equivalent in the second unit. If it is given only one argument, which we assume is a unit of measurement, it calculates the factor to convert quantities expressed in this unit into SI basic units.

coefficient: command coefficient Given one quantity this returns its coefficient if there is only one summand. If there is more than one summand, it returns the coefficient of the quantity transformed into SI units.

unit: command unit Given one quantity this returns its unit of measurement if there is only one summand. If there are more summands it returns the equivalent SI unit.

Tables

Basic units of the SI Besides these, other units are defined:

SI unit Magnitude Name

Symbol

length

meter

m

mass

kilogram

kg

- 100 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Units of measurement

time

second

s

electric current

amper

A

thermodynamic temperature

kelvin

K

quantity of substance

mol

mol

luminous intensity

candela

cd

Units derived from SI Defined from the basic units:

SI unit

Expression in other units

Magnitude

Expression in basic units

Name

Symbol

plane angle

radian

rad

m·m =1

solid angle

steradian

sr

m ·m =1

frequency

hertz

Hz

s

force

newton

N

kg·m·s

pressure, strain

pascal

Pa

N/m

2

m ·kg·s

energy, work, quantity of heat

joule

J

N·m

m ·kg·s

power, radiant flux

watt

W

J/s

m ·kg·s

electric potential difference, electromotive force

volt

V

W/A

m ·kg·s ·A

capacitance

farad

F

C/V

m ·kg ·s ·A

electrical resistance

ohm

W

V/A

m ·kg·s ·A

electrical charge

coulomb

C

F·V

A·s

electrical conductivity

siemens

S

A/V

m ·kg ·s ·A

magnetic flux

weber

Wb

V·s

m ·kg·s ·A

magnetic flux density

tesla

T

Wb/m

- 101 -

-1

2

-2

-1 -2

2

-1

-2

2

-2

2

-3

2

-3

-1

-2

-1 4

2

-3

-2

-2

-1 3

2

-2

-2

kg·s ·A

2

2

-1

-1

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

2

-2

-2

inductance

henry

H

Wb/A

m ·kg·s ·A

luminous flux

lumen

lm

cd·sr

m ·m ·cd=cd

illuminance

lux

lx

lm/m

radioactivity

becquerel

Bq

absorbed dose

gray

Gy

J/kg

m ·s

equivalent dose

sievert

Sv

J/kg

m ·s

catalytic activity

katal

Kat

2

2

2

-2

-4

-2

m ·m ·cd=m ·cd -1

s

2 -2 2 -2

-1

s ·mol

Units from other systems

Unit Magnitude Name

Symbol

time

hour

h

time

minute

min

time

second

s

volume

liter

l

pressure, strain

bar

b

Prefix

Symbol

Prefixes for the SI System of Units

Factor 10

1

deka

da

10

2

hecto

h

10

3

kilo

k

10

6

mega

M

- 102 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Units of measurement

9

giga

G

10

12

tera

T

10

15

peta

P

10

18

exa

E

10

21

zetta

Z

10

24

yotta

Y

Prefix

Symbol

10

Factor 10

-1

deci

d

10

-2

centi

c

10

-3

milli

m

10

-6

micro

µ

10

-9

nano

n

10

-12

pico

p

10

-15

femto

f

10

-18

atto

a

10

-21

zepto

z

10

-24

yocto

y

The nomenclature in this chapter is based on the standard of the European Standards Committee.

- 103 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Menus, icons,... >>fast Toolbar tabs General Analysis Geometry Plotter

Edit Matrices Greek

Operations Units Programming

Symbols Combinatorics Format

In this chapter, we will discuss how to use the different menus and icons in WIRIS. On opening the WIRIS page, a collection of tabs will appear. Examples include Edit, Operations or Analysis. At any time the contents of only one tab are visible. To reveal the contents of a tab, click on the tab name. Each tab has a set of icons and menus to facilitate building mathematical expressions. To begin, we will review the content on the tab Operations.

To use the icons on the tab Matrices, click on Matrices.

, and icons will appear that correspond to Matrices

Toolbar tabs For each of the tabs on the toolbar, a table is presented below to describe the icons and the functions each icon performs, and when applicable a link to a more detailed description is provided. The columns of these tables show us: Action A brief explanation of the icon's functionality. Keyboard The keystroke combination that can be used as an alternative to the icon in order to speed up the process of building expressions. When such a combination exists, it is included in the icon explanation. More info This column provides links that take the user to the quick reference guide section, where a detailed description of the icon’s functionality is provided along with examples of how the icon can be used. Code This code is the text that should be entered when the user builds a custom toolbar. For more information, see the chapter on the Toolbar. - 104 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Menus, icons,...

General: These icons always appear to the right of the toolbar: Action

Keyboard

Carries out all the calculations in the active block (set of calculations where the cursor is located). A floating arrow appears close to the active block. It can be used to carry out the calculations, and it disappears when using the keyboard (Ctrl + Enter) to calculate. To make the floating arrow reappear, use the icon at the right of the toolbar.

More info

Code

1 minute

compute

Ctrl + Enter

Stops the calculations.

stop

Edit: tasks relating to the document and the calculation process. Action

Keyboard

Starts a new calculation session.

More info

Code newsession

Creates a new block.

newblock

Prepares the session for saving as an HTML file.

save

Prepares the session for printing.

print

Prepares a preview of the session to be printed.

printPreview

Copies the selected expression for subsequent pasting.

Ctrl

+C

copy

Cuts the selected expression and saves ready for pasting.

Ctrl

+X

cut

Pastes the saved expression in another part of window WIRIS.

Ctrl

+V

paste

Undo the last change.

Ctrl

+Z

undo

Redo the last change.

Ctrl

+Y

redo

Takes the line of calculations where the cursor is located and converts it into a comment.

Ctrl

+T

- 105 -

comment

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Creates an argument box. This is a green box which disappears when something is entered into it and has no value set. These boxes are used to create problem statements. By default they take the value 'a'.

argument

Clears the results of all calculations.

removeresults

Opens the portal www.wiris.com

logoicon

Opens Help.

help

Operations: most common operations and tasks. Action

Keyboard

More info

Code

Creates variable parentheses

size

Ctrl Ctrl

+( +)

parenthesis

pparenthesis

Creates variable square brackets.

size

Ctrl Ctrl

+[ +]

vector

bparenthesis

Creates variable size curly brackets (braces).

Ctrl Ctrl

+{ +}

list

BBparenthesis

Creates the absolute value bars for a real number or for the determinant of a matrix.

absolute value determinant

vparenthesis

Creates the variable size bars that denote a normal vector.

norm

VVparenthesis

division

frac

quotient and remainder

eucdiv

Ctrl + Up arrow Ctrl + Shift + ^

exponentiation

power

+ Down arrow Ctrl + .

extraction logarithm

_

Creates a fraction. Creates associated division.

the with

Ctrl

+/

icon integer

Creates an exponent.

Creates a subscript.

Ctrl

Creates a square root.

Ctrl

+Q

square root

sqrt

Creates the nth root

Ctrl

+A

root

root

- 106 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Menus, icons,...

Creates a summation.

sigma

Creates a summation over a range.

sum sumx

Creates a product.

product

Creates a product over a range.

prod prodx

Creates the icon associated with rounding up to a whole number.

ceil

ceil

Creates the icon associated with rounding down to a whole number.

floor

floor

plot graphs

plot

plot 3D graphs

plot3d

Display graphs

represent

Solving equations

solveequation

Solving systems

solvesystem

Creates

the

command

the

command

the

command

plot Creates

plot3d Creates

represent

Creates

the

command

solve, including space to enter the equation. Creates

the

command

solve, including space to enter a equations.

system

of

Accesses a menu which allows addition or deletion of elements in a vertical list. Creates a vertical list of n elements in order to write a system of n equations. By default, n=3 .

menu Shift

+ Enter (add a line)

vertical list

vertlist

Symbols: creates the symbols associated with certain operations, constants and mathematical concepts.

- 107 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Action

Keyboard

Creates a 'greater than' inequality. Check whether it is true by entering ? after it. Creates a 'greater than or equal to' inequality. Check whether it is true by entering ? after it.

Ctrl

More info

Code

equations and inequalities

gt

+>

geq

Creates a 'less than' inequality. Check whether it is true by entering ? after it. Creates a 'less than or equal to' inequality. Check whether it is true by entering ? after it.

lt Ctrl

+
>fast Who can configure the toolbar? Why configure the toolbar? How do you configure the toolbar? Example Who can configure the toolbar? Anyone can configure the toolbar. Why configure the toolbar? By configuring the toolbar, the user can customize WIRIS and thus produce higher quality results. Making changes to the toolbar has no effect on the mathematical behaviour of the calculator. For example, you can have a calculator where the only icons on display are those relating to units of measurement (metre, second, ...) which you want to learn about in a lesson. How do you configure the toolbar? Once saved as an HTML page with the WIRIS material to be displayed, the page can be edited and a parameter added with the name ToolbarDef. The value of this parameter determines the toolbar configuration for this html document. Example Suppose you want to add the tabs shown in the image:

To generate these tabs, we have added the following code (in bold) to the html file:

- 117 -

|

limit

*

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials Let us see in more detail how each part of the code is compiled: First tab:{Arithmetics}plus

minus@

Second tab:{Analysis}integral

iintegral | limit * leftlimit rightlimit@

Note that: • separators can be inserted between symbols using the "|" symbol, • the space for an icon can be reserved using "*", • content can be left justified by entering "@" at the end of the line for that tab. The codes for the symbols (plus, minus, integral, are provided in the section, Menus, icons,....

- 118 -

iintegral, limit, leftlimit, rightlimit,...)

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Primary

Primary What is it? The WIRIS calculator has a toolbar suitable for primary education. This toolbar contains an appropriate selection of icons, set at the right level, so that a primary school pupil will feel comfortable with the symbols displayed.

Besides these icons in the calculator toolbar, there is a keypad on the right hand side with icons for numbers, parentheses, basic operations (addition, subtraction, multiplication, decimal division, square root, fraction), the decimal point and the equals sign:

Where is it? The calculator suitable for primary education can be found in wiris primary. 1 minute In a work session with the WIRIS calculator various calculations grouped in blocks can be carried out. The calculation process steps are as follow: 1. An expression be calculated is built to using the keyboard or using the icons associated with the various commands. 2. In each block as many expressions as desired, can be entered. To add a new expression, following the expression where the cursor is located, use the key Enter (Carriage return). 3. Evaluate an expression or block of expressions by clicking on the icon 4. The result is shown to the right of the original expression and separated by the arrow To create more elaborate calculations, bear in mind the following points regarding page layout in WIRIS • A block can be added to the session with the icon • When you evaluate (click on the icon

on the Edit menu.

or Ctrl + Enter), all expressions in the active block are calculated. The

results are shown and a new empty block, which becomes the active block, is created below. The cursor appears in the active block. • The variables and calculations in one block are independent of the variables and calculations in all the other blocks. - 119 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials • To start a new work session, use the icon

.

To save the current session, click on the icon

and save the HTML page generated.

Return to WIRIS to try it out or see the following examples: Arithmetic operations:

Symbols:

,

,

,

,

,

,

,

,

,

,

,

and

and

- 120 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

Primary

Units of measurement:

NOTE 1

Lower case and upper case letters are understood as different characters. Tan is not the same as tan.

NOTE 2

Parentheses only group, (1,2,3) is the same as 1,2,3. >>fast

- 121 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Desktop

User interface The WIRIS desktop is divided into three main sections: • WIRIS Toolbar (for more information, see the Quick Guide) • Menus • User interface >>fast Menus User interface Menus You can use the menus to carry out the more general tasks. There are four menus, which we do not describe in detail here, given that they are for common general purpose tasks: • • • •

File: allows us to open, save and print a WIRIS session. Edit: the standard copy and paste functions as well as undo and redo. Tools: provides other functions such as customising the application. Help: the place to access this manual!

User interface The main window is the data window (called WIRIS CAS), where the user can enter WIRISinstructions and obtain responses.

- 122 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

User interface

When the user requests a graphical image, WIRIS Desktop opens a new window and places it within the group of other windows currently open, resizing the other windows. The user can adjust the size of each window by moving the window separators. The user can launch a number of graphics windows simultaneously, and these can be navigated using the maximize, restore and minimize buttons. It is also possible to drag and drop the windows. WIRIS Desktop will easily adjust the size of all windows to they can all fit in the workspace available.

- 123 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

The graphics windows can be minimized, and then display as a small tab in the lower left hand corner of the screen. The user can preview or restore any of the tabs by moving the cursor over the relevant tab or by clicking on it respectively.

- 124 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

User interface

- 125 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

Appendix SYMBOLS

'

transpose (A:Matrix ) A'

More information on transpose

-p

a-b

- 126 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

APPENDIX

P-Q

P-v

-P

- 127 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

wiris, help materials

-r if r=line(P,v) then -r=line(P,-v).

-s if s=segment(A,B) then -s=segment(B,A).

More information on

!

n!

factorial (n:ZZ )

- 128 -

powered by WIRIS (c) maths for more sl. All rights reserved. Legal notice

APPENDIX

!!

n!! n, 0