Typing and the COW
The COW is quite smart, in a bovine sort of way, but she can't
read your mind. So when you type in formulas, the COW interprets
them very strictly and carefully, according to a prescribed set of
rules determined by her programming.
The typing rules have been constructed to make the job of entering
answers as convenient as possible, but you can still go wrong unless
you keep these rules in mind.
Why does it have to be so tricky? Why can't we just type formulas in
the same way we would write them on paper? The answer is that
ordinary computer keyboards lack two particularly important
mathematical operations:
- exponentiation
- fraction division
In the HTML language, we can represent each of these operations using
special formatting tricks:
- For exponentiation, use superscripts
  xyz, for example.
- For fraction division, use tables
These techniques produce a readable display, but are of no use
for entering formulas for mathematical analysis. That's where
the typing rules come in: to allow you to enter functions, fractions
and exponents in a convenient way.
Here are the most important rules you have to know. For a more
detailed discussion, click on
Typing Details.
Rule for fractions: The COW has to be told when a series of terms is
in the numerator or denominator, so use parentheses to group them.
For example:
- if you want to enter x+y divided by 2
you type (x+y)/2, not x+y/2
- if you want to enter x+y divided by a+b
you type (x+y)/(a+b), not (x+y)/a+b
Rule for exponents: The COW has to be told when an exponent is
finished, and the rest of the formula begins. Use parentheses, or a
space to terminate the exponent.
For example,
suppose you want to type x2 / 3
- If you type "x^2/3" it will be interpreted as
"x2/3"
- If you type "x^2 /3", with a space before the /,
it will be interpreted as
"x2 /3", which is what you
want.
In this example, the space terminates the exponent. It tells the COW
that after you have typed "x^2", the exponent is finished, and the
rest of the formula belongs to the denominator, below the "/".
Of course, if you don't mind parentheses, you can type in
unambiguously
- "(x^2)/3", which just means
"(x2)/3", equivalent
to what you intend without the parentheses.
More complicated exponential expressions follow the same rule: use a space
to terminate the exponent.
Rule for functions: The COW knows about the elementary functions,
and allows you to type the argument without parentheses. You can also
multiply the argument by constants or variables, but you cannot add
without parentheses.
For example:
- "sin x" means sin(x)
- "ln x" means ln(x)
- "cos 2x" means cos(2x)
- But "cos x+y" means cos(x)+y,
not cos(x+y)
Rule for function powers: The COW understands the usual power
notation for functions like the trig and ln functions.
For example:
- "sin^2 x" means sin(x)2
- "tan^k x" means tan(x)k
- "tan x^k" means tan(xk)
There are two ways you can improve your facility with this COW notation:
- Go to the COW Overview (a button on the COW home page) and click
on "Typing answers" to read more, or "Practice typing" to try various
formulas.
- Within every module is a very useful javascript called "Expression
Interpreter". Whenever you type a formula as an answer, you can click
on the interpreter link to see how the COW interprets it. If you
are entering an answer you think is correct, but the COW doesn't seem
to agree, try the interpreter to make sure you are typing the answer
you intend to type. In other words, catch your own typographical
errors.
That's the basics. Now you have to use the COW and get used to this
simplified COW notation. Once you have the idea, it will save you
a lot of extra typing time.