Working with
(Yet Another Computer Algebra System):
Disclaimer – Just like a calculator is not to be used to “do the work for you”, it is simply a tool to speed your calculations along. Similarly, YACAS is not intended to do your work but provide you with a means of checking your work. If used properly, it will also give you some excellent experience in working with a computer algebra system. Enough said!
Though it is quite a calculator, Yacas is much more, it is a computer algebra system, meaning that it can be programmed to do a lot of things. Another advantage is that it can work with and manipulate algebraic expressions in symbolic form. ++++++++++++++++++++++ Let’s get started +++++++++++++++++++++++ Yacas allows you to do calculations, and can be used directly inside your browser. Below you should see the Yacas calculation center, with a text in blue stating "Click here to enter an expression". After tapping in that area, that text should be replaced with In>. You can type an expression to be executed here. If you don't know what to type don't worry, that is what this tutorial is for. In the following examples, the symbols that are to be typed into yacas will be blue in color. You should type them in, exactly as you see them here, including the semicolon (end all commands with a semicolon). Let’s test some simple examples: Adding two numbers You should see: 3+5; Out>8
Yacas understands standard simple arithmetic expressions. Some other examples you can try:
2*3; (multiplication) 2-3; (subtraction) 2^3; (raising powers) 2+3*4; (2+3)*4; 6/3; (division) 1/3;
Divisions are not reduced to real numbers, but kept as a rational for as long as possible, since the rational is an exact correct expression (and any real number would just be an approximation. Yacas is able to change a rational in to a number with the function N, for example N(1/3);.
Order of Operations: Operators have "precedence", meaning that certain operations are done first before others are done. For example, in 2+3*4 the multiplication is performed before the addition. The usual way to change the order of a calculation is with round brackets. The round brackets in the expression (2+3)*4 will force Yacas to first add 2 and 3, and then multiply the result.
Yacas as a symbolic calculator We are ready to try some calculations. Here are some exact manipulations with fractions for a start: 1/14+5/21*(30-(1+1/2)*5^2); The standard scripts already contain a simple math library for symbolic simplification of basic algebraic functions. Any names such as x are treated as independent, symbolic variables and are not evaluated by default. Some examples to try: 0+x x+1*y; Note that the answers are not just simple numbers here, but actual expressions. This is where Yacas shines. It was built specifically to do calculations that have expressions as answers. In Yacas after a calculation is done, you can refer to the previous result with %. For example, we could first type (x+1)*(x-1);, and then decide we would like to see a simpler version of that expression, and thus type Simplify(%);, which should result in x^2-1. The special operator % automatically recalls the result from the previous line. The function Simplify attempts to reduce an expression to a simpler form. Yacas offers some more powerful symbolic manipulation operations. Some simple equation solving algorithms are in place: Solve(x/(1+x) == a, x); Solve(x^2+x == 0, x); Solve(a+x*y==z,x); (Note the use of the == operator, which does not evaluate to anything, to denote an "equation" object.)
Symbolic manipulation is the main application of Yacas. This is a small tour of the capabilities Yacas currently offers. Note that this list of examples is far from complete. Yacas contains a few hundred commands, of which only a few are shown here. Expand((1+x)^5); Factor(x^2-1); Simplify((x^2-1)/(x-1)); (expand the expression into a polynomial) (factorize a polynomial) (simplification of expressions)
While we’re at it we might as well discuss basic plotting. Yacas can plot 2D functions. Examples: Plot2D(2*x+1); Plot2D(2*x+1,-10:10); Plot2D(x^2-4,-10:10);
This should be enough for now. I will update this document as our Algebra 2 skills evolve. Remember, only use this tool to check your work!