math-exercises 3.0.167 → 3.0.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
  2. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  3. package/lib/exercises/math/derivation/variations/index.js +2 -0
  4. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts +2 -0
  5. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts.map +1 -0
  6. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +203 -0
  7. package/lib/exercises/math/derivation/variations/signVarTableTrinom.d.ts +9 -0
  8. package/lib/exercises/math/derivation/variations/signVarTableTrinom.d.ts.map +1 -0
  9. package/lib/exercises/math/derivation/variations/signVarTableTrinom.js +148 -0
  10. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
  11. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +1 -4
  12. package/lib/exercises/math/functions/index.d.ts +1 -0
  13. package/lib/exercises/math/functions/index.d.ts.map +1 -1
  14. package/lib/exercises/math/functions/index.js +1 -0
  15. package/lib/exercises/math/functions/inverse/compareInverseValues.d.ts.map +1 -1
  16. package/lib/exercises/math/functions/inverse/compareInverseValues.js +1 -10
  17. package/lib/exercises/math/functions/periodicity/index.d.ts +2 -0
  18. package/lib/exercises/math/functions/periodicity/index.d.ts.map +1 -0
  19. package/lib/exercises/math/functions/periodicity/index.js +1 -0
  20. package/lib/exercises/math/functions/trinoms/equation/index.d.ts +2 -0
  21. package/lib/exercises/math/functions/trinoms/equation/index.d.ts.map +1 -1
  22. package/lib/exercises/math/functions/trinoms/equation/index.js +2 -0
  23. package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.d.ts +11 -0
  24. package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.d.ts.map +1 -0
  25. package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.js +205 -0
  26. package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.d.ts.map +1 -1
  27. package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.js +78 -13
  28. package/lib/exercises/math/functions/trinoms/equation/solveBisquaredEquation.d.ts +9 -0
  29. package/lib/exercises/math/functions/trinoms/equation/solveBisquaredEquation.d.ts.map +1 -0
  30. package/lib/exercises/math/functions/trinoms/equation/solveBisquaredEquation.js +223 -0
  31. package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.d.ts.map +1 -1
  32. package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.js +3 -1
  33. package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
  34. package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +1 -0
  35. package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
  36. package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +27 -1
  37. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts +4 -1
  38. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts.map +1 -1
  39. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.js +133 -11
  40. package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts +4 -1
  41. package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
  42. package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +135 -14
  43. package/lib/exercises/math/functions/trinoms/summitAndCanonical/findTrinomCanonicalFormFromGraph.d.ts +9 -0
  44. package/lib/exercises/math/functions/trinoms/summitAndCanonical/findTrinomCanonicalFormFromGraph.d.ts.map +1 -0
  45. package/lib/exercises/math/functions/trinoms/summitAndCanonical/findTrinomCanonicalFormFromGraph.js +123 -0
  46. package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts +1 -0
  47. package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts.map +1 -1
  48. package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.js +1 -0
  49. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.js +1 -1
  50. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +2 -2
  51. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts +1 -1
  52. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  53. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +17 -11
  54. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
  55. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +25 -14
  56. package/lib/exercises/math/probaStat/randomVariable/randomVariableValues.d.ts +2 -0
  57. package/lib/exercises/math/probaStat/randomVariable/randomVariableValues.d.ts.map +1 -0
  58. package/lib/exercises/math/probaStat/randomVariable/randomVariableValues.js +83 -0
  59. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +12 -0
  60. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -0
  61. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +30 -0
  62. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
  63. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +1 -1
  64. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts +4 -1
  65. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
  66. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +45 -20
  67. package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.d.ts +4 -1
  68. package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.d.ts.map +1 -1
  69. package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.js +43 -9
  70. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
  71. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +35 -0
  72. package/lib/exercises/math/sequences/index.d.ts +1 -0
  73. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  74. package/lib/exercises/math/sequences/index.js +2 -0
  75. package/lib/exercises/math/sequences/limits/index.d.ts +2 -0
  76. package/lib/exercises/math/sequences/limits/index.d.ts.map +1 -0
  77. package/lib/exercises/math/sequences/limits/index.js +1 -0
  78. package/lib/exercises/math/sequences/limits/sequenceLimitReading.d.ts +2 -0
  79. package/lib/exercises/math/sequences/limits/sequenceLimitReading.d.ts.map +1 -0
  80. package/lib/exercises/math/sequences/limits/sequenceLimitReading.js +163 -0
  81. package/lib/exercises/math/sequences/variations/expressConsecutiveTermsDifference.d.ts +11 -0
  82. package/lib/exercises/math/sequences/variations/expressConsecutiveTermsDifference.d.ts.map +1 -0
  83. package/lib/exercises/math/sequences/variations/expressConsecutiveTermsDifference.js +160 -0
  84. package/lib/exercises/math/sequences/variations/index.d.ts +2 -0
  85. package/lib/exercises/math/sequences/variations/index.d.ts.map +1 -0
  86. package/lib/exercises/math/sequences/variations/index.js +1 -0
  87. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +2 -2
  88. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -1
  89. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +0 -1
  90. package/lib/exercises/math/trigonometry/circle/findAssociateAnglePointOnTrigoCircle.d.ts +8 -0
  91. package/lib/exercises/math/trigonometry/circle/findAssociateAnglePointOnTrigoCircle.d.ts.map +1 -0
  92. package/lib/exercises/math/trigonometry/circle/findAssociateAnglePointOnTrigoCircle.js +158 -0
  93. package/lib/exercises/math/trigonometry/circle/index.d.ts +2 -0
  94. package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -1
  95. package/lib/exercises/math/trigonometry/circle/index.js +2 -0
  96. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -1
  97. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +8 -3
  98. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts +8 -0
  99. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts.map +1 -0
  100. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.js +167 -0
  101. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +2 -0
  102. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
  103. package/lib/exercises/utils/geogebra/toolBarConstructor.js +4 -0
  104. package/lib/exercises/vea/numberVEA.d.ts +1 -1
  105. package/lib/exercises/vea/numberVEA.d.ts.map +1 -1
  106. package/lib/exercises/vea/numberVEA.js +7 -2
  107. package/lib/exercises/vea/signLineVEA.d.ts +8 -0
  108. package/lib/exercises/vea/signLineVEA.d.ts.map +1 -0
  109. package/lib/exercises/vea/signLineVEA.js +9 -0
  110. package/lib/exercises/vea/signTableVEA.d.ts +2 -0
  111. package/lib/exercises/vea/signTableVEA.d.ts.map +1 -0
  112. package/lib/exercises/vea/signTableVEA.js +5 -0
  113. package/lib/exercises/vea/varLineVEA.d.ts +8 -0
  114. package/lib/exercises/vea/varLineVEA.d.ts.map +1 -0
  115. package/lib/exercises/vea/varLineVEA.js +44 -0
  116. package/lib/exercises/vea/varSignTableVEA.d.ts +2 -0
  117. package/lib/exercises/vea/varSignTableVEA.d.ts.map +1 -0
  118. package/lib/exercises/vea/varSignTableVEA.js +8 -0
  119. package/lib/exercises/vea/varTableVEA.d.ts +2 -0
  120. package/lib/exercises/vea/varTableVEA.d.ts.map +1 -0
  121. package/lib/exercises/vea/varTableVEA.js +6 -0
  122. package/lib/exercises/vea/xTableLineVEA.d.ts +8 -0
  123. package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -0
  124. package/lib/exercises/vea/xTableLineVEA.js +18 -0
  125. package/lib/index.d.ts +40 -5
  126. package/lib/index.d.ts.map +1 -1
  127. package/lib/math/polynomials/polynomial.d.ts +1 -1
  128. package/lib/math/polynomials/polynomial.d.ts.map +1 -1
  129. package/lib/math/polynomials/polynomial.js +4 -2
  130. package/lib/math/polynomials/trinom.d.ts +1 -1
  131. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  132. package/lib/math/polynomials/trinom.js +2 -2
  133. package/package.json +1 -1
@@ -4,4 +4,5 @@ export * from "./variationArrowAmount.js";
4
4
  export * from "./readExtremaAbscissFromDerivativeCurve.js";
5
5
  export * from "./signVarTableFromGraph.js";
6
6
  export * from "./signVarTableFromDerivativeGraph.js";
7
+ export * from "./signVarTableTrinom.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC"}
@@ -4,3 +4,5 @@ export * from "./variationArrowAmount.js";
4
4
  export * from "./readExtremaAbscissFromDerivativeCurve.js";
5
5
  export * from "./signVarTableFromGraph.js";
6
6
  export * from "./signVarTableFromDerivativeGraph.js";
7
+ export * from "./signVarTableTrinom.js";
8
+ // export * from "./signVarTable3dDegree.js";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signVarTable3dDegree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signVarTable3dDegree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTable3dDegree.ts"],"names":[],"mappings":""}
@@ -0,0 +1,203 @@
1
+ // import {
2
+ // Exercise,
3
+ // QuestionGenerator,
4
+ // GetHint,
5
+ // GetCorrection,
6
+ // GetInstruction,
7
+ // GetKeys,
8
+ // GetQuestionFromIdentifiers,
9
+ // GetAnswerTable,
10
+ // TableVEA,
11
+ // } from "../../../../exercises/exercise.js";
12
+ // import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
13
+ // import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
14
+ // import { Trinom, TrinomConstructor } from "../../../../math/polynomials/trinom.js";
15
+ // import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
16
+ // import { add } from "../../../../tree/nodes/operators/addNode.js";
17
+ // import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
18
+ // import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
19
+ // import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
20
+ // import { alignTex } from "../../../../utils/latex/alignTex.js";
21
+ export {};
22
+ // //coeff de f'
23
+ // type Identifiers = {
24
+ // a: number;
25
+ // b: number;
26
+ // c: number;
27
+ // };
28
+ // const getAnswerTable: GetAnswerTable<Identifiers> = (identifiers) => {
29
+ // const { a, b, c } = identifiers;
30
+ // const trinom = new Trinom(a, b, c);
31
+ // const poly = trinom.integrateToNode({}, true);
32
+ // const roots = trinom.getRootsNode();
33
+ // const imgs = roots.map((r) =>
34
+ // poly
35
+ // .toDetailedEvaluation({
36
+ // x: r,
37
+ // })
38
+ // .simplify({
39
+ // calculatePowers: true,
40
+ // }),
41
+ // );
42
+ // return [
43
+ // [
44
+ // "$x$",
45
+ // "-\\infty",
46
+ // "\\ ",
47
+ // roots[0].toTex(),
48
+ // "\\ ",
49
+ // roots[1].toTex(),
50
+ // "\\ ",
51
+ // "+\\infty",
52
+ // ],
53
+ // [
54
+ // "$f'(x)$",
55
+ // "\\ ",
56
+ // a > 0 ? "+" : "-",
57
+ // "0",
58
+ // a > 0 ? "-" : "+",
59
+ // "0",
60
+ // a > 0 ? "+" : "-",
61
+ // "\\ ",
62
+ // ],
63
+ // [
64
+ // "$\\ $",
65
+ // "\\ ",
66
+ // "\\ ",
67
+ // a > 0 ? imgs[0].toTex() : "\\ ",
68
+ // "\\ ",
69
+ // a < 0 ? imgs[1].toTex() : "\\ ",
70
+ // "\\ ",
71
+ // "\\ ",
72
+ // ],
73
+ // [
74
+ // "$f(x)$",
75
+ // "\\ ",
76
+ // a > 0 ? "\\nearrow" : "\\searrow",
77
+ // "\\ ",
78
+ // a > 0 ? "\\searrow" : "\\nearrow",
79
+ // "\\ ",
80
+ // a > 0 ? "\\nearrow" : "\\searrow",
81
+ // "\\ ",
82
+ // ],
83
+ // [
84
+ // "$\\ $",
85
+ // "\\ ",
86
+ // "\\ ",
87
+ // a < 0 ? imgs[0].toTex() : "\\ ",
88
+ // "\\ ",
89
+ // a > 0 ? imgs[1].toTex() : "\\ ",
90
+ // "\\ ",
91
+ // "\\ ",
92
+ // ],
93
+ // ];
94
+ // };
95
+ // const getInstruction: GetInstruction<Identifiers> = (identifiers) => {
96
+ // const { a, b, c } = identifiers;
97
+ // const trinom = new Trinom(a, b, c);
98
+ // const poly = trinom.integrateToNode({}, true);
99
+ // return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
100
+ // $$
101
+ // f(x) = ${poly.toTex()}
102
+ // $$
103
+ // Dresser le tableau de signes de $f'$ et de variations de $f$.
104
+ // `;
105
+ // };
106
+ // const getHint: GetHint<Identifiers> = () => {
107
+ // return `Commence par déterminer la fonction dérivée $f'$ de $f$. Puis, étudie le signe de $f'$ en résolvant l'inéquation $f'(x)\\geq 0$.
108
+ // Enfin, sers-toi de la propriété suivante :
109
+ // - si $f'$ est positive sur un intervalle $I$, alors $f$ est croissante sur $I$;
110
+ // - si $f'$ est négative sur un intervalle $I$, alors $f$ est décroissante sur $I$.`;
111
+ // };
112
+ // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
113
+ // const { a, b, c } = identifiers;
114
+ // const trinom = new Trinom(a, b, c);
115
+ // const poly = trinom.integrateToNode({}, true);
116
+ // const roots = trinom.getRootsNode();
117
+ // const imgs = roots.map((r) =>
118
+ // poly
119
+ // .toDetailedEvaluation({
120
+ // x: r,
121
+ // })
122
+ // .simplify({
123
+ // calculatePowers: true,
124
+ // }),
125
+ // );
126
+ // const words =
127
+ // a > 0 ? ["décroissante", "croissante"] : ["croissante", "décroissante"];
128
+ // const signWords = a > 0 ? ["négative", "positive"] : ["positive", "négative"];
129
+ // return `On calcule $f'$ :
130
+ // $$
131
+ // f'(x) = ${poly.derivative().toTex()} = ${poly.derivative().simplify().toTex()}
132
+ // $$
133
+ // On détermine ensuite le signe de $f'(x)$ :
134
+ // ${alignTex([
135
+ // ["", "f'(x) \\geq 0"],
136
+ // [
137
+ // "\\iff",
138
+ // add(multiply(2, multiply(a, "x")), b)
139
+ // .simplify()
140
+ // .toTex() + "\\geq 0",
141
+ // ],
142
+ // ["\\iff", "x" + (a > 0 ? "\\geq" : "\\leq")],
143
+ // ])}
144
+ // `;
145
+ // };
146
+ // const getKeys: GetKeys<Identifiers> = () => {
147
+ // return ["infty"];
148
+ // };
149
+ // const isAnswerTableValid: TableVEA<Identifiers> = (ans, { answerTable }) => {
150
+ // try {
151
+ // return varSignTableVEA(ans, answerTable);
152
+ // } catch (err) {
153
+ // return handleVEAError(err);
154
+ // }
155
+ // };
156
+ // const getSignVarTableTrinomQuestion: QuestionGenerator<Identifiers> = () => {
157
+ // const trinom = TrinomConstructor.randomNiceRoots();
158
+ // const identifiers: Identifiers = {
159
+ // a: trinom.a,
160
+ // b: trinom.b,
161
+ // c: trinom.c,
162
+ // };
163
+ // return getQuestionFromIdentifiers(identifiers);
164
+ // };
165
+ // const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<Identifiers> = (
166
+ // identifiers,
167
+ // ) => {
168
+ // return {
169
+ // answerTable: getAnswerTable(identifiers),
170
+ // instruction: getInstruction(identifiers),
171
+ // keys: getKeys(identifiers),
172
+ // answerFormat: "tex",
173
+ // identifiers,
174
+ // hint: getHint(identifiers),
175
+ // correction: getCorrection(identifiers),
176
+ // initTable: [
177
+ // ["$x$", "", "\\ ", "", "\\ ", "", "\\ ", ""],
178
+ // ["$f'(x)$", "\\ ", "", "", "", "", "", "\\ "],
179
+ // ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
180
+ // ["$f(x)$", "\\ ", "", "", "", "", "", "\\ "],
181
+ // ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
182
+ // ],
183
+ // };
184
+ // };
185
+ // export const signVarTable3dDegree: Exercise<Identifiers> = {
186
+ // id: "signVarTable3dDegree",
187
+ // label:
188
+ // "Dresser le tableau de signes de $f'$ et de variations de $f$ pour une fonction polynôme de degré trois",
189
+ // isSingleStep: true,
190
+ // generator: (nb, opts) =>
191
+ // getDistinctQuestions(() => getSignVarTableTrinomQuestion(opts), nb),
192
+ // qcmTimer: 60,
193
+ // freeTimer: 60,
194
+ // isAnswerTableValid,
195
+ // subject: "Mathématiques",
196
+ // getInstruction,
197
+ // getHint,
198
+ // getCorrection,
199
+ // getAnswerTable,
200
+ // getQuestionFromIdentifiers,
201
+ // hasHintAndCorrection: true,
202
+ // answerType: "signVarTable",
203
+ // };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ c: number;
6
+ };
7
+ export declare const signVarTableTrinom: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=signVarTableTrinom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signVarTableTrinom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableTrinom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwIF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAkBpD,CAAC"}
@@ -0,0 +1,148 @@
1
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
3
+ import { Trinom, TrinomConstructor } from "../../../../math/polynomials/trinom.js";
4
+ import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
5
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
6
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
7
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
9
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
10
+ const getAnswerTable = (identifiers) => {
11
+ const { a, b, c } = identifiers;
12
+ const trinom = new Trinom(a, b, c);
13
+ const root = frac(opposite(b), multiply(2, a)).simplify();
14
+ const img = trinom
15
+ .toTree()
16
+ .toDetailedEvaluation({
17
+ x: root,
18
+ })
19
+ .simplify();
20
+ return [
21
+ ["$x$", "-\\infty", "\\ ", root.toTex(), "\\ ", "+\\infty"],
22
+ ["$f'(x)$", "\\ ", a > 0 ? "-" : "+", "0", a > 0 ? "+" : "-", "\\ "],
23
+ ["$\\ $", "\\ ", "\\ ", a < 0 ? img.toTex() : "\\ ", "\\ ", "\\ "],
24
+ [
25
+ "$f(x)$",
26
+ "\\ ",
27
+ a > 0 ? "\\searrow" : "\\nearrow",
28
+ "\\ ",
29
+ a < 0 ? "\\searrow" : "\\nearrow",
30
+ "\\ ",
31
+ ],
32
+ ["$\\ $", "\\ ", "\\ ", a > 0 ? img.toTex() : "\\ ", "\\ ", "\\ "],
33
+ ];
34
+ };
35
+ const getInstruction = (identifiers) => {
36
+ const { a, b, c } = identifiers;
37
+ const trinom = new Trinom(a, b, c);
38
+ return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
39
+
40
+ $$
41
+ f(x) = ${trinom.toTree().toTex()}
42
+ $$
43
+
44
+ Dresser le tableau de signes de $f'$ et de variations de $f$.
45
+
46
+ `;
47
+ };
48
+ const getHint = () => {
49
+ return `Commence par déterminer la fonction dérivée $f'$ de $f$. Puis, étudie le signe de $f'$ en résolvant l'inéquation $f'(x)\\geq 0$.
50
+
51
+ Enfin, sers-toi de la propriété suivante :
52
+
53
+ - si $f'$ est positive sur un intervalle $I$, alors $f$ est croissante sur $I$;
54
+ - si $f'$ est négative sur un intervalle $I$, alors $f$ est décroissante sur $I$.`;
55
+ };
56
+ const getCorrection = (identifiers) => {
57
+ const { a, b, c } = identifiers;
58
+ const root = frac(opposite(b), multiply(2, a)).simplify();
59
+ const rootTex = root.toTex();
60
+ const words = a > 0 ? ["décroissante", "croissante"] : ["croissante", "décroissante"];
61
+ const signWords = a > 0 ? ["négative", "positive"] : ["positive", "négative"];
62
+ const image = new Trinom(a, b, c).toTree().toDetailedEvaluation({
63
+ x: root,
64
+ });
65
+ return `On calcule $f'$ :
66
+
67
+ $$
68
+ f'(x) = ${add(multiply(2, multiply(a, "x")), b).toSimplificationTex()}
69
+ $$
70
+
71
+ On détermine ensuite le signe de $f'(x)$ :
72
+
73
+ ${alignTex([
74
+ ["", "f'(x) \\geq 0"],
75
+ [
76
+ "\\iff",
77
+ add(multiply(2, multiply(a, "x")), b)
78
+ .simplify()
79
+ .toTex() + "\\geq 0",
80
+ ],
81
+ ["\\iff", "x" + (a > 0 ? "\\geq" : "\\leq") + rootTex],
82
+ ])}
83
+
84
+ $f'$ est donc ${signWords[0]} sur $]-\\infty; ${rootTex}]$, puis ${signWords[1]} sur $[${rootTex}; +\\infty[$.
85
+
86
+ On en conclut que $f$ est ${words[0]} sur $]-\\infty; ${rootTex}]$, puis ${words[1]} sur $[${rootTex}; +\\infty[$.
87
+
88
+ Pour compléter le tableau, il ne reste plus qu'à calculer l'image par $f$ de $${rootTex}$ :
89
+
90
+ $$
91
+ f\\left(${rootTex}\\right) = ${image.toTex()} = ${image.simplify().toTex()}
92
+ $$`;
93
+ };
94
+ const getKeys = () => {
95
+ return ["infty"];
96
+ };
97
+ const isAnswerTableValid = (ans, { answerTable }) => {
98
+ try {
99
+ return varSignTableVEA(ans, answerTable);
100
+ }
101
+ catch (err) {
102
+ return handleVEAError(err);
103
+ }
104
+ };
105
+ const getSignVarTableTrinomQuestion = () => {
106
+ const trinom = TrinomConstructor.randomCanonical();
107
+ const identifiers = {
108
+ a: trinom.a,
109
+ b: trinom.b,
110
+ c: trinom.c,
111
+ };
112
+ return getQuestionFromIdentifiers(identifiers);
113
+ };
114
+ const getQuestionFromIdentifiers = (identifiers) => {
115
+ return {
116
+ answerTable: getAnswerTable(identifiers),
117
+ instruction: getInstruction(identifiers),
118
+ keys: getKeys(identifiers),
119
+ answerFormat: "tex",
120
+ identifiers,
121
+ hint: getHint(identifiers),
122
+ correction: getCorrection(identifiers),
123
+ initTable: [
124
+ ["$x$", "", "\\ ", "", "\\ ", ""],
125
+ ["$f'(x)$", "\\ ", "", "", "", "\\ "],
126
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
127
+ ["$f(x)$", "\\ ", "", "", "", "\\ "],
128
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
129
+ ],
130
+ };
131
+ };
132
+ export const signVarTableTrinom = {
133
+ id: "signVarTableTrinom",
134
+ label: "Dresser le tableau de signes de $f'$ et de variations de $f$ pour une fonction polynôme du second degré",
135
+ isSingleStep: true,
136
+ generator: (nb, opts) => getDistinctQuestions(() => getSignVarTableTrinomQuestion(opts), nb),
137
+ qcmTimer: 60,
138
+ freeTimer: 60,
139
+ isAnswerTableValid,
140
+ subject: "Mathématiques",
141
+ getInstruction,
142
+ getHint,
143
+ getCorrection,
144
+ getAnswerTable,
145
+ getQuestionFromIdentifiers,
146
+ hasHintAndCorrection: true,
147
+ answerType: "signVarTable",
148
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"affineAdjustmentComplete.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustmentComplete.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgKF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAalE,CAAC"}
1
+ {"version":3,"file":"affineAdjustmentComplete.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustmentComplete.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA4JF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAalE,CAAC"}
@@ -94,9 +94,6 @@ const getPropositions = (n, { answer, xValues, yValues }) => {
94
94
  });
95
95
  return shuffleProps(propositions, n);
96
96
  };
97
- const isAnswerValid = (ans, { answer }) => {
98
- return ans === answer;
99
- };
100
97
  export const affineAdjustmentCompleteExercise = {
101
98
  id: "affineAdjustmentComplete",
102
99
  label: "Déterminer l'équation de la droite d'ajustement et le coefficient de détermination",
@@ -105,7 +102,7 @@ export const affineAdjustmentCompleteExercise = {
105
102
  qcmTimer: 60,
106
103
  freeTimer: 60,
107
104
  getPropositions,
108
- isAnswerValid,
109
105
  subject: "Mathématiques",
110
106
  getQuestionFromIdentifiers,
107
+ answerType: "QCU",
111
108
  };
@@ -16,4 +16,5 @@ export * from "./sqrt/index.js";
16
16
  export * from "./inverse/index.js";
17
17
  export * from "./composition/index.js";
18
18
  export * from "./linear/index.js";
19
+ export * from "./periodicity/index.js";
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
@@ -16,3 +16,4 @@ export * from "./sqrt/index.js";
16
16
  export * from "./inverse/index.js";
17
17
  export * from "./composition/index.js";
18
18
  export * from "./linear/index.js";
19
+ export * from "./periodicity/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"compareInverseValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/inverse/compareInverseValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAsIF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
1
+ {"version":3,"file":"compareInverseValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/inverse/compareInverseValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAI7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AA8HF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
@@ -5,7 +5,6 @@ import { randint } from "../../../../math/utils/random/randint.js";
5
5
  import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
6
6
  import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
7
7
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
8
- import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
9
8
  const getPropositions = (n, { answer }) => {
10
9
  const propositions = [];
11
10
  const symbols = ["<", "=", ">"];
@@ -64,14 +63,6 @@ $$
64
63
  `;
65
64
  };
66
65
  const getKeys = () => [];
67
- const isAnswerValid = (ans, { answer }) => {
68
- try {
69
- return ans === answer;
70
- }
71
- catch (err) {
72
- return handleVEAError(err);
73
- }
74
- };
75
66
  function randBetween(isInteger, min, max, roundTo, excludes) {
76
67
  if (isInteger) {
77
68
  return randint(min, max, excludes);
@@ -123,7 +114,6 @@ export const compareInverseValues = {
123
114
  qcmTimer: 60,
124
115
  freeTimer: 60,
125
116
  getPropositions,
126
- isAnswerValid,
127
117
  subject: "Mathématiques",
128
118
  getInstruction,
129
119
  getHint,
@@ -131,4 +121,5 @@ export const compareInverseValues = {
131
121
  getAnswer,
132
122
  getQuestionFromIdentifiers,
133
123
  hasHintAndCorrection: true,
124
+ answerType: "QCU",
134
125
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/periodicity/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -4,4 +4,6 @@ export * from "./solveSecondDegreeEquationByFactorisation.js";
4
4
  export * from "./solveSecondDegreeEquationFromCano.js";
5
5
  export * from "./trinomSelectEquationWithoutDeltaNeeded.js";
6
6
  export * from "./solveSecondDegreeEquationEqualsC.js";
7
+ export * from "./secondDegreeEquationWithRightMember.js";
8
+ export * from "./solveBisquaredEquation.js";
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,6BAA6B,CAAC"}
@@ -4,3 +4,5 @@ export * from "./solveSecondDegreeEquationByFactorisation.js";
4
4
  export * from "./solveSecondDegreeEquationFromCano.js";
5
5
  export * from "./trinomSelectEquationWithoutDeltaNeeded.js";
6
6
  export * from "./solveSecondDegreeEquationEqualsC.js";
7
+ export * from "./secondDegreeEquationWithRightMember.js";
8
+ export * from "./solveBisquaredEquation.js";
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ fCoeffs: number[];
4
+ gCoeffs: number[];
5
+ };
6
+ type Options = {
7
+ gType: "Affine" | "Trinôme" | "L'un ou l'autre";
8
+ };
9
+ export declare const secondDegreeEquationWithRightMember: Exercise<Identifiers, Options>;
10
+ export {};
11
+ //# sourceMappingURL=secondDegreeEquationWithRightMember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secondDegreeEquationWithRightMember.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA8LF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,iBAAiB,CAAC;CACjD,CAAC;AAWF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,WAAW,EACX,OAAO,CAuBR,CAAC"}