|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Math & Computer Science Server > ASCIIMathML Tutorial |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ASCIIMathML Authored by Chapman University undergraduate students Introduction The standard Moodle editor is used to type mathematical formulas online. This helpfile explains how to proceed and contains many examples. The notation used for formulas is similar to what you would type on a graphing calculator, and allows you to present even very complicated mathematical formulas clearly and easily. The process of typing math is very simple. There are two buttons on the editor you need to use. The Insert New Math
button looks like \`math + is + fun\` typed in the red box will show up as `math + is + fun`. To display the text in a red box using standard math notation, simply click outside of the red box or use the arrow keys to move the cursor outside of the red box. To edit the displayed math, click the math text (now rendered in a red color) and you will be able to edit the formula. Another useful button is the Calculate
button that looks like If you are reading a Moodle page with mathematics on it, you can see how the math was typed by hovering the mouse over the red text. A small text box will show what was typed to produce the formula. So you can study how a particular math expression is typed on a keyboard. You can also use the
Insert Math Symbols button Basics The editor uses the same basic symbols for simple calculations. Addition "+", Subtraction "-", Multiplication "*", and Division "/" can be easily entered in the editor. The order of operations is (almost) the same as for a calculator. For example: \`1+2-3*4/5+6 = 6.6\` which looks like `1+2-3*4/5+6 = 6.6` in the
editor. \`(1+2)-3*4/(5+6) = 1.90909\` which looks like `(1+2)-3*4/(5+6) = 1.90909 ` in the editor. Notice in the previous example how 5+6 was not shown in parentheses. There may be times where you need to show that 2 components of an equation are combined. For example if you wanted to show what factors were going to be canceled in a large expression, it helps to group the factors together visibly. For example: \`(1+x)/(3+x)*(3+x)/(5+x)=(1+x)/(5+x)\` will show up as `(1+x)/(3+x)*(3+x)/(5+x)=(1+x)/(5+x)` It would help the reader to see what you are planning on simplifying. In order to do this, you could put double parentheses around the first set of parentheses. In the previous example, simply change (3+x) to ((3+x)). \`(1+x)/((3+x))*((3+x))/(5+x)=(1+x)/(5+x)\` will show up as `(1+x)/((3+x))*((3+x))/(5+x)=(1+x)/(5+x)` Exponents are common in equations you will encounter. It is important to know how the editor handles exponents. Similar to a calculator, the editor uses the ^ key (shift-6) to denote the operation of exponentiation. For example: \`2^3 = 8\` would be read as "2 cubed equals 8" and would appear as `2^3 = 8` As always, proper formatting will help eliminate frustrations in the future so here are some tips on how to properly use exponents. The editor reads equations mostly from left to right and groups expressions together in that order (unless the grouping is changed by parentheses). For example: \`2^2^3 = 64\` because the editor resolves it as (2^2)^3 which is 4^3 so `2^2^3=64` \`2^(2^3) = 256\` because the editor resolves 2^3 = 8 and then solves 2^8 so `2^(2^3)=256` Similarly, \`2^2^2^2\` is read as `2^2^2^2` which is 256. If you wanted to have each value be to the next power, use parentheses like this: \`2^(2^(2^2))\` is now `2^(2^(2^2))=65536` \`2^1/2 = 1\` (`2^1/2 = 1`) according to the editor because there are no parentheses. And even if you do use parentheses, this won't show up well in the editor. \`2^(1/2)=1.4142135623730951\` shows up as `2^(1/2)=1.4142135623730951` It almost looks like \`1/22\` (`1/22`). If you are going to use fractions in your exponents, you can make them appear more like exponents by using a double forward slash "//". \`2^(1//2)\` will now look like `2^(1//2)` which allows the reader to see that the fraction is an exponent. \`2^(1/2)\` is just the square root of 2. This is the most commonly used root, and the editor has a built in function for this. \`sqrt(x)\` will display the square root of what is in the parenthesis. `sqrt(x)` or `sqrt(2)=1.4142135623730951` What if you want to display cube roots and beyond? Rather than typing everything in fractions, you can simply use the root function of the editor. \`root 3 x\` will be read by the editor as `root 3 x` but again, formatting is important. Basically, the syntax is: \`root("power of root")("value under root")\` which will be `root("power of root")("value under root")` Below are more examples. Examples of Powers and Roots
There can even be more extreme combinations such as \`sqrt(sqrt(root(3)(x)))\` which would appear as `sqrt(sqrt(root(3)(x)))` Trigonometric functions are commonplace in calculus. Understanding how the editor interprets these functions is vital. The abbreviations are similar to a scientific calculator. For example: \`sin(pi/2)=1\` will appear as `sin(pi/2)=1`. Other functions are presented below. Trigonometric Functions
In order to use squares of trigonometric functions, you don't type it out as it normally is presented in the book. \`sin^2(pi/3)+cos^2(pi/3)=undefined\` which should be one. However the editor does not evaluate `sin^2(pi/3)+cos^2(pi/3)="undefined"` In order to have the functions squared, simply put the exponent after the value \`sin(x)^2 or (sin(x))^2\` which is `sin(x)^2 or (sin(x))^2`. For example: \`sin(pi/3)^2+(cos(pi/3))^2=1\` which is `sin(pi/3)^2+(cos(pi/3))^2=1` The editor has stored values which can be used with simple keywords. Common values such as pi and e can be used in equations and still be evaluated using the calculator feature of the editor. Here are just a few examples. Common Constants and Symbols in ASCIIMath
Examples of these symbols in real problems will be presented in the next section: ASCIIMath in Calculus and beyond. If you need additional specific symbols, you can use the Insert Math Symbols button or take a look at http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||