If you happen to have come across this page, it is still under construction. I had to post it prematurely in order to workout an image display issue and display the table of contents . Only the first of several pages are posted here. Because I can not delete and re-created this page at will without going through the administrator I left it up.
If you like where it is going, it will be finished in one or two weeks.(Present date: Feb 8 2010).

When using SMath you are not entering equations into a simple text field as you might do in a simpler calculator or graphing program. This program uses a rich and interactive process to create and edit formulas, functions and matrices. This tutorial discusses that process.

Note that this tutorial begins at the absolute beginning for the benefit of new users. It is highly recommended that you set up your browser window to fill one half of the screen and your SMath window to fill the other half.


Edit

Using SMath as a simple calculator

To use the program as a simple calculator you basically type in the desired expression and an equal sign. In an SMath window, type in the simple expression, 12.3*45= ,followed by Enter to get the following...

Image

When the calculation is a more complicated you will at times have to advance the curser using the right arrow key to move it from one text segment to the next. Type in the following to appreciate this fact. 12^3*44/5=

Image

When entering an equation it is often more convenient to use the Spacebar instead of the right arrow key to advance the curser.

At this point, we will immediately introduce the subject of variables and functions so that we will be dealing with the subject matter in the most general terms. Edit

Defining variables

Create a variable by typing, b1=40+60 ,and press Enter You end up with...

Image

Because the variable b1 had not been previously defined the program assumed that you wished to define it and inserted a colon before the equal sign. If below that definition you were to attempt redefine b1 to be equal to 22 using the similar set of keystrokes, b1=22 ,you end up with the expression below immediately after pressing the equal key = .

Image

The program this time assumed, at the moment that you entered the equal key, that you wished to know what b1 is presently equal to.

If one wishes to redefine b1 to a different value lower on the page, one would instead need to indicate this by using the colon symbol, : ,instead of the equal sign, = . Typing, b1:77 ,results in.... b1:=77

In short, := ,with a colon, is the “definition” symbol and, = ,is the “evaluation” symbol.

Note, variables themselves can contain variables and functions, for example…

b2:= 12 + b1^2*sin(pi/3)

Edit

Inserting functions

If you wish to insert a function into an expression you can use the dialog box at Insert(menu) >> Function... However if the function name is known to you it is quicker to use the dropdown list that automatically appears when a partial function name is typed. To insert the log function, type in the characters, 12 +lo ,and the below will appear.

.

.

.

Edit

Use of the program’s curser

To learn how to use the program’s curser, first enter the expression ln(30)*12^3 + b1 = to get the below

ln(30)*12^3 + b1 = xxxxxxx

Note that this expression must be below the point on the page where b1 is defined.

As expected, one can edit a single number, variable or function name, in much the same way that one edits any general text field. Specifically, you backspace over the character to the left of the curser and delete the character to the right. However when doing so the range of the curser can not be extending beyond a single number, variable or function name. Refer to the examples below.

.

.

.

When creating and editing equations a solid square place holder appears in locations where a text segment is required.

log10(■) + b1 = ■ ■

Empty squares appear where operators such as + - * / are required.

log10 (30) □ b1 = ■ ■

Sometimes you will see a solid placeholder at the far right end of the expression.

log10 (30) + b1| = 83.8024 ■

This place holder is for units and will be briefly touched upon later.

.

.

.

We will imagine that we wish to adjust the equation so that b1 is instead divided by 5. Doing this simply involves positioning the curser to the right of b1 and entering /5

ln(30) + b1/5 = xxxxxxx

if however you want to change the equation so that both ln(30) and b1 are divided by 5 you would first, using the arrow keys, extend the curser under both ln(30) and b1 before entering /5

Follow the steps below.

ln(30)+b1|= xxx :Place curser
ln(30)+b1|= xxx :Press the right arrow to extend the curser.
(ln(30)+b1)/5= xx : Divide by 5 and press Enter


.

.

.

Edit

Useful hints on editing an existing expression

- To make an existing value such as b1 the argument of a function you first have to put the value in brackets and then enter the appropriate text segment before it.

ln(30)+|b1=xxxxxxxxx : Place curser
ln(30)+(b1)=xxxxxxxxx : Create brackets
ln(30)+sin(b1)=xxxxxxxxx: Then enter the name of the function


- When entering new terms into a expression you must at times enter the operator before entering the associated text segment.
For example, to multiply the two separate values ln(30)+b1 by 6 from the left hand side you must, after extending the curser under ln(30)+b1, first insert the multiplication operator before entering the value of 6.

|ln(30)+b1=xxxxxx :Extend curser
■*(ln(30)+b1) =xxxxx : Insert operator, The brackets are inserted automatically
6*(ln(30)+b1) = xxxxx : Enter value
- Some edits can be a bit tricky, for example removing a set of extraneous brackets. In that situation you cut out what is inside the brackets, then removes the brackets by highlighting and deleting them and then you paste the contents back into the expression.

First place a set of brackets around ln(30)+b1 by extending the curser under them from the left and pressing the left bracket key.


|ln(30)+b1=xxxxxxxxx
(ln(30)+b1) =xxxxxxxxx


Now to delete them...


(■)=xxxxxxxxx : Cut out the expression (Shift + Arrow keys > Ctrl + X)
■=xxxxxxxxx : Delete the brackets (Shift + Arrow keys > Delete)
ln(30)+b1=xxxxxxxxx : Paste back the contents (Ctrl + P)


.

.

.



Edit

Idiosyncrasies

When editing expressions one needs to be aware of some idiosyncrasies.
Toward this end we will discuss the systematic behaviour of the curser. Enter the equation, 1+2 +3 + 4 = ,and slowly press the left and right arrows studying the position and range of the curser as you do. Below is a summary of the different curser positions and ranges.

|1 + 2 + 3 + 4 = 10
|1 + 2 + 3 + 4 = 10
|1 + 2 + 3 + 4 = 10
|1 + 2 + 3 + 4 = 10
|1 + 2 + 3 + 4 = 10
1| + 2 + 3 + 4 = 10
1 + |2 + 3 + 4 = 10
1 + 2| + 3 + 4 = 10
1 + 2 + |3 + 4 = 10
1 + 2 + 3| + 4 = 10
1 + 2 + 3 + |4 = 10
1 + 2 + 3 + 4| = 10


The important thing to note here is that the only time the curser spans a range of elements is when that range begins at the far left.
We need to keep this in mind when we go to perform tasks. For example, say we wish to divide 3+4 by 5 in the above equation, since we can not extend the range of the curser under 3+4 we will instead use the fact that we can extend the range of the curser under 1+2.
Below are the required steps to divide 3+4 by 5.


|1 + 2 + 3 + 4 = 10 : Position the curser under 1+2
■ + 3 + 4 = 10 : Cut it onto the clipboard (Ctrl+X)
3 + 4 = 10 : Backspace over the addition operator and placeholder.
(3 + 4)/5 = 10 : Divide 3+4 by 5
+ (3 + 4)/5 = 10 : Insert the addition operator.
b + (3 + 4)/5 = 10 : Insert a temporary dummy value like b or any number.
1 + 2 + (3 + 4)/5 = 10 : Paste the sum 1+2 back in, replacing the dummy value.


The dummy value was used in this instance because the program only allows you to paste a general expression like 1+2 into the location of an already existing text segment or text segment placeholder.

This method will of course work with any general expression; we used simple digits here for clarity purposes.

As it happens the curser behaviour described above occurs between any two brackets. This means that if we had the expression like the one below....

x^2 + ln(30)*(1 + 2 + 3 + 4) = xxx

the steps would have been exactly the same.

Mention what happens when you have multiplication.

.

.

.

To remove, 5* from ln(30)+5*b1 =xxx ,we would have to cut b1, delete, 5*b1 ,and then paste b1 back.

.

.

.

Edit

Odds and Ends

  • You can cause answers to be expressed symbolically rather than in decimal notation by using the right-arrow, Evaluate Symbolically symbol instead of the, = ,sign. It is accessible in the side panel and its shortcut is Ctrl+ >.
{3^2+sqrt(4+1)}/{5+2}=1.6052@#

{3^2+sqrt(4+1)}/{5+2}—{9+sqrt(5)}/7@#

  • We mentioned earlier that internal functions appear in the drop down list. It is also true that one’s own created variables, formula and functions appear in the list. Out of order

For example, if you typed in the function and formula examples above and now type in the following width=33*Leng those two examples will also appear in the list.

width:=33*Leng--.
--

This feature allows you to use long names for user functions, formula and variables and not get bogged down with a lot of typing.

.

.

.

Edit

Quick list of some SMath features



Edit

Formula

- The line between a formula and a variable is really just a matter of ones point of view. They are mathematically identical expect that a formula always contains a variable while a variable may not necessarily contain another variable. Formulas are also generally more complex. The below is a formula...

.

.

.

Edit

User functions

- You can define User functions. You follow the desired name of the function with a left bracket and then a variable or set of variables separated by commas.

.

.

.

Edit

Matrices

SMath handles matrices, below are some examples.

.

.

.

Edit

The Solve( f(x)=g(x), x ) function

Using the, solve( f(x)=g(x), x ) ,function you can solve for the variable of a general equality.

If you have an equality such as f(x)= g(x) you place it into the first argument and the variable you wish to solve for in the second argument. For example...

.

.

.

Edit

The polyroots(Vector) function

The polyroots(Vector) function will solve a polynomial even if it has complex roots. In this case the function’s argument is a column matrix which contains the coefficients of the polynomial. To solve...

.

.

.

Edit

Graphs

-You can plot 2D and 3D graphs in SMath. To insert one at the red insertion curser, go to insert in the menu or press Shift + @. I know I don’t need the “Shift +” part but I like this convention

{Sample graph of sin(x) and sin(x)^2}

.

.

.

Edit

Units

SMath can keep track of units and perform conversions. To make simple conversions you insert units after your numbers or variables by evoking the Units dropdown list using the single quotation mark, ‘ . For example, to find out how many meters there are in 100 ft you would do the following...

100*'ft=30.48*'m@# : Type, 100 >> ‘ >> ft >> Tab >> =

.

.

.

Edit

Programming

You can perform simple programming procedures. For example you can define functions with the IF procedure like below

Func(x)←if(abs(x)≥1,2*x,x)

.

.

.

Edit

Solving Derivatives

You can find the derivatives of functions. Evoke the derivative function by clicking the option in the side panel or type, dif , and use the dropdown list.

.

.

.

Edit

Solving Integrals



.

.

.

ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.