Wiki source code of ONYX und MAXIMA

Last modified by Carina Enke on 12.12.2025

Show last authors
1 {{section}}
2 ~{~{column width="60
3 To perform more complex calculations and to fulfill specific requirements, the computer algebra system MAXIMA, which is linked to ONYX, can be used. The [[Netzwerk Mathematik>>url:https://bildungsportal.sachsen.de/opal/auth/RepositoryEntry/5499682817/CourseNode/88308307976325||shape="rect"]] has gathered a number of [[Good-Practice-Examples>>url:https://bildungsportal.sachsen.de/opal/auth/RepositoryEntry/5499682817/CourseNode/93229879750473/||shape="rect"]]. This collection of typical applications, tricks and pitfalls will help you understand how to use the MAXIMA connection in ONYX. Please find below a selection of topics that are described in detail.
4
5
6 ~{~{/column}}
7
8 {{column width="30%"}}
9 {{panel title="Content"}}
10 {{toc start="2"/}}
11 {{/panel}}
12
13 {{panel title="Related Topics"}}
14 * [[Good-Practice-Examples Maxima/ONYX in Netzwerk Mathematik>>url:https://bildungsportal.sachsen.de/opal/auth/RepositoryEntry/5499682817/CourseNode/93229879750473/wiki/Index||shape="rect"]]
15 {{/panel}}
16 {{/column}}
17 {{/section}}
18
19
20 == Calculating with signed variables ==
21
22 {{display reference="ONYX._Include Library.MAXIMA Sammlung.Rechnen mit vorzeichenbehafteten Variablen"/}}
23
24
25 == Analysing user responses with the help of variables ==
26
27 By using maxima queries in the Variables tab, you can access the answer selected by the user and the correct task solution. More details can be found here [[Expert assessment>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Bewertung festlegen.Expertenbewertung.WebHome]].
28
29
30 == Auto-completion of invalid MAXIMA terms ==
31
32 If during the creation or editing process of a variable the user enters a non-valid MAXIMA expression in the field for determining the value, ONYX converts the expression into a valid expression before transferring it to MAXIMA.
33
34
35 === Value of a numerical variable ===
36
37 When determining a numerical (variable) value, the "invalid" calculation defined by the author is completed with a** float command**: float(...);.
38
39 Example
40
41 * The calculation "1+2" is changed to the MAXIMA command "float(1+2);".
42 * The data type of the variable is taken into account for the result regardless of the MAXIMA calculation performed.
43 * If the value of a variable type "Integer" is set by the calculation "1+2", the result value of the MAXIMA calculation is "3.0", the variable value is set accordingly to "3" as an integer value.
44 * Consider possible limits of the value range in the selected data type. If you wish to use the extended data range of integer values, the MAXIMA calculation should be formulated accordingly with a valid expression, for example "2^53+1;".
45 * Exception: Should the "invalid" calculation begin with a float command already, then only the addition of a semicolon is required to complete "invalid" calculations of text-based values.
46
47 {{section}}
48 {{column width="30%"}}
49 [[image:attach:Editor - Variable Maxima_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
50 Entry in the text field
51 {{/column}}
52
53 {{column width="30%"}}
54 [[image:attach:Editor - Variable Maxima1_IMS_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
55 IMS QTI source code view
56 {{/column}}
57
58 {{column width="30%"}}
59 [[image:attach:Player - Variable Maxima1_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
60 Preview display with output of the maxima calculation
61 {{/column}}
62 {{/section}}
63
64
65 === Value of a text variable ===
66
67 When determining a text-based (variable) value, the "invalid" calculation defined by the author is completed with a semicolon.
68
69 Example
70
71 * The entry "a" is changed to the MAXIMA command "a;".
72 * The data type of the variable is taken into account for the result regardless of the MAXIMA calculation performed.
73 * If the value of the variable is set to the type "Text", the result value of the MAXIMA calculation is "a" and the variable value is accordingly set to "a".
74
75 {{section}}
76 {{column width="30%"}}
77 [[image:attach:Editor - Variable Maxima3_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
78 Entry in the text field
79 {{/column}}
80
81 {{column width="30%"}}
82 [[image:attach:Editor - Variable Maxima3_IMS_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
83 IMS QTI source code view
84 {{/column}}
85
86 {{column width="30%"}}
87 [[image:attach:Player - Variable Maxima3_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
88 Preview display with output of the maxima calculation
89 {{/column}}
90 {{/section}}
91
92 * If you require the output of a term instead of the calculation value, the entry must be enclosed by an apostrophe. For example, if the value of the variable is specified as "1+2", the result value of the MAXIMA calculation is "1+2" and the variable value is set to "1+2" accordingly.
93
94 {{section}}
95 {{column width="30%"}}
96 [[image:attach:Editor - Variable Maxima2_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
97 Entry in the text field
98 {{/column}}
99
100 {{column width="30%"}}
101 [[image:attach:Editor - Variable Maxima2_IMS_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
102 IMS QTI source code view
103 {{/column}}
104
105 {{column width="30%"}}
106 [[image:attach:Player - Variable Maxima2_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
107 Preview display with output of the maxima calculation
108 {{/column}}
109 {{/section}}