Math Equations/Expressions
Previous  Next

Composing mathematical equations like “square root of x cubed plus 3” is not that easy in a chat environment. Fortunately in VMT Chat you can produce equations that look similar to the ones in your textbooks. In this tutorial you will see how you can use various math notations as you are collaborating with your peers in a VMT Chat room.

Tip #1: Trying out the examples covered in this tutorial in the SandBox room is probably the best way for you to learn how to use them.

In VMT Chat you can compose math notations at two places:
  1. as you are typing a chat message,
  2. or in a text box posted on the whiteboard.
Figure 1 below includes an example where the equation is composed in the chat editor, whereas Figure 2 shows the same equation composed in a text box on the white board.

As you can see in figures 1 and 2 below, you need to enclose your equation within two dollar ($) signs (e.g. $y=x^2+x$), so that the system can recognize what you type as an equation.


       graphic  graphic
       Figure 1: Typing an equation in a chat message (left), and the way it is displayed to
       others (right).


       graphic          graphic
       Figure 2: Typing an equation in a text box (left), and the way it is displayed to others
       (right).

Tip #2: Since equations need to be typed in a certain way, it is very easy to make mistakes as you are composing your equation. VMT Chat has some useful features for debugging your equations before you post them.

If there is a typo or a term not supported by the editor in your equation, then you will see a red curly line under what you have written so far. For instance, the images on the left in Figures 3 and 4 show two erroneous cases where the author forgot to provide an exponent after the “^” symbol in the first one, whereas he left out the denominator following the “/” operator in the second case.

When you are done with composing your equation you might want to check how it would looks before you post it. As you can see in the screen captures on the right in Figures 3 and 4 below, when you move the cursor on your equation the output will be displayed in a yellow box above it.
       graphic       graphic
       Figure 3: Math equation editing support in a text box

       graphic        graphic

       Figure 4: Math equation editing support in chat.


1. Basic Operations

Addition, subtraction, multiplication and division operations are denoted by the usual +, - , *, and / symbols. Here are some examples:

Input
Output
$a+b-c$
graphic
$a*b$
graphic
$a/b$
graphic
$a+b/c$
graphic
$(a+b)/c$
graphic
$a+b/(c*d)$
graphic
$(a/b)/(c/d)$
graphic


2. Subscripts and Superscripts

Symbols which come after a “_” (i.e. SHIFT and -) sign will be displayed in subscripts. Similarly, symbols that follow a “^” (i.e. SHIFT and 6) sign will be displayed in superscripts. Here are some examples:

Input
Output
$x_1$
graphic
$x^2$
graphic
$y=x^3+3*x-5$
graphic
$y=x_1^2+x_2^2$
graphic
$x_12^23+y_45^78$
graphic
v=($x_1$,$x_2$,$x_3$)
graphic
$e^(x+3)$
graphic


3. Special Symbols

Input
Output
$alpha$
graphic
$beta$, $gamma$, $epsilon$, $delta$
graphic
$pi*r^2$
graphic
$root(3,5)$
graphic
$3+sqrt(2)$
graphic
$sum(i=0,10,i^2)$
graphic
$prod(i=0,10,i^2)$
graphic
$cos(x+pi)=cos(x)$
graphic
$sin(x+pi)$ = -$sin(x)$
graphic
$3+sqrt(2/(sqrt(2)+5))$
graphic
$sum(i=0, 10, sum(j=0, i, (i+j)/2))$
graphic
$log_2$$(32)=log_2$$(2^5)=5$
graphic


Tip #3: Special symbols such as $alpha$ can be very useful for labeling your drawings. For instance, in the example below a textbox containing $alpha$ is used to label an angle. The first picture shows what goes into the textbox, and the second picture shows the result when the text box is posted.

graphic     graphic





Tip #4: If you want to post a complicated equation but the result is not satisfactory, you can try splitting up your complex equation into smaller parts. For instance the

       $sin(x+pi)$ = -$sin(x)$

example shown above contains two sub-parts, namely
       
       $sin(x+pi)$

and
       
       $sin(x)$

“=-“ is inserted in between to get the desired effect. If we had tried the straight-forward way of writing this equation we could have used
       
       $sin(x+pi) = -sin(x)$.

Yet the system would have produced
        graphic
which is very different from what we obtained initially.

The current implementation of the equation editor can give you a headache if you need to use commas or unary minus signs (e.g. x_1,x_2 or sin^(-1)(x)). One way to get around that is to split your equation into smaller parts and enclose them with $ signs instead of enclosing the whole equation (e.g. check the difference between v=($x_1$,$x_2$,$x_3$) and $v=(x_1,x_2,x_3)$).