Math Graphica”  mobile version -   Quick and Dirty Manual

mathgraphica

Version 1.00

What is Math Graphica ?
Math Graphica Main window
- Calculator
- Functions / operators / constants available
- Equation
- Integration and Double Integration
    - Integration
    - Double integration
- System of Equations
User defined Functions
- Variables
- Formulas
- Matrix
- Contact


Math Graphica aims to be a very easy to use scientific calculator for Nokia mobile phones. The idea is for you to use it right away without having to read this manual, and yet, give you the flexibility and power to perform more sophisticated calculation in a very easy way.

Some features of Math Graphica for mobile: 

- math expression parser with real and complex numbers;

- equations and system of equations;

- integration and double integration;

- matrix's;

- unlimited user defined formulas, functions and variable (the limit is the device memory)



Fig.1) Mainwindow

MainWindow


Calculator icon

If you tap the calculator icon, it will appear a calculator dialog, with numbers and basic operators:

Fig.2) Calculator dialog

calculator


Just go ahead and tap any expression. If you need more functions, click the "more..." button and another dialog with a great list of function will appear:


Fig. 3) More function's Calculator dialog

calculator_more

Click the desired function and tap 'Ok' to go back to the previous dialog. Once you're done, tap 'Ok' and you will be back to the main window, with the expression you typed and the result. In this dialog you can also choose between degree, rad and grad.

Also at the end of the list, you will find 'x' and 'y'. This are not functions, but are provided for convinence, for latter use has variables, since 'x' and 'y' are the most common letters to specify a variable. Don't use them for now, unless you already defined them has variables (you will see about variables latter).

The mainwindow has a list that stores the expression's and the resultīs, has you see in the Fig. 1.

So far, all you did, could have been done directly in the mainwindow command line. You can just type any expression there and tap 'Ok'.

You also can tap any expression / result of the mainwindow list, and that will bring it to the command line where you can easily edit, and calculate it again. 

If you double tap on a item list, you will invoke the calculator dialog with that item displayed.


The functions and constants available in the "calculator" dialog and the "more" dialog are: 



Constants

pi

Pi number, 3.1415...

e

Nepper number 2.71... (do not use 'E' )

i

Imaginary number, use this notation ( 2+3.2i )

do not use ( 2+i3.2 )


Operators

+

sum

-

subtration

*

multiplication

/

division

^

Power

|

Absolute value, e.g. |-10| = 10

(this is not a logical operator)

E

Same as *10^, e.g . 3E2 = 3*10^2 = 300

(do not use 'e' , 'e' is the Nepper number)



Trigonometric functions

sin, cos, tan, cotg, csc, sec

Trigonometric

asin, acos, atan, acotg, acsc, asec

Inverse trigonometric

sinh, cosh, tanh, cotgh, csch, sech

hyperbolic

asinh, acosh, atanh, acotgh, acsch, asech

Hyperbolic inverse

Other functions

sqrt

Square root

log

Natural logarithm

ln

Exponencial logarithm

exp

Exponencial, same as e^

sinc

Sinc function, sinc(x) = sin(pi*x)/(pi*x)

realreal part of a complex number, i.e.    real(3-2i) = 3
imagimaginary part of a complex number i. e.  real (3-2i) = -2i
absEqual to the Absolute value, e.g.    abs(-10) = 10


All functions are case insensitive, you can write cos(3) or Cos(3), except for 'e', the Nepper number wich is different from operator 'E'.

Equation icon  

Plain simple, tap the equation button and equation dialog will appear.

Fig. 4) Equation dialog

Equation Dialog

It will appear a predefined equation "x^2-4x = 3x-2" that you can, of course, edit to the one you like.

And if you don't want to use the variable 'x' just go ahead and type ''y^2-4x = 3y-2". You can choose another name for the variable, like "my_var1" .  

The variable name can have letters, numbers and underscores ( a-z, 0-9, _ ) just remember that it must start with a letter.

The fields min, max, step, precision are advanced fields, and you can leave them like that. 

'min' and 'max' define the range from where Math Graphica will search a solution for the equation. 

'step' defines the small intervals where Math Graphica search the solutions.

'precision' is the accuracy of the solution.

Be aware of equations with trigonometric functions, since this functions are periodic, they will have a huge list of solutions in the default search interval ( -1E6 to 1E6) and thus will be awfully slow to compute, you should then choose a much smaller search interval.

Once you're done, tap 'Ok' and the equation and solutions will be added to the mainwindow list.


The program will automatically create a variable 'x' (or what ever variable you defined in the equation dialog). I will just see in a moment how Math Graphica handles variables. And, in case of multiple solutions, the variable will be assigned the last calculated  one.

Again, you wouldn't really need to call the equation dialog to solve a equation, could just write it in the command line (yes, just type 'x^2-4x = 3x-2' in the mainwindow command line and tap 'ok'). The only thing about the dialog is that will give you more options (min, max, step, precision), where as in the mainwindow it will fall to default (be carefull with trignometric equations).

Also if you double click the equation in the mainwindow list, it will bring the equation dialog. If you double click the result it will bring the calculator dialog.

Please do not use equations like:

x=x+1

This is correct only in programming language where '=' is the assignement operator and 'x' is incremented one unit, but mathematically is a equation without solution.

If you do this, Math Graphica will not find a solution. Math Graphica uses a very fast search algorithm, but this algorithm looses is speed when dealing with parallel expressions like 'x' and 'x+1' wich are parallel lines. As you probably noticed, Math Graphica solved the early equation 'x^2-4x=3x-2' in almost no time, searching in a interval of 120.000.000 (-1E6 to 1E6 using steps of 0.1). Thatīs very fast.



    

Want to integrate something ? No problem. Simple or double ?



Simple integration button invokes the integration dialog:

Integration

Fig. 5) Integration dialog

Integration

Notice you can use expressions like 'pi/2' and in the integration intervals. Also if you don't remember all the available functions Math Graphica has to offer, just click in the f(x) button and it will open the calculator dialog where you can compose your function to integrate. ( in this picture is cos(x) ). 'm' is a quality factor, the higher the slower calculation will be. Actually 'm' is the number of intervals in the Simpson's composite numerical integration rule.

Double integration:

double integrationDouble integration button

Fig. 6) Double integration dialog

double integration


Also notice you can use expressions like 'x^2+3x' and 'x' in the limits of the inner integral. This is very useful. Again you can click the f(x,y) button to bring the calculator dialog to help you compose the integration expression.


The solution:

Fig. 7) Integration solution

integration solution

Please also notice that we could just performed the integrations directly in the command line, and if we double tap on them we will invoke again the integrations dialogs.



System of equations Tap on the system of equations button

Just select the number of equations you want to calculate, then enter the values, or if you want, press the random button, that will generates numbers for your equation system. This is very powerfull because you can use complex numbers and expression's in the equation system.

Fig. 8) System of equation's dialog

System of Equations Dialog

Then tap 'Ok' and the solution will appear. 

So how many variables can you have in the system ?

Technically the algorythm is unlimited, or memory device limited. We set a limit if 10000, yet we only test it until 100, it took about 1 minute and 30s, to solve it in a Nokia C7. But it will be pretty fast, more less, until 30 variables, just a few seconds.

If you need to enlarge the column size due to large expression input, just double tap in the column header, in the limit between the columns. It will automatically fit the size.

 Where's the solution:

Fig. 9) System of equation solution

system equation solution

 


variables

We can use the command line in the mainwindow to create variables. 

Just type ' y=3.2 ' and we have create a variable named y with value 3.2 . If the variable already exist, it will update they're value.

Now you can define 'z = y+3', and we have a z variable with 6.2 value.

Now you also can type expressions like 'z+2*y' and Math Graphica will show you the result.

Also you can use names for variables like 'myvar2', 'xx_3'. Remember it must start with a letter, then use letters, underscores and numbers.



You can navigate throw the command line and the list of calculations by tapping any items in the list.
Pressing "Enter" (in non touch devices keyboard) in the command line, is the same as clicking the "Ok" button, calcutes the expression in the command line and displays the result in calculation list.

If you exit Math Graphica and start it again, it will retain the variables and their values, so you can use it again.


To manaje the variables created in the command line we have the next dialog.

Fig. 10) Variables dialog

variables dialog


It will show all the variables created so far.
We can set new names and values by editing. Plus, 
we can:



Imagine you want to define a mathematical function like f(x) = 2*x+3, and then you want to evalute it for x= 3, something like f(3) = 2*(3)+3 = 9 

Then just type in the command line:

f(x)=2*x+3  

Math Graphica will automatically create and save the function.
To calculate the function to the value of x= 3, just type in the command line:

f(3)

This is as simples as it gets. You can play around with expressions embebeding functions like:

2*f(4+3i)+7

Thats right, you can use an expression, or a complex number, as an input for the function, you can define all the functions you want and use it as a argument to other functions.

We can create a function called 'media' with two arguments that return the medium value of those arguments, like

media(a, b) = (a+b)/2

We called the arguments , "a" and "b", but we can name them something more descriptive, as "my_first_argument" or "argument_2".

Again, to manage all this functions you have a dialog wich will help you, just click in the main window "functions" icon:

functions

Fig. 11) User defined functions dialog

user defined functions dialog

It displays the functions defined so far.
You can also:
- Add: create a new function, a new line appear.
- Remove: select a function from the list and tap 'Remove'.

Please avoid doing stupid things like creating two functions with the same name, or creating a function called "cos" or any other existent trigonometric function's name.

formulas icon

Tap the formulas button, and a dialog will appear.

Fig. 12) Formulas dialog

Formulas Dialog

At the first time, you will have only one default formula 'En=m*C^2' . Notice we used 'En' insetad of 'E', because 'E' is a reserved operator ( *10^ ). 

We can use any variable in the formula that starts with a letter, and contains letters, numbers and underscores ( a-z, 0-9, _ ), but we cannot use names like pi, e (nepper number), sin (trigonometric functions), wich are already reserved by Math Graphica.  

You can tap īNew formula', a new line appears and you can write any formula you want (in this example 'P*V=n*R*T' and 'p=m*v'). 

Then tap the formula you want to calculate, and tap 'Ok'. Another dialog will appear. 

Fig. 13) Variables Formulas dialog

Formulas variables

If the formulas is new, Math Graphica will assign random values, to help you "get the picture". You must choose the variable you want to calculate and assign it a '?' (in this example is the 'm' variable) and assign values to the other variables.

For your convinience, you can double tap in a variable cell of the Constants column, and that will autimatically set a '?' caracter the corresponding cell in the Values column. 

If you double tap 'C', the corresponding '3E8' will be replaced by '?' (but you would then, need to assign a new value to 'm').

The options min, max, step and precison have the same meaning as described in the equation dialog.

Go ahead, tap 'Ok' and check the solution:

Fig. 14) Formulas solution dialog

Formulas solution


Formulas will be updated after the calculation and will be saved, so you can use them next time you use Math Graphica.

matriz
Tap the Matrix button:

Fig. 15) Matriz dialog

matrix's


Math Graphica has two built in matrix's, you can define them by tapping the buttons "Set matrix 1" and "Set matrix 2".
For each buttons a dialog will appear:

Fig. 16) Set matrix dialog

 
set matrix

You can define the number of rows and columns of the matrix. The matrx can be defined by tapping the cell's or you can define four defined matix:

- random: a random matrix
- zeros: a matrix of zeros
- ones: a matrix of ones
- diagonal: a diagonal matrix

Tap 'Ok' to go back to the previous dialog (fig. 15).

The rest ot the buttons are very self explanatory, you can perform matrix 1 and 2, sum, subtration and multiplication;
and you can, for the matrix 1, calculate, the determinent / inverse matrix, the transpose, adjugate and cofactor matrix.

For the maximum matrix size, applies the same rules of the system of equations.
Theoretically, we have a maximum size of 10.000 rows and columns, but we here not able to use this use size due to device memory limitations. Also, algorithm's for multilication and determinant are much slower than sum and subtration.
So, we get acceptable performance for sum and subtration with 100 rowns and colums matrix's, while multiplication and determinant calculation were just not acceptable, they took too much time. Until 10x10 rows and columns all operations were fast.


You can contact Math Graphica, for support, bugs, suggestions, comments, feature requests at:

Email:
math.graphica@gmail.com


Web:
soft-ingenium.planetaclix.pt

http://www.math-graphica.tk