News
Index
Working with MUMIE as author
- Initial steps:
- Articles:
- Problems:
- Programming with Python
- Visualizations with JSXGraph
- Media Documents:
Working with MUMIE as teacher
Using MUMIE via plugin in local LMS
FAQ
You're not logged in
Working with MUMIE as author
Working with MUMIE as teacher
Using MUMIE via plugin in local LMS
FAQ
In a MUMIE TeX problem document you may use the \function
command within a variables section to define a variable of type function.
Syntax:
\function{ function_name }{ expression }
Example:
1234 \begin{variables}
\number{a}{-2}
\function{f}{a*x^2+2}
\end{variables}
This introduces first a number variable $$a$$ with value $$-2$$, and then a function variable $$f$$ with value $$-2x²+2$$, considering that a is assigned the value $$-2$$.
More generally: An expression in a MUMIE problem is by definition:
Definition
\field
Expressions usable in the definition of functions
expr
is an expression, then so is (expr)
expr
is an expression, then so is - expr
expr1
and expr2
are expressions, then expr1 + expr2
is an expression-
*
/
^
mod
expr
is an expression, then so is sqrt(expr)
, denoting the square rootcbrt()
-cubic rootsin()
cos()
tan()
cot()
sinh()
cosh()
tanh()
coth()
arcsin()
arccos()
arctan()
arccot()
arsinh()
arcosh()
artanh()
arcoth()
ln()
log()
exp()
log_{base}()
(note: base must be integer or Euler number)abs()
for absolute value, fac()
for integer factorial function, floor()
math floor, re()
im()
conj()
for complex real and imaginary part and complex conjugate,sign()
dirac()
theta()
to denote the signum, Dirac delta and heaviside functions. Note: If the number field is complex or complex-rational, those functions are only defined if the imaginary part of the argument is zero.expr
is an expression, then so is |expr|
as an alternative for abs(expr)
expr
is an expression and n is a positive integer, than expr_#n
is an alternative way to write expr^(1/n)
Remarks:
expr1 * expr2
is in general not the product of both expressions as seen by the example a+b*c+d
mod
denotes the modulo operator; e.g. $$4$$ $$mod$$ $$3 = 1$$, $$3.5$$ $$mod$$ $$1.5 = 0.5$$, $$-3.5$$ $$mod$$ $$1.5 = -0.5$$\function
command are expected to define functions on $$R, N, Q$$ or, possibly, $$C$$,\function{ function_name }{ expression }
should use at most one more variable than defined in theThe \checkFuncForZero
command is used to check a functional of user defined functions for being zero numerically.
User defined functions are e.g. defined by the student's inputs via the command \inputAsFunction
. The corresponding inputs can be
checked by the corrector program using the criterion delivered by \checkFuncForZero
.
Syntax:
\checkFuncForZero{ functionial_expression }{ lower_check_bound }{ upper_check_bound }{ number_checkpoints }
A functional_expression is in principle an expression in the occuring functions which may be subject to the usual arithmetic
operations and additionally composition and derivation operations.
So the definition of an expression as above is extended by the following:
\inputAsFunction
command in the same question block is a functional expression\function
command or by an \inputAsFunction
This defines, what a syntactically correct functional expression is.
Hence in particular you may use
\number
or \randint
\function
\inputAsFunction
Examples:
f[g]
, if $$f$$ and $$g$$ are function namessin(f)
, if f is a function namef[sin(x)]
, if f is a function nameD[D[f]]
, if f is a function namef[x^3+a*x+b]
, if f is a function's name and a is a declared number variable or function variableThe \randadjustIf
command is used to redefine number variables which had been declared by\randint
in order to avoid certain unfavorable combinations of variables.
Syntax:
\randadjustIf{ list_of_variables }{ avoidance_relation }
We define, what a relation is:
Observe the precedence rules: NOT precedes AND precedes OR.
Also, bear in mind, that we are talking about avoidance relations in the context of \randadjustIf
, so in the example
123 \randint{a}{2}{20}
\randint[Z]{b}{-20}{20}
\randadjustIf{a,b}{a=b}
the result are random parameters a and b which are different. Remember that the [Z]-flag instructs the compiler to
avoid zero for b. So this example yields the same result as
123 \randint{a}{2}{20}
\randint{b}{-20}{20}
\randadjustIf{a,b}{a=b OR b=0}
Updated by Michael Heimann, 2 years, 10 months ago – a38bf11