Technical University of Loja. Electronics and Telecommunications. Teaching Manual of Mathematica 5.2 Mathematica 5.2 Didactic Manual Eduardo A. R.

Suarez Tutor: Patricia Ludeña Ing. Loja - Ecuador Handbook of Mathematica 5.2 2 Index. Contents Item 1. Installing Mathematica 5.2 1.2 Tools and assistance. 1.2.1 Help in Mathematica 5.2 (Help browser). 1.3 Syntax and notation. Input and output 1. 3.1 1.3.2 Declaration of variables. 1.3.3 libraries. 1.3.4 Options for graphics. 1.3.1.a key characters in Mathematica 5.2. Call 1.3.3.a libraries (packages). Co ntent 1.3.3.b bookstores. 1.3.4.a Axes and label axes. 1.3.4.b Colors in graphic s. 1.4 Basic operations. Solving Equations 1.4.1. 1.4.2 find points of intersection graphs and functions. 1.4.3 Draw one or more functions. Item 2. Basics of calculation. 2.1 Limitations. 2.2 Differentiation. Partial Der ivation 2.2.1. 2.3 Integration. 2.4 sums and sigma notation. Item 3. Plane curve s and parametric equations. 3.1 Syntax and method of settlement. 3.2 Constructio n of tables of parametric equations. 3.3 Graphs parametric equations. Polar Equa tions 3.4 Item 4: Vectors. 4.1 Points and lines in the plane and in three dimens ions. 4.2 Products scalar and vector product. Item 5: Space Geometry 1.5 Lines a nd planes in space. 5.2 Surfaces in space quadric surfaces 5.2.1. Surfaces of re volution 5.2.2 5.2.3 Shadow 3D surface. Figure 5.3 Polar coordinates. 5.3.1 Conv ersion of coordinates. 5.3.2 Graphs in polar coordinates. 5.4 Graphics with sphe rical coordinates. Item 6: Vector Analysis. Graphics 6.1 vector fields. Graphics 6.2 vector fields in three dimensions. Graphics 6.3 vector fields using vector calculus. Chart 1.4.3.a one or more functions. Chart 1.4.3.b implicit equations. Chart 1.4 .3.c inequalities. Handbook of Mathematica 5.2 3 ITEM 1. Mathematica 5.2 INSTALLATION Mathematics Program 5.2 can be installed either through a cd or a flash memory w hose content is higher than 160 MB and contains the program. This guide will ste p by step directions to follow. 1. Mathematica Open the folder that is in the in stallation CD or other mass storage device greater than 160 MB, which will find the installation file SETUP (we double click on the icon as shown in Figure 1.1) Figure 1.1 Setup icon Mathematica 5.2 2. Appears immediately figure 1.2 that tells the user that the program is installed correctly on your computer. Handbook of Mathematica 5.2 4

Figure 1.2 window installer setup process 3. Your screen displays a window to determine the type of installation of Mathemati ca on your computer. The one we recommend is the FULL, to get all the benefits o f the program. Click on the icon INSTALL (see Figure 1.3). Figure 1.3 Window Mathematica installation acceptance. Figure 1.4 Installation Process Window Handbook of Mathematica 5.2 5 4. Once the installation process registered the license information to be contained in the same device on which the user has obtained the program. We click on Fini sh, as shown in Figure 1.5. Figure 1.5 Input Window Mathematica license. Mathematica Manual 5.2 • Upon entering the program will display a warning window telling you that the Wolfram Notebook Inderex is installed and the user needs t o do it manually every time you log in Mathematica. Here the steps to follow. Pr ess YES on the warning window above. (Figure 1.6). 6 1. Figure 1.6 Window Inderex notice Wolfram Notebook 2. Click on NEXT in the following three windows. (Figure 1.7, 1.8 and 1.9), which a re welcome, a program of maintenance and installation respectively. Figure 1.7 Window installation welcome Inderex Wolfram Notebook Handbook of Mathematica 5.2 7 Figure 1.8 Window for maintaining the program. Figure 1.9 installation program window Inderex Wolfram Notebook 3. Finally, we pressed on FINISH as shown in Figure 1.10 Handbook of Mathematica 5.2 8 Figure 1.10 Window installation completion

After this step you will have access to all the benefits of Mathematica 5.2 with all its advantages and applications. 1.2 Tools & HELP After the above steps will appear on your screen window with Mathematica 5.2 whi ch will work in this course as shown in Figure 1.2.a Figure 1.2a window Mathematica 5.2 The first thing the user must do is get the palettes that allow you to perform a ll the applications this program offers. The most used palettes are: Basic Input , Basic Calculations and Algebraic Manipulation, where you will find icons and f unctions that will serve as tools for developing their projects. Figure 1.2.b gi ve you the location of the pallet and its applications in Figure 1.2.C Handbook of Mathematica 5.2 9 Figure 1.2.b Location of the main support pallet Figure 1.2.C Applications palettes help Handbook of Mathematica 5.2 10 1.2.1 Help in Mathematica 5.2 (help browser) This program assists the user to already prepared with examples to guide the pro grammer in different areas. The user must enter the theme name in the search and the program is responsible for providing any support issues with their respecti ve examples. The illustrations 1.2.1a and 1.2.1b shows the location of the Help Browser (Help) and a practical example Figure 1.2.1a Browser Help Figure 1.2.1b Sample prepared in Mathematica 5.2 Mathematica 5.2 Manual Here are some examples that can be found in the Help Brow ser. 11 Figure 1.2.1c Example dodecahedron Figure 1.2.1d Graph an inequality Figure 1.2.1e 3D Graphics an elliptic integral Handbook of Mathematica 5.2 There are objects and animations much more interesti ng than the user can navigate and see the Mathematica 5.2 here some of his examp les: 12 Beethoven Figure 1.2.1f image generated in Mathematics 5.2 Figure 1.2.1g Klein Bottle

Figure 1.2.1h Graph of the Riemann surface Handbook of Mathematica 5.2 13 SYNTAX AND NOTATION 1.3. In 5.2, Mathematics program can distinguish two major parties. ucleus (Kernel), is responsible for executing all the commands ecessary calculations and the other part is the user interface e interaction between these two parts is done by pressing user t + Enter or Enter located on the numeric keypad. One, called the n and perform the n (Front - End). Th simultaneous Shif

1.3.1 Input and output The lines of code that are nominated student enters the input, and the response that the program returns are to be detailed output with the same number, so the sign (%) we can refer the final output (see Figure 1.3.1a ), two signs (%%) of t he penultimate output, and so on, or with the notation (% n) where n is the numb er of output. Figure 1.3.1a Sample development and When you press Enter only does not run only line changes for the student to ente r another input, so that Mathematica runs all the entries that have come before you press Shift + Enter or Enter on the numeric lock (see Figure 1.3.1b). Figure 1.3.1b Sample graphs and tables Handbook of Mathematica 5.2 14 MAIN CHARACTERS IN 1.3.1.a Mathematica 5.2 Mathematica 5.2 distinguish the characters with uppercase and lowercase letters, for example all functions, options, variables and constants built into the prog ram necessarily begin with a capital. A space between two variables is interpret ed as a multiplication sign. Therefore, we should never leave a space between ch aracters when you give a name to a constant, variable or function. The parenthes es, brackets, and keys have different functions in Mathematica. Parentheses are used to group and indicate priority in the operations required. The brackets are exclusive of the functions, define the argument of the same, and also used in t he trigonometric functions (Cos [2x]) and, finally, the keys are used to define lists of elements (vectors and matrices, eg .) Figure 1.3.1c Syntax for the preparation of a graph In the example in Figure 1.3.1c see that the brackets are used for the Plot func tion and its definition, and obviously for the sine and cosine, and the keys to give the domain of the variable x. Table 1.1 shows the most used functions in ou r manual with its syntax and notation. Operation Notation Addition Subtraction Product Enhancement Ratio Absolute value of x square root o f x Party x Factorial entire x real random number between 0 and a maximum and mi nimum values of a list of prime factorization of x x + y xy xy x * and either (a space) x / x ^ y Abs [x] Sqrt [x] Floor [x] x! or Factor [x] Random [] Max [x1, x2, ...], Min [x1, x2, ...] FactorInteger [x] Table 1.1 Notation for basic mathematical operations

Handbook of Mathematica 5.2 15 Function Notation ex ln (x) loga (x) sin (x) cos (x) tg (x) cotg (x) sec (x) cosec (x) arcsin (x) sh (x) arcsh (x) e ^ x or exp [x] Log [x] Log [a, x] Sin [x] Cos [x] Tan [x] Cot [x] Sec [x] Csc [x] Arcsin [x] Sinh [x] ArcSinh [x] Table 1.2 Notation for basic functions As we saw in the previous chapter for the functions of Table 1.2 we can use the paddles BasicCalculations / Trigonometric and Exponential Functions. Other meanings N [x] Expand [x] Factor [x] Together [x] Apart [x] Cancel [x] Simplify [x] FullS implify [x] trigexpand [x] TrigFactor [x] expresses the numerical value of x For m Expanded (made sums, products, powers ...). Factors x (written as a product of factors x minimum). Write all terms of x with a common denominator. Separate x in terms with denominators as simple as possible. Cancel common factors that hav e numerator and denominator. Simplify x following standard algebraic rules. Simp lify x more powerful using algebraic rules. Expands trigonometric expressions in short terms. Factors trigonometric expressions in product terms. Table 1.3 Notation for other applications In the example in Figure 1.3.1d see the notation and syntax for the preparation of a graph and how to obtain the same values. In the interval of a fourth domain appears, the same which indicates the variation of x from 0 to 2π in ste s of π / 4. We made use of the tools listed in the table above to find the maximum and minimum values of a gra h are often very useful for the study in vector analysi s, so we can get any value from the gra h given oint. Handbook of Mathematica 5.2 16 Figure 1.3.1d Exam le gra hs, tables and minimum and maximum data 1.3.2 Variable Declaration Very often you need to make calculations of some variables whose rocesses are t he same, for exam le get the gra hs of some functions, turning oints of coordin ates from one system to another, find the tangent lines of a function, etc. For these rocesses it is advisable to make a declaration of variables to avoid re e titive and tedious rocesses. In the exam le 1.3.2a see the a lications of this tool. Figure 1.3.2a Gra hics generated with variable declaration Handbook of Mathematica 5.2 Now let's try to look at other variables that we use d the same algorithm for any function. (See figure 1.3.2b) 17 Figure 1.3.2.b Gra h of other functions with the same scheme 1.3.3 Libraries The rogram Mathematica 5.2 has libraries that allow students to develo their a lgorithms, they are called or required at the beginning of any task that the stu dent needs to run in Mathematica 5.2. As the develo ment of this manual is based on the schedule of the subject of vector analysis, usually ask the librarian fo

r the gra hs of conics, arametric equations, olar gra hs, 3D gra hs, surfaces in s ace, coordinate transformations in three systems: rectangular, cylindrical or s herical, etc. For other exam les we need one or more libraries that will de liver results according to the mathematical rocesses carried out in class. 1.3.3.a CALLS libraries (PACKAGES). Are the res ective calls to the libraries based on the a lications want to do. These calls are made before running Mathematica algorithms but inter ret them as errors. Figures 1.3.3a and 1.3.3b re resent the same exam le: the first when yo u have not made the corres onding call to the library and the second when the r ogram resents a correct out ut Handbook of Mathematica 5.2 18 Figure 1.3.3a failed for lack of a library that recognizes the in ut requested For the rogram to recognize the in ut, we must necessarily call your res ective library which can give us the required res onse. The in ut 17 is the call to th e ackage: ContourPlot3D which erform the necessary calculations and will give us the out ut we want. Figure 1.3.3b Gra h ContourPlot3D requested with the library CONTENT 1.3.3.b bookstores. Each library contains a number of sub-a lications and the student can use for t he a lications of the various to ics to be develo ed in this manual and a sim l e way you can meet all its contents. First Manual Mathematica 5.2 library is requested that you want to know and then makes a call to its content as shown in Figure 1.3.3c. 19 Figure 1.3.3c any bookstore requested content In this way we can look in the hel (Hel Browser) any subject that interests us , to know its syntax and the benefits it can rovide in develo ing our algorithm . For exam le, we want to know about the syntax and notation of some sub-issues that need on Vector Analysis. We roceed to call your library: <<Calculus `` Vec torAnalysis and obtain the contents of it. (See Figure 1.3.3d) Figure 1.3.3D content library on vector calculus This manual will rovide all the libraries for you to develo and test their alg orithms learned in the classroom. In Table 1.4 give some names of the libraries for various functions, so they walked to the student with the tools given, obtai n the necessary information. Handbook of Mathematica 5.2 20 Bookstore A lications This library allows you to generate gra hs of im licit equations that are resen ted in canonical form or in general as <<Gra hics `` Im licitPlot solutions of e

quations For exam le, circles, arabolas, elli ses, etc. This library will allow us to obtain gra hic <<Gra hics `` ParametricPlot lane curves and arametric e quations within this library is the sub-item <<Gra hics `Gra hics` im ortant ol ar gra hs in some cha ters of Vector Analysis This library will hel us turn coo rdinates, are these: rectangular, cylindrical <<Calculus `o` VectorAnalysis s he rical to any system above. It allows the student to obtain a gra h in three dime nsions when a 2D gra hics was erformed <<Gra hics `` SurfaceOfRevolution turn o n an axis or a oint generating a surface of revolution. Generates a two-dimensi onal gra hics <<Gra hics `` re resents ContourPlot contour ma s roduced by an e quation in any system generates a three dimensional gra h of an equation in the rectangular system equal to zero <<Gra hics `` ContourPlot3D allowing us obtain conical whose colors give the students a de th and height. Within this library a re the issues <<Gra hics `Gra hics` ParametricPlot3D three-dimensional s herical and cylindrical systems When required to obtain the area between a curve and a line <<Gra hics `` FilledPlot-defining whether this is the axis coordinates or o ther curve. This library will allow us to lot all kinds of <<Gra hics `` Inequa lityGra hics inequalities and meet the range covering inequalities. We will get gra hical fields <<Gra hics `` PlotField vector in two dimensions (2D), a to ic being discussed in the cha ter on vector analysis. This library will allow the s tudent to obtain gra hs of vector fields on three <<Gra hics `` PlotField3D dime nsions as ex osed in the field of vector analysis. This library will hel us get everything with <<Gra hics `` Gra hics3D res ect to gra hic traces in three dim ensions with gra hics in different lanes xy, xz, yz Table 1.4 Vector Analysis A lications using the res ective library Handbook of Mathematica 5.2 21 1.3.4 O tions for gra hics. The dis lay of a gra h is im ortant for the student to better visualize what we have learned in class. That is why this manual will rovide the best tools for k ee ing o en a range of o tions for you to change according to the needs of the lot. 1.3.4.a LABEL AXES AND AXES. The axes are lines, whether in two or three dimensions, known as coordinate axes , which have a range numbering according to the student needs for each exercise to achieve chart take sha e. Some libraries, in their default settings, have the (s) gra hic (s) with their axes but not others (Fig. 1.3.4a), so it is necessar y that the student enter the syntax to get them. Figure 1.3.4a 3D Gra hics unnumbered or coordinate nomenclature In different situations will require that each coordinate axis has a characteris tic nomenclature so that they a ear visible on the gra h. In the following exam le, the correct syntax, we obtain the desired numbers and nomenclature (fig. 1. 3.4b) Handbook of Mathematica 5.2 22 Figure 1.3.4b axles numbering and naming 1.3.4.b COLORS IN GRAPHIC. When you need a better gra hic dis lay of some colors are used either in 2D or 3 D a lication having as find oints of intersection, shadows and contours of sur faces or sim ly aesthetic gra hics. (Fig 1.3.4c)

Figure 1.3.4c Gra hics of various sha es with different colors In the same way we do this with 3D gra hics. In the following exam le we will se e is a gra h normally (Fig 1.3.4d) and then modify Handbook of Mathematica 5.2, the same colors and see what their effect. (Fig 1.3 .4e) 23 Figure 1.3.4d Figure resented with the normal arameters

Figure 1.3.4e Chart with different tones for better viewing Handbook of Mathematica 5.2 24 1.4 BASIC OPERATIONS. After having the basic tools and know the syntax is handled in Mathematica 5.2 roceed to erform the basic o erations Introductory calculus, gra hs, and es eci ally vector analysis. As for the calculation are: • Resolution of equations. • F ind oints of intersection gra hs and functions. • Draw one or more functions. • Perform o erations with matrices. Solving Equations 1.4.1. Mathematica 5.2 has a s ecific notation that allows us to find the zeros or root s of a function. And has the following syntax: 1. Solve It is written [], functi on s ecializes in solving equations. 2. It equals (s) equation (s) de ending on the roblem: a. A balanced equation to a scalar S Olvea [f (x) = k] b. A balance d equation Olvea another equation S [f (x) = g (x)] c. Working with equations Ol vea S [f (x) + g (x) - kh (x) = ki (x)] 3. Finally, denotes the end oint: Solve [f (x) == g (x), x] In the following exam les (Fig 1.4.1a, 1.4.1b and Fig Fig 1.4.1c) will see its s yntax. Figure 1.4.1a equation equal to zero Handbook of Mathematica 5.2 25 Figure 1.4.1b equation equal to another equation Figure 1.4.1c equations Transactions 1.4.2 Finding oints of intersection gra hs and functions. With the revious tool we can find oints of intersection of two gra hs to match their res ective equations, but we need ordered airs we determined the exact oint of intersection. For these cases we use the tool Re laceAll [], which re la ces the values in the original equation. 2. Re laceAll is written []. 3. Within this function is laced first in the equation which will then re lace the values and the values obtained. Re laceAll [f (x), x → a] Figure 1.4.2a look at the gra hs of two equations and their intersection oints with the values obtained checked. Handbook of Mathematica 5.2

26 Figure 1.4.2a Gra hic their oints of intersection 1.4.3 Draw one or more functions. In the revious to ics for the demonstration of some tools have made some gra hi cs, but has not yet been given recise syntax for drawing gra hs. Among the to i cs that we will see in the future will find various ty es of gra hs either two o r three dimensions. For now we see the basic syntax and the ty es of gra hs that can be done: 1. Chart one or more functions. 2. Gra h of im licit equations. 3. Gra h inequalities. Handbook of Mathematica 5.2 27 1.4.3.a CHART one or more functions. Using all that Mathematica 5.2 can give us we can create gra hs with a different style. The syntax to gra h a function is: • We write the function Plot [] inten ded for the re aration of gra hs. • Place (s) function (s) in brackets: P lot [ (f (x), g (x), h (x) .... . )] • Finally, enter the domain in which (s) gra hic (s) will be develo ed: Plot [(f (x), g (x), h (x), ....), (X, xmin, xmax)] Figure 1.4.3a shows the gra hics and better viewing with some o tions. Figure 1.4.3a Gra h various functions CHART 1.4.3.b im licit equation. Gra hic as a circle, an elli se, or hy erbola require s ecial notation. In this case requires a s ecialized library and a different syntax than the revious gra hs. 1. It is calling the library <<G ra hics m licit P `I` 2 lot. We write the function for im licit equations I m licit P lot [] 3. We write the com lete equa tion, yes with a double as a distinguishing Mathematica 5.2 Manual declaration of variables. I m l i c i t l o t P [e q n] 4. Finally the domain is assigned where the lot will develo . 28 Im licitPlot [eqn, (x, xmin, xmax)] Exam les of im licit equations gra hs are widely used in this course (Figure 1.4 .3b). Figure 1.4.3b Exam les of im licit equations or conical Handbook of Mathematica 5.2 Note: When working with some gra hics that require a single library, it is not necessary to rewrite the library for each year, sim l y called at the beginning of the worksho . 29 CHART 1.4.3.c inequalities. Mathematica 5.2 has a library s ecialized in gra h inequalities as we had set ou t in Table 1.3. Its syntax is as follows: 1. It is calling the library <<G ra hi cs nequality `I` G ra hics 2. We write the function for P nequelity lot inequali

ties I [] 3. We write the com lete inequality, using the signs for inequations B asicIn ut located in the alette. I n e q u a l i t and P l o t [i n s e q] 4. F inally the domain is assigned where the lot will develo in both x and y,with their res ective maximum and minimum limits.

Figure 1.4.3c Illustrative exam le for inequations Handbook of Mathematica 5.2 30 ITEM 2: BASICS OF CALCULATION. To obtain the necessary tools in vector analysis, we must give a very im ortant to the study of calculus and its main functions in areas such as limits, differe ntials, derivatives, sigma notation, Riemann sums, integrals, etc. Knowing the i m ortance of measuring in areas such as mathematics, hysics, chemistry, enginee ring and many others, Mathematica 5.2 offers useful tools his gallery, whose syn tax and notation are easy to use. 2.1. LIMITS. You can find the limits of any function, whether one or more variables, or relat ed to the limits on the right or left. Its syntax is as follows: 1. We write the function: Limit []. 2. Is laced below the function. Limit [f (x)] 3. Finally, we define the variable and its trend. When required by the left limit is laced the ex ression Direction → 1, and the limit on the right: Direction → -1. Thus: Limit [ex , x → a, Direction → 1] Here are some exam les in Figure 2.1a to see its syntax and the results we recei ve. Figure 2.1a Limits and its gra hical re resentation. Mathematica 5.2 Manual 2.1a In the exam le we can see the gra hic re resentation of the limits, saying the res onse Mathematica 5.2 gives us both the limits on the left and right. Now in Figure 2.1b shows the function with the limits on neg ative infinity, checked his chart. 31 Figure 2.1b Limits at infinity and gra hical verification 2.2. DIFFERENTIATION. On this subject see the o tions in Mathematica 5.2 has everything related to dif ferentiation: artial derivatives and useful in any area of engineering. 1. Re r esentative function is written referral: Dt []. 2. We write the words, whether a function f (x) or an equation in which involve two or more variables. Mathemati ca 5.2 erforms im licit or leave it ex ressed as such: Dt [ex r,] 3. It s ecifi es the variable that is taken as reference and the number of derivatives to be a lied to the ex ression.

Dt [ex r, (x, n)] Handbook of Mathematica 5.2 32

InequalityPlot [ineqs, (x, min, max), (y, ymin, ymax)] The following exam le will better illustrate how to erform syntax, the shaded art is the solution of the inequality (Figure 1.4.3c).

The following exam le will make some derivative and see the difference when it c omes to ex ressions of one or more variables. Figure 2.2a Derivatives of equations with one variable. In Figure 2.2b we observe the im licit equations with res ect to having two or m ore variables and using the tool for solving equations, its solution is ex resse d as its derivative. Figure 2.2b im licit with two or more variables. In the following exam le we will use some revious to ics and tools to create an algorithm that allows us to gra h a function and as a oint in your curve find the tangent line. We leave it as unknown for the student to vary the function an d the oint at which you want to see its tangent line so that you can check the exercises done in class with this com uter rogram. Handbook of Mathematica 5.2 33 Figure 2.2.c illustrative exam le using total shunt 2.2.1 Partial derivation. In later studies of Vector Analysis and Differential Equations, often need to em loy artial derivation to find directional derivatives, gradients and divergenc e, to give a few exam les, used in vector fields. 1. We write the re resentative function of the artial derivatives, which is found in BasicIn ut alette, addi ng the ex ression that will be the subject of the lead.

∂ x (ex r) 2. You can erform artial derivation with res ect to more sub-variables as in t he ast or make an extra degree of derivation, the variables se arated by a comm a. ∂ x, z (ex r) or ∂ x, x (ex r) Handbook of Mathematica 5.2 In the following exam le we will see the difference between total lead and lead art so be careful when making algorithms and verify results. 34 Figure 2.2d Exam les using artial by ass. 2.3. INTEGRATION. In this issue we will see the different ty es of integration, both indefinite in tegral, defined as its gra hic for better visualization of the areas under the c urve. Indefinite integration. 1. Integrate the word is written [], or the symbol of integration located in the alette BasicIn ut:

∫. Integrate [ex ,] or 2. We write the ex ression that is subject to integration. ∫ ex . 3.And finally we write the differential variable of the integral to be evaluate d. Integrate [ex , x] or ∫ ex , x Figure 2.3.1a Exam les of indefinite integration Handbook of Mathematica 5.2 35 Definite integration. In this ty e of integration, also called antiderivative, define the limits of th e integral u er and lower. These limits may be scalars as functions that we wil l see later for multi le integration. 1. We write the syntax of integrals. Integ rate [] as in indefinite integration. 2. Ex ressions are written to be followed by a comma integral with variable differential and its limits, the lower first a nd then the u er. As in the revious case there is also located on the tool al ette that re resents the integral BasicIn ut defined. Integrate [ex r, (x, xinferior, xsu erior)] or In the following exam les (Figure 2.3.2a) give two ways that the definite integr al can be ex ressed using either syntax. Figure 2.3.2a Integral defined by a single variable. Handbook of Mathematica 5.2 36 2.4. Sum and sigma notation. This section is the first to find areas including known function, and can also l earn how to gra h functions and erform the shading of their areas either with t he shaft or other feature. 1. Write the symbol sigma notation BasicIn ut located in the alette. 2. Are wri tten summation index and u er and lower limits, as follows: The summation index can be any letter and its limits in kee ing the roblem to s olve. Here are some exam les: Figure 2.4a Sigma notation and syntax To gra h functions and shade the area under the curve, either with res ect to it s axis or in other follow the following ste s: 1. 2. 3. It is calling the library <<G `F illed ra hics lot` P function is written P F il led lot [] You write the (s) equation (s) with their res ective limits of the (s ) gra hic (s .) FilledPlot [(f (x), g (x), ... ..},{ x, xmin, xmax)].

or both x and in y. In the next issue will verify the values obtained with the g ra h of the arametric equation. 3.3. CHARTS arametric equations. 1. We write the function for arametric equations: P arametric P lot []. 2.Writ e the two arametric equations se arated by a comma (,): ParametricPlot [(f (x), f (y))]. Handbook of Mathematica 5.2 40 3. They are located in the limits of the arameter which will develo the lot. ParametricPlot [(f (x), f (y)), (t, tmin, tmax)] Figure 3.3b Gra h arametric equations Figure 3.3c figure that varies with the arameter range. Exercise extra: Vary the arameter range of Fig 3.3cy observe it changing its gr a h. The following exam le will check the values obtained from the table and gra h, we have used other o tions such as PlotRange → that allows us to limits on t he gra h in the ordinate (Y axis) and As ectRatio → gra h a function with the sa me scale the x-axis as the axis of y. Handbook of Mathematica 5.2 41 Figure 3.3d Check the chart with his board. Handbook of Mathematica 5.2 42 3.4 POLAR EQUATIONS To gra h olar equations need to a eal to gra hics library: writing on the to : <<Gra hics `Gra hics`. The syntax for olar lots is: Where: f: It is the function you want to gra h. θ min, θmax: The minimum and max imum range in which delimit the graph. In the following example (Figure 3.4a) we will see how is the syntax for polar plots PolarPlot [(f), (θ, θ min, θmax)]; Figure 3.4a Graph of a polar function can also plot several polar plots, whether they are to find their points of intersection, the area between the graphs and find the length of his bow. In fig. 3.4b we will see two graphs can be drawn one overlying the other two in the same range. Using colors for graphics, we will h elp to distinguish the different lines in the plot. Handbook of Mathematica 5.2 43 Figure 3.4b display several graphs in one plot. With the help "ticks" will enabl e us to better visualize the proposed range by changing the numerical values suc

h radians. (See Figure 1.3) Figure 3.4c Graphics polar functions with the help of tools Handbook of Mathematica 5.2 can experiment with polar plots as in the example be low (Figure 3.4d). Try giving different values to its angle. 44 Figure 3.4d Illustration of the curve rose. ITEM 4: VECTORS. Their study is important because the vast majority of physical uantities in nat ure must be expressed by its magnitude and direction. That is why in this manual will devote a chapter to his explanation. 4.1 points and lines in the plane and in three dimensions. To graph lines and points in space, we use the Point and Line to will allow us to observe in space or in the plane. Its syntax: 1. We write the function that will allow us to plot these Show [Graphics []. 2. They are located on the type of function that re uires graph and the coordinates : Show [Graphics [exp [(coordinates)]]] 3. For example the lines are represented by the two points expressed in the coor dinate system, for example: Show [Graphics [Line [((2, -5), (9.2 }}]]] Handbook of Mathematica 5.2 45 Straight Figure 4.1a consists of two points in the plane. Figure 4.1b is observe the development of a line from the graph of two points. Figure 4.2b straight points and placed in the plane. Similarly we can draw the l ines and points in three dimensions by slight changes in nomenclature obtaining the expected graphic. Its syntax: 1. Show function is written [Graphics3D []. 2. They are located on the type of function that re uires graph and the coordinate s in three dimensions: Show [Graphics3D [exp [3D coordinates ()]]] Handbook of Mathematica 5.2 can use all the options learned in this book for a b etter view of the graph. 46 Figure 4.2c lines in space through two points. And to draw points in space follo ws the same syntax by replacing the term Line Point (see Figure 4.2d) Figure 4.2d points seen in three dimensions. Handbook of Mathematica 5.2 47 VECTOR 4.2 Products. CLIMBING

¡

¡

¡

Y PRODUCT These operations are carried out easily because Mathematica 5.2 has all the inte rnal procedure, simply put vectors. Its syntax: 1. Vectors are written: (a, b, c ), (d, e, f). 2. Place the dot (.) Representing the dot product. 3. If you want to make the cross product must write C ross [(a, b, c), (d, e, f)] and it is per formed. Another widely used concept is to get the norm or magnitude of a vector. Its syntax is simple: 4. We write the function N orm [] and its vector: N orm [ (a, b, c)] Figure 4.2a Example of scalar and vector product. Handbook of Mathematica 5.2 48 ITEM 5: GEOMETRY OF SPACE 5.1 STRAIGHT AND ROUTE IN THE AREA. To graph lines in space, we use a new feature called ParametricPlot3D we will introduce three parametric e uations for the line is di splayed as a graph in three dimensions. Its syntax: 4. We write the function tha t will allow us straight in 3D graphics: ParametricPlot3D []. 5. They are locate d in the limits of the parameter which will develop graphic respect to an unknown: ParametricPlot3D [(fx, fy, fz), (t, tmin, tmax)]. Note: The parametric e uations of a given line are not uni ue. We will see in th e following example as a line graph in 3 dimensions (Figure 5.1a). Figure 5.1a lines in space with parametric e uations. In contrast to plot planes have two options, the first by using the plot3d, or bookstore ContourPlot3D, is more common to use the former due to its easy handling and simplified writing. Its syntax: 1. We write the function for graphs in three dimensions: P lot 3 D [ ]. 2. We write the e uation of the figure e uated to a third variable: plot3d [E ua]. Handbook of Mathematica 5.2 49 3. Limits are placed on the surface where they will develop graphical regarding the two unknowns (x, y) Figure 5.1b Map plot3d constituted by the function. The second method to use the gallery <<Graphics `` ContourPlot3D. Its syntax is: 1. Function is written in three-dimensional figures: C ontour P lot 3 D []. 2. W e write the e uation of plane zero: ContourPlot3D [e ua]. 3. Limits are placed o n the surface where they will develop graphical respect to the three unknowns (x, y, z) ContourPlot3D [e ua (), (x, xmin, xmax), (y, ymin, ymax), (z, zmin, zmax)] Figure 5.1c map generated by the function ContourPlot3D

¡

¡

¡

¡

¡

¡

¡

¡

¡

¡

Mathematica 5.2 Manual 5.1by Figures 5.1c same plans were drawn with the two met hods in order to see how these do not change. Is available to which method is ea sier and appropriate within their study. 50 5.2 SURFACES IN SPACE 5.2.1 Quadric Surfaces: In this chapter we cylindrical surfaces, uadric surfaces such as the ellipsoid, the hyperboloid, elliptic cone, the elliptic paraboloid and hyperbolic parabolo id. For these graphs we will use the gallery <<Graphics `` ContourPlot3D. The sy ntax for these surfaces is: 1. We write the function to surfaces in three dimens ions: ContourPlot3D []. 2. Quadric e uation is written second-degree zero: ContourPlot 3D [e ua]. 3. Limits are placed on the surface where they will develop graphical respect to the three unknowns (x, y, z) ContourPlot3D [e ua (), (x, xmin, xmax), (y, ymin, ymax), (z, zmin, zmax)] Note: In order to trace the figure as we expect and with a high state of clarity , we will use a graphics option called MaxRecursion → 2, for areas that warrant. Thus we have the following areas: 2 2 2 Figure 5.2.1a ellipsoid x 2 + y 2 + z 2 = 1 to b c Handbook of Mathematica 5.2 51 Figure 5.2.2b February 2 hyperbolic paraboloid y 2 - x 2 = z b to The following example will use a graphic option that will allow us to observe an y graphics from a specified point (Figure 5.2.1c) The syntax: • After making the graph will post Show [%, ViewPoint → (x, y, z)] in where:% is the symbol repr esents the previous output. ViewPoint: the choice of a viewpoint. • Also use the option GraphicsArray, which shows the figures as a settlement. Its syntax: Show [GraphicsArray [g1, g2, ....]] Handbook of Mathematica 5.2 52 2 2 2 Figure 5.2.1c hyperboloid of two sheets - and 2 - x 2 + z 2 = 1 b to c

¡

¡

¡

¡

¡

Extraclase Task: Perform uadric surfaces shown on pages 812-813 and show them f rom different points of view. 5.2.2 Surfaces of Revolution: The surfaces are generated by an e uation in two p lanes that rotate on a specific axis or certain point. We will use a new library called SurfaceOfRevolution Its syntax: 1. We call on the library <<Graphics `` SurfaceOfRevolution. 2. We write the function for surfaces of revolution and its e uation: SurfaceOfRevolution [e ua]. 3. Limits are placed on the surface where it will de velop graphic with respect to one unknown: SurfaceOfRevolution [e ua, (x, xmin, xmax)]. Note: Mathematica 5.2 is the default graphical rotation about the axis of the de pendent variable in the following examples we will see its development (Figure 5 .2.2a) Handbook of Mathematica 5.2 53 Figure 5.2.2a surface of revolution of y = x 2 Figure 5.2.2b Area of the Witch of Agnesi or "witch" y = 4Cot (x) Manual of Mathematica 5.2 There is an option we can turn on a certain point any e uation. x In the following examples we will see how the same e uation can take different surfaces varying the point of revolution. (Figure 5.2.2c, 5.2.2d) a nd tools and learned as we realize at that point takes form the surface. Its syn tax is the same but now acts as an axis point of revolution: RevolutionAxis → (x , y, z). This point can be in a two or three coordinates. 54 Figure 5.2.2c surface generated by e uation at the point (0,1) The point seen in blue is the new axis of revolution is the same that can be located is the way of the e uation or can be in a plane. In the following example 5.2.2d see as th e point in blue will become a new hub. x Handbook of Mathematica 5.2 55 Figure 5.2.2d surface generated by a point out of the e uation. The following al gorithm allows us to observe a surface of revolution (Figure 5.2.2E) given a poi nt that is always on the figure. Surface Figure 5.2.2E generated by a point on the curve y = e - x Handbook of Mathematica 5.2 56 Here is an example with a period of revolution in the three coordinates (Figure 5.2.2f), you also try watching other points of view from different angles. For t his example we use some new graphing options, such as StackGraphics it allows us to make a graph on two axes, a graph view in three dimensions.

¡ ¡

¡

¡

¡

¡ ¡

¡

¡

¡

Figure 5.2.2f surface generated by a point in three dimensions Shadows 5.2.3 3D surfaces. A very useful tool that has Mathematica 5.2 is projecting a figure on the planes so that we can pretend as if projected lamp light on our figure. In the followi ng examples we will see how this happens (Figures 5.2.3a 5.2.3b) The syntax: 1. We call on the library <<Graphics `` Graphics3D. 2. We write the function for th ese graphs and their expression: Shadow [expr]. 3. Planes are located in which t hey wish to appear the shadows of the figure. Mathematica 5.2 has default all th ree planes. If desired, for example, that the plane does not appear is written z Shadow [expr, ZShadow → False]. Handbook of Mathematica 5.2 57 Figure 5.2.3a Shadows of a elliptic paraboloid. Figure 5.2.3b Shadows of a hyperboloid of one sheet. Handbook of Mathematica 5.2 58 Chart 5.3 in polar coordinates. 5.3.1 Conversion of coordinates. Before going to graph figures in other places such as cylindrical or spherical t ransformations and we know their e uivalents. For this item we will use the libr ary of "vector analysis" it will allow us to make the change from one system to another. Its syntax: 1. We call on the library <<Calculus `VectorAnalysis 2. Alw ays write the syntax of the Cartesian coordinates, ie are part of this system or you will get to it. The term that varies is From (de) or To (a), ie if you go f rom cylindrical to spherical system, we must first transform Cartesian and then go to the ball or vice versa. This example is part of Cartesian coordinates and cylindrical coordinates can be reached at: CoordinatesFromCartesian [(coordinate), Cylindrical] But here you want to reach the system rectangular (Cartesian) basis of a spheric al coordinate: CoordinatesToCartesian [(coordinate), Spherical] In the following example can observe the different conversions of rectangular co ordinates (Cartesian), cylindrical and spherical. Note: EYE !!!!!! in Larson's book, the components in the coordinates are cylindrical (ρ, θ, φ), whe eas in the book by Sadiku and Mathematica 5.2 p o g am notation is (ρ, φ, θ), ie in mathematica [θ] is the angle between the axis o z-position vecto ρ and [φ] is the angle in the xy plane to the position vect o ρ. Conve ting ectangula coo dinates to cylind ical and sphe ical. Coo dinate Conve sion sphe ical and cylind ical to ectangula . Handbook o Mathematica 5.2 59

¢

¢

¢

¢

5.3.2 G aphs in pola coo dinates. A te seeing new ways to exp ess one coo dinate, eithe

cylind ical o sphe ical

¢

¢

¢

¢

Conve ting sphe ical coo dinates to

ectangula

and cylind ical.

¢

¢

¢

¢

¢

¢

¡

¢

¢

¢

¢

¢

¢

¢

¢

¢

¢

¢

¢

¢

£

¢

¢

¢ £

¢

¢ £ ¢

coo dinates, now we will see how to plot igu es in the othe systems mentioned above. You may ind educed counts as its syntax and imp ove the uality o the g aph (Figu e 5.3.2A and 5.3.2b). Its syntax: 1. We call on the lib a y <<G aph ics `` Pa amet icPlot3D. 2. It is w itten to the g aphics unction in the cylind ical system and its e uation with espect to z: C ylind ical P lot 3 D [z]. 3. Bounda ies a e located whe e they will develop the g aph:

Handbook o Mathematica 5.2 60 Figu e 5.2.3a Cha t elliptical cone in the cylind ical system.

5.4 SPHERICAL COORDINATES WITH GRAPHICS. As the p evious chapte a e now going to make g aphics with this system (Figu e 5.4a). It has much in common and we use the same lib a y o ou study. Its synt ax: 1. We call on the lib a y <<G aphics `` Pa amet icPlot3D. Handbook o Mathematica 5.2 61 2. We w ite the unction o the g aphics in the sphe ical system and its e uati on with espect to ρ: S phe ical P lot 3 D [ρ]. 3. Bounda ies a e located whe e they will develop the cha t: Cylind icalPlot3D [ρ, (φ, φmin, φmax), (θ, θmin, θm ax)]. Figu e 5.4b Figu e gene ated with the sphe ical system Handbook o Mathematica 5.2 62 Figu e 5.4a Sphe e o med with sphe ical coo dinates ITEM 6: VECTOR ANALYSIS. GRAPHICS 6.1 vecto ield. Among the teaching tools that have Mathematica 5.2 is p esented g aphically vect o ields in a plane o seen in th ee dimensions. You can use all available tool s in this manual to view combined with exe cises that int oduce me it, eg planes , uad ic su aces, etc.. Its syntax: 1. We call on the lib a y <<G aphics `` Pl otField. 2. We w ite the unction o vecto and vecto ields: 3. Finally, we w ite the bounda y whe e the ield will be developed:

V ecto P lot F ield [( x, y), (x, xmin, xmax), (y, ymin, ymax)] In the ollowing examples 6.1b 6.1ay see how vecto ields a e plotted in the pl ane. Handbook o Mathematica 5.2 63

¢ £

£ ¢

¢¢

Figu e 6.1a

Vecto

ield o med by W = 2x + yji

¢

£ ¢

£

£

PlotVecto Field [( x,

y)].

¢

¢

¡

¢ ¢

¢

¢

¢

¢ ¢

¢ £ ¢ ¢

¢

¢

£ ¢

¢

¢

¢

¢

¢

¢

¢

¢

¢

¢ £

¢

¢

¢

¢

¢

£

¢

¢ ¢

¢ ¢ ¢ £

¢ ¢

£

¢

£

¢

£

Figu e 5.2.3b G aph o

a pa aboloid

¢

¢

Cylind icalPlot3D [z, ( , min,

max), (φ,φmin, φmax)].

¢ £

¢ ¢

¡

¢

£

¢

¢

¢

¢

¢

£

¢ ¢

¢

¢ ¢

¡

¢ ¢

¢ £ ¢

£ ¢

£

¢

£ £ ¢

¢ ¢

¢

¢

£¢

¢ ¢

£

£

£

£

¢ ¢

¢

¢ ¢

£

¢

¢

¢

¢

¢ ¢ ¢ ¢ ¢ ¢

£ ¢

¢

¡

¢ ¢

Handbook o Mathematica 5.2 64 GRAPHICS 6.2 vecto ield in th ee dimensions. In subse uent studies we see that the ields in natu e a e made in th ee dimensi ons and must view it in th ee dimensions. Its syntax: 1. We call on the lib a y <<G aphics `` PlotField3D. 2. We w ite the unction o vecto ields and 3. Fin ally, we w ite the bounda y whe e the ield will be developed: 4. Fo the g aph shown to be mo e use ul to the student, we ep esent each vecto with its di ect ion, with a choice: Vecto Heads → T ue.

Figu e 6.2a ield p oduced by G = sin (x) i + Cos (y) j + k z2

Handbook o Mathematica 5.2 65 Figu e 6.2b ield gene ated by T = (6xy + z3)

+ (3x + z) j + (3xz - y) i k Feb ua y 2 6.3 Vecto ield CHARTS CALCULATION USING THE VECTOR. The va ious te ms in the above have a numbe o applications in enginee ing so t hat its study is necessa y and u the inte p etation. The syntax below will all ow us to use these new tools: 1. We call on the lib a y <<Calculus `` Vecto Anal ysis. 2. We w ite the unction to be pe o med and its vecto (o scala ), in th is case a scala : G ad [exp]. Dive gence: D i v [( x, y, z)]. Rotational: C u l [( x, y, z)]. Laplacian o a scala : L aplacian [exp]. 3. Finally, w ite the e e ence system being used, in this case the Ca tesian G ad [exp, Ca tesian [x, y, z]]. And i you want g aphics made by the same p ocedu e in the p evious sections, eithe in the plane o in th ee dimensions. Handbook o Mathematica 5.2 66 Figu e 6.3a Vecto ield p oduced by the cu l o the vecto In this way you can get vecto g aphics such as low th ough a cylinde (Figu e 6.4c) o see the g a dient in an elliptic pa aboloid (Figu e 6.4B) Handbook o Mathematica 5.2

£

Mathematica 5.2 has a lib a y o calculation and is used as Vecto Analysis allow us to obtain the g adient, dive gence, cu l and Laplacian o a scala . In the ollowing examples we will see how these concepts combined with p eviously used g ive shape to some p oblems.

¢ ¢

¢

¢

¢

¢

¢

¢ ¢

¢

¢

¢

¢

¢

£

£ ¢

¢

¢

¢

£

¢ ¢

£

¢

£

¢ ¢ £ ¢

¢

¢

¢

¢

¢ £¢

¢

¢

£

¢

¢

¢

¢

¢ £

¢ £

£

PlotVecto Field3D [( x, y,

z), (x, xmin, xmax), (y, ymin, ymax)]

£

£

¢ ¢

¢

£

PlotVecto Field3D [( x,

y,

z)].

¢ ¢

¢ ¢

¢

¢

£ ¢

¢

¢

¢ £

¢

¢ ¢

£

£

£

¢

¢

¢

¢

¢ £

¢

¢

¢

£

¢

£

¢

£ ¢ ¢ £ ¢ £ £ £

£ ¢

¢

¢

¢

£ ¢

£ ¢

¢

¢

¢

¢ £ ¢ £ £

¢¢ ¢ £ £

Figu e 6.1b

Vecto

ield o med by W = 1/2xy +1 / 4x2 ji

¢ ¢

£ ¢

£ ¢ £ £ £

¢

¢

¡

¢ ¢ ¢ ¢ ¢

¢

¢ ¢ ¢ ¢

¢ ¢

¢ ¢ ¢ ¢

67 Figu e 6.4B Vecto ield p oduced by the g adient ac oss an elliptic pa aboloid. In this example we have combined some classes o elements conside ed as uad ic su aces, g adient, 3D vecto ields, which allow us to bette visualize concep ts that seem abst act and di icult to unde stand. Handbook o Mathematica 5.2 68

¢

¢

¢

£ ¢

Figu e 6.4c Vecto

ield by the vecto W th ough a cylinde .

¢

¡

¢

¢

¢

¢

£

¢

¢

££ £ ¢

¢

£ ¢ ¢

¢

£

¢ ¢

£¢