<h3>How to write mathematical formulas in your exercises.</h3>
You may embed mathematical symbols and formulas into the statement (when it
is of html format), hint and solution.
<p>
If you simply want to insert some mathematical symbols or greek letters,
you just need to type a <tt>\</tt> followed by the name of
the symbol or greek letter (if you haven't used this name in your parameter
definitions). For example, <tt>\pi</tt> gives you $m_pi,
<tt>\le</tt> gives $m_le, <tt>\pm</tt> gives $m_pm, <tt>\rightarrow</tt> gives
$m_rightarrow, etc. The names of the symbols follow the standard TeX
convention. Here is a
!href target=wims_help module=help/wimsdoc.en&subject=mathfonts#mathfonts list of mathematical symbols and their names
(replace <tt>$$m_</tt> by <tt>\</tt> in the names).
<p>
More generally, to insert a whole mathematical formula, you
can type the formula in the usual way as if you enter it into any
mathematical software or any computational tool under WIMS. In order to make
the formula formatted and shown beautifully, you have
only to enclose it in a pair of parentheses preceded by a backslash \. For
example, <tt>\(x^3-3x+cos(2pi*x)^5)</tt> gives you
!insmath x^3-3*x+cos(2pi*x)^5
, or <tt>\(sqrt(x^2+y^2))</tt> gives you
!insmath sqrt(x^2+y^2)
. You can type <tt>\(integrate(x^2+1)dx)</tt> for
!insmath integrate(x^2+1)*dx
, or <tt>\(integrate(exp(x^2+1),x=1..infinity))</tt> for
!insmath integrate(exp(x^2+1),x=1..infinity)
. You can also write the sum
!insmath sum(1/n^2,n=1..infinity)
using <tt>\(sum(1/n^2,n=1..infinity)</tt>, or the product
!insmath product(n/(n+1),n=1..infinity)
using <tt>\(product(n/(n+1),n=1..infinity)</tt>.
<p>
More helps on how to enter mathematical expressions are in
!href target=wims_help module=help/main&chapter=1&open=1_math#math this page
.
<p>
To show a matrix
!insmath [1,2,3;4,5,6;7,8,9]
, you should type <tt>\([1,2,3;4,5,6;7,8,9])</tt>. Nested matrices are
accepted (and will be rendered correctly).
<p>
For experts in TeX or LaTeX, please notice that whenever the software sees a formula
enclosed in a pair of parentheses preceded by <tt>\</tt> which contains
backslashes, it will interpret it as a TeX source, and will directly try to
format it by TeX. This will allow you to write very sophisticated formulas if
you know how to write them in the TeX way.
<p>
And the most complete way to use TeX in your exercise is to choose
!href cmd=help&special_parm=format TeX format
(for the statement only).