math-exercises 3.0.176 → 3.0.178
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/readExtremaAbscissFromDerivativeCurve.js +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +233 -0
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +31 -6
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts +1 -3
- package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/index.js +8 -3
- package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts +3 -9
- package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/probabilityTree.js +45 -419
- package/lib/exercises/math/probaStat/trees/probabilityTreeV2.d.ts +25 -0
- package/lib/exercises/math/probaStat/trees/probabilityTreeV2.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/trees/probabilityTreeV2.js +625 -0
- package/lib/exercises/math/python/index.d.ts +1 -0
- package/lib/exercises/math/python/index.d.ts.map +1 -1
- package/lib/exercises/math/python/index.js +1 -0
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +1 -1
- package/lib/exercises/math/sequences/geometric/index.d.ts +6 -2
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +6 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
- package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
- 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 +1 -0
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -1
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +17 -8
- 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 -1
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +57 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/remarkableValues.js +88 -0
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts +5 -0
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +92 -94
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts +11 -0
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +166 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +54 -9
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +54 -8
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +1 -2
- package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/index.js +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
- package/lib/exercises/pc/snellDescartes.js +2 -2
- package/lib/index.d.ts +165 -36
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +8 -5
- package/lib/math/polynomials/affine.d.ts +1 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +5 -0
- package/lib/math/utils/arithmetic/primeFactors.js +1 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +18 -1
- package/lib/math/utils/random/randTupleInt.d.ts +1 -0
- package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
- package/lib/math/utils/random/randTupleInt.js +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +437 -336
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
- package/lib/prototypesEnhancement.d.ts +1 -0
- package/lib/prototypesEnhancement.d.ts.map +1 -1
- package/lib/prototypesEnhancement.js +3 -0
- package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
- package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +6 -3
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +4 -2
- package/lib/tree/parsers/degreeParser.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { randTupleInt } from "../../../../math/utils/random/randTupleInt.js";
|
|
5
|
+
import { cos } from "../../../../tree/nodes/functions/cosNode.js";
|
|
6
|
+
import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
7
|
+
import { sin } from "../../../../tree/nodes/functions/sinNode.js";
|
|
8
|
+
import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
|
|
9
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
10
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
11
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
12
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
13
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
14
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
15
|
+
const getPropositions = (n, { answer }) => {
|
|
16
|
+
const propositions = [];
|
|
17
|
+
addValidProp(propositions, answer);
|
|
18
|
+
propWhile(propositions, n, () => {
|
|
19
|
+
tryToAddWrongProp(propositions, multiply(randint(-5, 5, [0]), (coinFlip() ? cos : sin)("x")).toTex());
|
|
20
|
+
});
|
|
21
|
+
return shuffleProps(propositions, n);
|
|
22
|
+
};
|
|
23
|
+
const buildStatement = (identifiers) => {
|
|
24
|
+
const { a, b, c, d, isCos } = identifiers;
|
|
25
|
+
const fct = isCos ? cos : sin;
|
|
26
|
+
return add(add(multiply(a, fct("x")), multiply(b, fct(opposite("x")))), add(multiply(c, fct(add(PiNode, "x"))), multiply(d, fct(substract(PiNode, "x"))))).simplify({ forbidFactorize: true, noAddOrder: true });
|
|
27
|
+
};
|
|
28
|
+
const getAnswer = (identifiers) => {
|
|
29
|
+
const { a, b, c, d, isCos } = identifiers;
|
|
30
|
+
if (isCos) {
|
|
31
|
+
return multiply(a + b - c - d, cos("x"))
|
|
32
|
+
.simplify()
|
|
33
|
+
.toTex();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return multiply(a - b - c + d, sin("x"))
|
|
37
|
+
.simplify()
|
|
38
|
+
.toTex();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const getInstruction = (identifiers) => {
|
|
42
|
+
return `Simplifier :
|
|
43
|
+
|
|
44
|
+
$$
|
|
45
|
+
${buildStatement(identifiers).toTex()}
|
|
46
|
+
$$`;
|
|
47
|
+
};
|
|
48
|
+
const getHint = () => {
|
|
49
|
+
return `Utilise les propriétés suivantes : pour tout réel $x$,
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
\\cos(-x) = \\cos(x)
|
|
53
|
+
$$
|
|
54
|
+
|
|
55
|
+
$$
|
|
56
|
+
\\sin(-x) = -\\sin(x)
|
|
57
|
+
$$
|
|
58
|
+
|
|
59
|
+
$$
|
|
60
|
+
\\cos(\\pi+x) = -\\cos(x)
|
|
61
|
+
$$
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
\\sin(\\pi+x) = -\\sin(x)
|
|
65
|
+
$$
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
\\cos(\\pi-x) = -\\cos(x)
|
|
69
|
+
$$
|
|
70
|
+
|
|
71
|
+
$$
|
|
72
|
+
\\sin(\\pi-x) = \\sin(x)
|
|
73
|
+
$$
|
|
74
|
+
`;
|
|
75
|
+
};
|
|
76
|
+
const getCorrection = (identifiers) => {
|
|
77
|
+
const { b, c, d, isCos } = identifiers;
|
|
78
|
+
const fct = isCos ? cos : sin;
|
|
79
|
+
let corr = "On simplifie chaque terme : ";
|
|
80
|
+
if (b !== 0) {
|
|
81
|
+
corr += `
|
|
82
|
+
|
|
83
|
+
$$
|
|
84
|
+
${multiply(b, fct(opposite("x"))).toTex()} = ${isCos ? multiply(b, cos("x")).toTex() : multiply(-b, sin("x")).toTex()}
|
|
85
|
+
$$`;
|
|
86
|
+
}
|
|
87
|
+
if (c !== 0) {
|
|
88
|
+
corr += `
|
|
89
|
+
|
|
90
|
+
$$
|
|
91
|
+
${multiply(c, fct(add(PiNode, "x"))).toTex()} = ${multiply(-c, fct("x")).toTex()}
|
|
92
|
+
$$`;
|
|
93
|
+
}
|
|
94
|
+
if (d !== 0) {
|
|
95
|
+
corr += `
|
|
96
|
+
|
|
97
|
+
$$
|
|
98
|
+
${multiply(d, fct(substract(PiNode, "x"))).toTex()} = ${isCos
|
|
99
|
+
? multiply(-d, cos(substract(PiNode, "x"))).toTex()
|
|
100
|
+
: multiply(d, sin(substract(PiNode, "x"))).toTex()}
|
|
101
|
+
$$`;
|
|
102
|
+
}
|
|
103
|
+
corr += `
|
|
104
|
+
|
|
105
|
+
On a donc :
|
|
106
|
+
|
|
107
|
+
$$
|
|
108
|
+
${buildStatement(identifiers).toTex()} = ${getAnswer(identifiers)}
|
|
109
|
+
$$`;
|
|
110
|
+
return corr;
|
|
111
|
+
};
|
|
112
|
+
const getKeys = () => {
|
|
113
|
+
return ["cos", "sin", "x"];
|
|
114
|
+
};
|
|
115
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
116
|
+
try {
|
|
117
|
+
const parsed = parseAlgebraic(ans);
|
|
118
|
+
if (!parsed)
|
|
119
|
+
return false;
|
|
120
|
+
return parsed.simplify().toTex() === answer;
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
return handleVEAError(err);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const getAssociateAngleSimplificationQuestion = () => {
|
|
127
|
+
const coeffs = randTupleInt(4, { from: -4, to: 4, elExcludes: [0] });
|
|
128
|
+
coeffs[randint(0, coeffs.length)] = 0;
|
|
129
|
+
const identifiers = {
|
|
130
|
+
isCos: coinFlip(),
|
|
131
|
+
a: coeffs[0],
|
|
132
|
+
b: coeffs[1],
|
|
133
|
+
c: coeffs[2],
|
|
134
|
+
d: coeffs[3],
|
|
135
|
+
};
|
|
136
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
137
|
+
};
|
|
138
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
139
|
+
return {
|
|
140
|
+
answer: getAnswer(identifiers),
|
|
141
|
+
instruction: getInstruction(identifiers),
|
|
142
|
+
keys: getKeys(identifiers),
|
|
143
|
+
answerFormat: "tex",
|
|
144
|
+
identifiers,
|
|
145
|
+
hint: getHint(identifiers),
|
|
146
|
+
correction: getCorrection(identifiers),
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export const associateAngleSimplification = {
|
|
150
|
+
id: "associateAngleSimplification",
|
|
151
|
+
connector: "=",
|
|
152
|
+
label: "Simplifier une expression avec $\\cos$ et $\\sin$ à l'aide des angles associés",
|
|
153
|
+
isSingleStep: true,
|
|
154
|
+
generator: (nb, opts) => getDistinctQuestions(() => getAssociateAngleSimplificationQuestion(opts), nb),
|
|
155
|
+
qcmTimer: 60,
|
|
156
|
+
freeTimer: 60,
|
|
157
|
+
getPropositions,
|
|
158
|
+
isAnswerValid,
|
|
159
|
+
subject: "Mathématiques",
|
|
160
|
+
getInstruction,
|
|
161
|
+
getHint,
|
|
162
|
+
getCorrection,
|
|
163
|
+
getAnswer,
|
|
164
|
+
getQuestionFromIdentifiers,
|
|
165
|
+
hasHintAndCorrection: true,
|
|
166
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicEquationCos.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/basicEquationCos.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"basicEquationCos.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/basicEquationCos.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA+HF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { CosNode } from "../../../../tree/nodes/functions/cosNode.js";
|
|
|
6
6
|
import { OppositeNode } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
7
7
|
import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
|
|
8
8
|
import { random } from "../../../../utils/alea/random.js";
|
|
9
|
+
import { mdTable } from "../../../../utils/markdown/mdTable.js";
|
|
9
10
|
const getPropositions = (n, { answer, degree }) => {
|
|
10
11
|
const propositions = [];
|
|
11
12
|
addValidProp(propositions, answer);
|
|
@@ -44,12 +45,56 @@ $$
|
|
|
44
45
|
Donner les solutions dans l'intervalle $\\left]-\\pi,\\pi\\right]$.
|
|
45
46
|
`;
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
const getHint = () => {
|
|
49
|
+
return `Utilise les valeurs remarquables du cosinus et du sinus (à connaître par coeur !), ainsi que le cercle trigonométrique ci-dessous :
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
`;
|
|
55
|
+
};
|
|
56
|
+
const getCorrection = (identifiers) => {
|
|
57
|
+
return `Les valeurs remarquables du cosinus et du sinus sont rappelées ci-dessous :
|
|
58
|
+
|
|
59
|
+
${mdTable([
|
|
60
|
+
[
|
|
61
|
+
"$x$",
|
|
62
|
+
"$0$",
|
|
63
|
+
"$\\frac{\\pi}{6}$",
|
|
64
|
+
"$\\frac{\\pi}{4}$",
|
|
65
|
+
"$\\frac{\\pi}{3}$",
|
|
66
|
+
"$\\frac{\\pi}{2}$",
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
"$\\cos(x)$",
|
|
70
|
+
"$1$",
|
|
71
|
+
"$\\frac{\\sqrt{3}}{2}$",
|
|
72
|
+
"$\\frac{\\sqrt{2}}{2}$",
|
|
73
|
+
"$\\frac{1}{2}$",
|
|
74
|
+
"$0$",
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"$\\sin(x)$",
|
|
78
|
+
"$0$",
|
|
79
|
+
"$\\frac{1}{2}$",
|
|
80
|
+
"$\\frac{\\sqrt{2}}{2}$",
|
|
81
|
+
"$\\frac{\\sqrt{3}}{2}$",
|
|
82
|
+
"$1$",
|
|
83
|
+
],
|
|
84
|
+
])}
|
|
85
|
+
|
|
86
|
+
On se sert ensuite du cercle trigonométrique suivant :
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
On en conclut que la solution de l'équation est :
|
|
92
|
+
|
|
93
|
+
$$
|
|
94
|
+
${getAnswer(identifiers)}
|
|
95
|
+
$$
|
|
96
|
+
`;
|
|
97
|
+
};
|
|
53
98
|
const getKeys = () => {
|
|
54
99
|
return ["x", "S", "equal", "lbrace", "semicolon", "rbrace", "pi"];
|
|
55
100
|
};
|
|
@@ -70,8 +115,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
70
115
|
keys: getKeys(identifiers),
|
|
71
116
|
answerFormat: "tex",
|
|
72
117
|
identifiers,
|
|
73
|
-
|
|
74
|
-
|
|
118
|
+
hint: getHint(identifiers),
|
|
119
|
+
correction: getCorrection(identifiers),
|
|
75
120
|
};
|
|
76
121
|
return question;
|
|
77
122
|
};
|
|
@@ -89,5 +134,5 @@ export const basicEquationCos = {
|
|
|
89
134
|
subject: "Mathématiques",
|
|
90
135
|
getQuestionFromIdentifiers,
|
|
91
136
|
maxAllowedQuestions: 9,
|
|
92
|
-
|
|
137
|
+
hasHintAndCorrection: true,
|
|
93
138
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicEquationSin.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/basicEquationSin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"basicEquationSin.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/basicEquationSin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA2IF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { EquationSolutionNode } from "../../../../tree/nodes/equations/equationS
|
|
|
5
5
|
import { SinNode } from "../../../../tree/nodes/functions/sinNode.js";
|
|
6
6
|
import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
|
|
7
7
|
import { random } from "../../../../utils/alea/random.js";
|
|
8
|
+
import { mdTable } from "../../../../utils/markdown/mdTable.js";
|
|
8
9
|
const getPropositions = (n, { answer, degree }) => {
|
|
9
10
|
const propositions = [];
|
|
10
11
|
addValidProp(propositions, answer);
|
|
@@ -55,12 +56,56 @@ $$
|
|
|
55
56
|
Donner les solutions dans l'intervalle $\\left]-\\pi,\\pi\\right]$.
|
|
56
57
|
`;
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
const getHint = () => {
|
|
60
|
+
return `Utilise les valeurs remarquables du cosinus et du sinus (à connaître par coeur !), ainsi que le cercle trigonométrique ci-dessous :
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
`;
|
|
66
|
+
};
|
|
67
|
+
const getCorrection = (identifiers) => {
|
|
68
|
+
return `Les valeurs remarquables du cosinus et du sinus sont rappelées ci-dessous :
|
|
69
|
+
|
|
70
|
+
${mdTable([
|
|
71
|
+
[
|
|
72
|
+
"$x$",
|
|
73
|
+
"$0$",
|
|
74
|
+
"$\\frac{\\pi}{6}$",
|
|
75
|
+
"$\\frac{\\pi}{4}$",
|
|
76
|
+
"$\\frac{\\pi}{3}$",
|
|
77
|
+
"$\\frac{\\pi}{2}$",
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
"$\\cos(x)$",
|
|
81
|
+
"$1$",
|
|
82
|
+
"$\\frac{\\sqrt{3}}{2}$",
|
|
83
|
+
"$\\frac{\\sqrt{2}}{2}$",
|
|
84
|
+
"$\\frac{1}{2}$",
|
|
85
|
+
"$0$",
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"$\\sin(x)$",
|
|
89
|
+
"$0$",
|
|
90
|
+
"$\\frac{1}{2}$",
|
|
91
|
+
"$\\frac{\\sqrt{2}}{2}$",
|
|
92
|
+
"$\\frac{\\sqrt{3}}{2}$",
|
|
93
|
+
"$1$",
|
|
94
|
+
],
|
|
95
|
+
])}
|
|
96
|
+
|
|
97
|
+
On se sert ensuite du cercle trigonométrique suivant :
|
|
98
|
+
|
|
99
|
+

|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
On en conclut que la solution de l'équation est :
|
|
103
|
+
|
|
104
|
+
$$
|
|
105
|
+
${getAnswer(identifiers)}
|
|
106
|
+
$$
|
|
107
|
+
`;
|
|
108
|
+
};
|
|
64
109
|
const getKeys = () => {
|
|
65
110
|
return ["x", "S", "equal", "lbrace", "semicolon", "rbrace", "pi"];
|
|
66
111
|
};
|
|
@@ -82,8 +127,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
82
127
|
keys: getKeys(identifiers),
|
|
83
128
|
answerFormat: "tex",
|
|
84
129
|
identifiers,
|
|
85
|
-
|
|
86
|
-
|
|
130
|
+
hint: getHint(identifiers),
|
|
131
|
+
correction: getCorrection(identifiers),
|
|
87
132
|
};
|
|
88
133
|
return question;
|
|
89
134
|
};
|
|
@@ -101,4 +146,5 @@ export const basicEquationSin = {
|
|
|
101
146
|
subject: "Mathématiques",
|
|
102
147
|
getQuestionFromIdentifiers,
|
|
103
148
|
maxAllowedQuestions: 9,
|
|
149
|
+
hasHintAndCorrection: true,
|
|
104
150
|
};
|
|
@@ -15,14 +15,13 @@
|
|
|
15
15
|
// } from "../../../../exercises/exercise.js";
|
|
16
16
|
// import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
17
17
|
// import {
|
|
18
|
-
// mainPositiveTrigovalues,
|
|
19
18
|
// mainTrigoValues,
|
|
20
19
|
// trigoValuesOnZeroTwoPIOF,
|
|
21
20
|
// } from "../../../../math/trigonometry/remarkableValues.js";
|
|
22
21
|
// import { randint } from "../../../../math/utils/random/randint.js";
|
|
23
22
|
// import { EquationSolutionNode } from "../../../../tree/nodes/equations/equationSolutionNode.js";
|
|
24
23
|
// import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
25
|
-
// import { sin
|
|
24
|
+
// import { sin } from "../../../../tree/nodes/functions/sinNode.js";
|
|
26
25
|
// import {
|
|
27
26
|
// NodeIdentifiers,
|
|
28
27
|
// reifyAlgebraic,
|
|
@@ -6,4 +6,5 @@ export * from "./trigoAssociateAngle.js";
|
|
|
6
6
|
export * from "./cosInequationMainInterval.js";
|
|
7
7
|
export * from "./sinInequationMainInterval.js";
|
|
8
8
|
export * from "./readPeriodicityOnFunctionGraph.js";
|
|
9
|
+
export * from "./associateAngleSimplification.js";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC"}
|
|
@@ -21,7 +21,7 @@ const getAnswer = (identifiers) => {
|
|
|
21
21
|
const { randAngle, triangleIdentifiers } = identifiers;
|
|
22
22
|
const triangle = RightTriangleConstructor.fromIdentifiers(triangleIdentifiers);
|
|
23
23
|
const answer = round(triangle.angles[randAngle].evaluate(), 0);
|
|
24
|
-
return answer + "
|
|
24
|
+
return answer + "^\\circ";
|
|
25
25
|
};
|
|
26
26
|
const getHint = () => {
|
|
27
27
|
return `On peut utiliser :
|
|
@@ -149,7 +149,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
149
149
|
const propositions = [];
|
|
150
150
|
addValidProp(propositions, answer);
|
|
151
151
|
propWhile(propositions, n, () => {
|
|
152
|
-
tryToAddWrongProp(propositions, randint(20, 80) + "
|
|
152
|
+
tryToAddWrongProp(propositions, randint(20, 80) + "^\\circ");
|
|
153
153
|
});
|
|
154
154
|
return shuffle(propositions);
|
|
155
155
|
};
|
|
@@ -73,7 +73,7 @@ const getAnswer = (identifiers) => {
|
|
|
73
73
|
const angleIncidenceRad = (ramdonAngleIncidenceDeg * Math.PI) / 180;
|
|
74
74
|
const angleRefractionRad = Math.asin((n1 / n2) * Math.sin(angleIncidenceRad));
|
|
75
75
|
const angleRefractionDeg = (angleRefractionRad * 180) / Math.PI;
|
|
76
|
-
const answer = `${frenchify(round(angleRefractionDeg, 1))}
|
|
76
|
+
const answer = `${frenchify(round(angleRefractionDeg, 1))}^\\circ`;
|
|
77
77
|
return answer;
|
|
78
78
|
};
|
|
79
79
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
@@ -103,7 +103,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
103
103
|
const propositions = [];
|
|
104
104
|
addValidProp(propositions, answer);
|
|
105
105
|
propWhile(propositions, n, () => {
|
|
106
|
-
tryToAddWrongProp(propositions, frenchify(round(randint(100, 900) / 10, 1)) + "
|
|
106
|
+
tryToAddWrongProp(propositions, frenchify(round(randint(100, 900) / 10, 1)) + "^\\circ");
|
|
107
107
|
});
|
|
108
108
|
return shuffle(propositions);
|
|
109
109
|
};
|