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.
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +2 -0
- package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts +2 -0
- package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +203 -0
- package/lib/exercises/math/derivation/variations/signVarTableTrinom.d.ts +9 -0
- package/lib/exercises/math/derivation/variations/signVarTableTrinom.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableTrinom.js +148 -0
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +1 -4
- package/lib/exercises/math/functions/index.d.ts +1 -0
- package/lib/exercises/math/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/index.js +1 -0
- package/lib/exercises/math/functions/inverse/compareInverseValues.d.ts.map +1 -1
- package/lib/exercises/math/functions/inverse/compareInverseValues.js +1 -10
- package/lib/exercises/math/functions/periodicity/index.d.ts +2 -0
- package/lib/exercises/math/functions/periodicity/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/periodicity/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/equation/index.d.ts +2 -0
- package/lib/exercises/math/functions/trinoms/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.d.ts +11 -0
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.js +205 -0
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.js +78 -13
- package/lib/exercises/math/functions/trinoms/equation/solveBisquaredEquation.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/equation/solveBisquaredEquation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/equation/solveBisquaredEquation.js +223 -0
- package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.js +3 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +1 -0
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +27 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts +4 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.js +133 -11
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts +4 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +135 -14
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/findTrinomCanonicalFormFromGraph.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/findTrinomCanonicalFormFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/findTrinomCanonicalFormFromGraph.js +123 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.js +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.js +1 -1
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +2 -2
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +17 -11
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +25 -14
- package/lib/exercises/math/probaStat/randomVariable/randomVariableValues.d.ts +2 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableValues.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableValues.js +83 -0
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +12 -0
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +30 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts +4 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +45 -20
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.d.ts +4 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.js +43 -9
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +35 -0
- package/lib/exercises/math/sequences/index.d.ts +1 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +2 -0
- package/lib/exercises/math/sequences/limits/index.d.ts +2 -0
- package/lib/exercises/math/sequences/limits/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/limits/index.js +1 -0
- package/lib/exercises/math/sequences/limits/sequenceLimitReading.d.ts +2 -0
- package/lib/exercises/math/sequences/limits/sequenceLimitReading.d.ts.map +1 -0
- package/lib/exercises/math/sequences/limits/sequenceLimitReading.js +163 -0
- package/lib/exercises/math/sequences/variations/expressConsecutiveTermsDifference.d.ts +11 -0
- package/lib/exercises/math/sequences/variations/expressConsecutiveTermsDifference.d.ts.map +1 -0
- package/lib/exercises/math/sequences/variations/expressConsecutiveTermsDifference.js +160 -0
- package/lib/exercises/math/sequences/variations/index.d.ts +2 -0
- package/lib/exercises/math/sequences/variations/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/variations/index.js +1 -0
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +2 -2
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +0 -1
- package/lib/exercises/math/trigonometry/circle/findAssociateAnglePointOnTrigoCircle.d.ts +8 -0
- package/lib/exercises/math/trigonometry/circle/findAssociateAnglePointOnTrigoCircle.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/findAssociateAnglePointOnTrigoCircle.js +158 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts +2 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/index.js +2 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +8 -3
- package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts +8 -0
- package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.js +167 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +2 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.js +4 -0
- package/lib/exercises/vea/numberVEA.d.ts +1 -1
- package/lib/exercises/vea/numberVEA.d.ts.map +1 -1
- package/lib/exercises/vea/numberVEA.js +7 -2
- package/lib/exercises/vea/signLineVEA.d.ts +8 -0
- package/lib/exercises/vea/signLineVEA.d.ts.map +1 -0
- package/lib/exercises/vea/signLineVEA.js +9 -0
- package/lib/exercises/vea/signTableVEA.d.ts +2 -0
- package/lib/exercises/vea/signTableVEA.d.ts.map +1 -0
- package/lib/exercises/vea/signTableVEA.js +5 -0
- package/lib/exercises/vea/varLineVEA.d.ts +8 -0
- package/lib/exercises/vea/varLineVEA.d.ts.map +1 -0
- package/lib/exercises/vea/varLineVEA.js +44 -0
- package/lib/exercises/vea/varSignTableVEA.d.ts +2 -0
- package/lib/exercises/vea/varSignTableVEA.d.ts.map +1 -0
- package/lib/exercises/vea/varSignTableVEA.js +8 -0
- package/lib/exercises/vea/varTableVEA.d.ts +2 -0
- package/lib/exercises/vea/varTableVEA.d.ts.map +1 -0
- package/lib/exercises/vea/varTableVEA.js +6 -0
- package/lib/exercises/vea/xTableLineVEA.d.ts +8 -0
- package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -0
- package/lib/exercises/vea/xTableLineVEA.js +18 -0
- package/lib/index.d.ts +40 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.d.ts +1 -1
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +4 -2
- package/lib/math/polynomials/trinom.d.ts +1 -1
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +2 -2
- 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 @@
|
|
|
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 @@
|
|
|
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,
|
|
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
|
};
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareInverseValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/inverse/compareInverseValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
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 @@
|
|
|
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";
|
package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.d.ts
ADDED
|
@@ -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
|
package/lib/exercises/math/functions/trinoms/equation/secondDegreeEquationWithRightMember.d.ts.map
ADDED
|
@@ -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"}
|