Jaxe equations syntax
Jaxe has a specific equation editor, to add and change equations. An equation is edited in a text area, while the corresponding image is displayed above in real time. The equation images are saved in a folder called equations_myfile within the folder of the XML file myfile.xml.
This editor does not pretend to be exhaustive. Complex equations can be created with another editor and added in Jaxe with a copy-paste.
Here are some rules to follow in order to make the best use of the editor:
- Do not use spaces (they are ignored in the best case).
- Write the equation as if it would be interpreted mathematically and a numerical result would be calculated. As a consequence, always specify the operators, even when they should not be displayed.
- Use parenthesis to specify the order of the operations if it does not match the mathematical evaluation order.
- addition, subtraction
- operators '+' and '-''
- multiplication
- operator '*', displayed only when two numbers are multiplied
Example: 2*3*sin(1,5*pi)
- division
- operator '/' (displayed as a fraction) and functions 'slash' and 'fraction'
Example: slash(a;b)/c
- function
-
functionname(arg1;arg2;...)
Example: f(x;y)
- power
- operator '^'
Example: x^y
- subscript
- operator '_'
Example: x_(ab)
- subsup
- function 'subsup' with the first term, and the elements to display as subscript and superscript
Example: subsup(A;1;2)
- square root
- function 'sqrt'
Example: sqrt(x/2)
- absolute values
- function 'abs'
Example: abs(x^3)
- power of e
- function 'exp'
Example: exp(x^2)
- integral
- function 'int', with 4 parameters: the function to integrate, the integration variable, and the minimum and maximum bounds
Example: int(f(x);x;0;infty)
- sum and product
- functions 'sum' and 'prod', with 3 parameters: the function to sum up, and the minimum and maximum bounds
Example: sum(ln(k)/k;k=1;10)
- matrix
- function 'matrix', with the lines as parameter as a function 'line'
Example: matrix(line(1;2;3);line(4;5;6))
- Greek letters
- variables with the letter name, with an uppercase to the first character of the name to get an uppercase Greek letter
Example: alpha*Delta*thetasym*upsih*piv
- special characters
- variable with the name of the special character
sun|star|earth|planck|infin|angstrom|hat|bar|asterisk
Example: M_sun+planck<infin
- special operators
- special code with no space
!=|~=|<=|>=|<<|>>|->|forall|exists|part|nabla|prop|cross|plusminus
Example: foralla existsb c<<d~=e>=d!=f
- accents
- function 'accent' with the letter and the accent to add above
Example: accent(AB;->)+accent(ABC;hat)+accent(x;bar)
- time derivatives
- function 'timed' with the variable and the number of dots to display above
Exemple: timed(theta;2)
- scalar product
- function 'scalarp' with the two vectors as parameters
Exemple: scalarp(accent(AB;->);accent(CD;->))
- functions with no parenthesis
- some functions are displayed without parenthesis when they have a single parameter with a variable
Example: sin(a)*sin(b)
- equation system
- function 'system', with the lines as parameters
Example: system(x+y=2;x-2*y=3)
- units
- function 'unit', with the unit as the second parameter
Example: unit(1;m)/unit(2;s)=unit(1/2;m*s^(-1))
factorials
function 'fact'
Example: fact(x) x!