math-exercises 3.0.62 → 3.0.63
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/calculLitteral/distributivity/simpleDistri.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +3 -3
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +7 -9
- package/lib/exercises/math/conversion/aeraConversion.js +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +2 -2
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +17 -9
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +3 -0
- package/lib/exercises/math/functions/affines/interceptReading.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +8 -2
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +12 -8
- package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.js +3 -3
- package/lib/exercises/math/geometry/cartesian/directionVector.js +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVectorEquation.js +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +3 -3
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +5 -5
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +2 -2
- package/lib/exercises/math/geometry/lines/directorVectorFromAnother.js +1 -1
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.js +11 -6
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +5 -5
- package/lib/exercises/math/geometry/lines/drawLineFromPointAndVector.js +3 -3
- package/lib/exercises/math/geometry/lines/findParallelLineFromCartesianEquation.js +3 -3
- package/lib/exercises/math/geometry/lines/findParallelLineFromReductEquation.js +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +2 -2
- package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnLine.js +2 -2
- package/lib/exercises/math/geometry/lines/reductEquationFindY.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/reductEquationFindY.js +12 -3
- package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.js +3 -3
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.js +8 -9
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +9 -5
- package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +4 -4
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +0 -2
- package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +6 -7
- package/lib/exercises/math/python/conditionIf.d.ts +1 -1
- package/lib/exercises/math/python/conditionIf.d.ts.map +1 -1
- package/lib/exercises/math/python/conditionIf.js +29 -16
- package/lib/exercises/math/python/forLoop.d.ts.map +1 -1
- package/lib/exercises/math/python/forLoop.js +30 -18
- package/lib/exercises/math/python/inOutCalcul.d.ts.map +1 -1
- package/lib/exercises/math/python/inOutCalcul.js +25 -12
- package/lib/exercises/math/python/pyForLoop1Exercise.d.ts +4 -7
- package/lib/exercises/math/python/pyForLoop1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/python/pyForLoop1Exercise.js +77 -118
- package/lib/exercises/math/python/pyNestedForLoopExercise.d.ts +0 -3
- package/lib/exercises/math/python/pyNestedForLoopExercise.d.ts.map +1 -1
- package/lib/exercises/math/python/pyNestedForLoopExercise.js +50 -51
- package/lib/exercises/math/python/pyWhileLoop1Exercise.d.ts +1 -3
- package/lib/exercises/math/python/pyWhileLoop1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/python/pyWhileLoop1Exercise.js +70 -74
- package/lib/exercises/math/python/pythonFunctionTrinom.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonFunctionTrinom.js +26 -13
- package/lib/exercises/math/python/whileLoop.d.ts.map +1 -1
- package/lib/exercises/math/python/whileLoop.js +30 -18
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
- package/lib/index.d.ts +12 -17
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +1 -1
- package/lib/math/systems/generalSystem.js +5 -5
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ const getAnswer = (identifiers) => {
|
|
|
29
29
|
return affine.times(coeff).toTree().toTex();
|
|
30
30
|
};
|
|
31
31
|
const getHint = (identifiers) => {
|
|
32
|
-
return `Multiplie chaque terme
|
|
32
|
+
return `Multiplie chaque terme de la parenthèse par $${identifiers.coeff}$.`;
|
|
33
33
|
};
|
|
34
34
|
const getCorrection = (identifiers) => {
|
|
35
35
|
const { a, b, coeff } = identifiers;
|
|
@@ -31,9 +31,9 @@ $$`;
|
|
|
31
31
|
const getHint = (identifiers) => {
|
|
32
32
|
return `L'équation $x^2 = k$ :
|
|
33
33
|
|
|
34
|
-
- n'admet pas de solution si $k<0
|
|
35
|
-
- admet une solution si $k=0$, qui est $0$
|
|
36
|
-
- admet deux solutions si $k>0$, qui sont $-\\sqrt{k}$ et $\\sqrt{k}
|
|
34
|
+
- n'admet pas de solution si $k<0$ ;
|
|
35
|
+
- admet une solution si $k=0$, qui est $0$ ;
|
|
36
|
+
- admet deux solutions si $k>0$, qui sont $-\\sqrt{k}$ et $\\sqrt{k}$.
|
|
37
37
|
`;
|
|
38
38
|
};
|
|
39
39
|
const getAnswer = (identifiers) => {
|
|
@@ -35,11 +35,11 @@ const getBasicSystemResolutionQuestion = () => {
|
|
|
35
35
|
return getQuestionFromIdentifiers(identifiers);
|
|
36
36
|
};
|
|
37
37
|
const getHint = (identifiers) => {
|
|
38
|
-
return `
|
|
38
|
+
return `Utilise la méthode par substitution ou bien celle par combinaison :
|
|
39
39
|
|
|
40
|
-
- Si une des variables est facile à isoler dans une des équations, alors
|
|
40
|
+
- Si une des variables est facile à isoler dans une des équations, alors utilise la méthode par substitution : isole cette variable, puis injecte le résultat obtenu dans l'autre équation.
|
|
41
41
|
|
|
42
|
-
- Sinon,
|
|
42
|
+
- Sinon, utilise la méthode par combinaison : multiple une (ou les deux) équation(s) par un nombre, afin que, lorsqu'on additionne les deux équations, une des variables disparaisse.`;
|
|
43
43
|
};
|
|
44
44
|
const getCorrection = (identifiers) => {
|
|
45
45
|
const sys = GeneralSystemConstructor.fromIdentifiers(identifiers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifySystemSolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/verifySystemSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IAGjB,MAAM,EAAE,wBAAwB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"verifySystemSolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/verifySystemSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IAGjB,MAAM,EAAE,wBAAwB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgIF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
|
|
@@ -47,7 +47,7 @@ const getVerifySystemSolutionQuestion = () => {
|
|
|
47
47
|
const getHint = (identifiers) => {
|
|
48
48
|
return `On remplace $x$ par $${identifiers.x}$ et $y$ par $${identifiers.y}$ dans les deux équations.
|
|
49
49
|
|
|
50
|
-
Si les deux égalités sont vraies, alors le couple est bien une solution du système. Sinon, ce n'en est pas une.`;
|
|
50
|
+
Si les deux égalités sont vraies, alors le couple est bien une solution du système d'équations. Sinon, ce n'en est pas une.`;
|
|
51
51
|
};
|
|
52
52
|
const getCorrection = (identifiers) => {
|
|
53
53
|
const { sysIds, x, y } = identifiers;
|
|
@@ -60,33 +60,31 @@ const getCorrection = (identifiers) => {
|
|
|
60
60
|
const equasDetailedSimp = equasDetailed.map((e) => e.simplify());
|
|
61
61
|
const firstIsTrue = equasDetailedSimp[0].isVerified();
|
|
62
62
|
const secondIsTrue = equasDetailedSimp[1].isVerified();
|
|
63
|
-
return `On remplace $x$ par $${x}$ et $y$ par $${y}$ dans les deux équations
|
|
63
|
+
return `On remplace $x$ par $${x}$ et $y$ par $${y}$ dans les deux équations.
|
|
64
64
|
|
|
65
65
|
$$
|
|
66
66
|
${equasDetailed[0].leftChild.toTex()} = ${equasDetailedSimp[0].leftChild.toTex()}
|
|
67
67
|
$$
|
|
68
68
|
|
|
69
69
|
${firstIsTrue
|
|
70
|
-
? "La première
|
|
71
|
-
: "La première
|
|
70
|
+
? "La première égalité est donc vraie."
|
|
71
|
+
: "La première égalité n'est donc pas vraie : le couple n'est donc pas une solution du système d'équations."}
|
|
72
72
|
|
|
73
73
|
${firstIsTrue
|
|
74
74
|
? `
|
|
75
|
-
|
|
76
|
-
On vérifie maintenant la deuxième équation :
|
|
77
75
|
|
|
78
76
|
$$
|
|
79
77
|
${equasDetailed[1].leftChild.toTex()} = ${equasDetailedSimp[1].leftChild.toTex()}
|
|
80
78
|
$$
|
|
81
79
|
|
|
82
80
|
${secondIsTrue
|
|
83
|
-
? "La deuxième
|
|
84
|
-
: "La deuxième
|
|
81
|
+
? "La deuxième égalité est donc vraie."
|
|
82
|
+
: "La deuxième égalité n'est donc pas vraie : le couple n'est donc pas une solution du système d'équations."}
|
|
85
83
|
`
|
|
86
84
|
: ""}
|
|
87
85
|
|
|
88
86
|
${firstIsTrue && secondIsTrue
|
|
89
|
-
? "Les deux
|
|
87
|
+
? "Les deux égalités sont donc vraies : le couple est bien une solution du système d'équations."
|
|
90
88
|
: ""}
|
|
91
89
|
`;
|
|
92
90
|
};
|
|
@@ -48,7 +48,7 @@ Il suffit alors de multiplier $${randomAera.frenchify()}$ par $${coeff.toTex()}$
|
|
|
48
48
|
|
|
49
49
|
${alignTex([
|
|
50
50
|
[
|
|
51
|
-
`${randomAera.frenchify()}
|
|
51
|
+
`${randomAera.frenchify()}\\ \\textrm{${unit}}^2 `,
|
|
52
52
|
"=",
|
|
53
53
|
`${multiply(coeff, randomAera).toTex()}\\ \\textrm{${target}}^2`,
|
|
54
54
|
],
|
|
@@ -24,7 +24,7 @@ const getInstruction = (identifiers) => {
|
|
|
24
24
|
return `Compléter :
|
|
25
25
|
|
|
26
26
|
$$
|
|
27
|
-
${randomCapacity.frenchify()}
|
|
27
|
+
${randomCapacity.frenchify()}\\ \\textrm{${units[randomUnitIndex]}} = \\ldots\\ \\textrm{${units[randomUnitInstructionIndex]}}
|
|
28
28
|
$$`;
|
|
29
29
|
};
|
|
30
30
|
const getAnswer = (identifiers) => {
|
|
@@ -61,7 +61,7 @@ Il suffit alors de multiplier $${randomCapacity.frenchify()}$ par $${coeff.toTex
|
|
|
61
61
|
|
|
62
62
|
${alignTex([
|
|
63
63
|
[
|
|
64
|
-
`${randomCapacity.frenchify()}
|
|
64
|
+
`${randomCapacity.frenchify()}\\ \\textrm{${unit}} `,
|
|
65
65
|
"=",
|
|
66
66
|
`${multiply(coeff, randomCapacity).toTex()}\\ \\textrm{${target}}`,
|
|
67
67
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAyBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAwQF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
|
|
@@ -12,6 +12,7 @@ import { MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js"
|
|
|
12
12
|
import { SubstractNode, } from "../../../../tree/nodes/operators/substractNode.js";
|
|
13
13
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
14
14
|
import { random } from "../../../../utils/alea/random.js";
|
|
15
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
15
16
|
const randomPente = () => {
|
|
16
17
|
return random([
|
|
17
18
|
0,
|
|
@@ -137,15 +138,19 @@ const getKeys = (identifiers) => {
|
|
|
137
138
|
return ["y", "equal", "x"];
|
|
138
139
|
};
|
|
139
140
|
const isAnswerValid = (ans, { answer, trinomCoeffs, xA, yA, yPrimeA }) => {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
const splitted = ans.split("=");
|
|
142
|
+
if (splitted[0] !== "y" || splitted.length !== 2)
|
|
143
|
+
return false;
|
|
144
|
+
const parsed = parseAlgebraic(splitted[1]);
|
|
145
|
+
return ("y=" +
|
|
146
|
+
parsed
|
|
147
|
+
.simplify({
|
|
148
|
+
towardsDistribute: true,
|
|
149
|
+
forceDistributeFractions: true,
|
|
150
|
+
forbidFactorize: true,
|
|
151
|
+
})
|
|
152
|
+
.toTex() ===
|
|
153
|
+
answer);
|
|
149
154
|
};
|
|
150
155
|
const getDerivativeTangentEquationReadingQuestion = () => {
|
|
151
156
|
const xA = randint(-8, 8);
|
|
@@ -170,6 +175,9 @@ const getDerivativeTangentEquationReadingQuestion = () => {
|
|
|
170
175
|
yPrimeA: yPrimeA.toIdentifiers(),
|
|
171
176
|
trinomCoeffs: [a, b, c],
|
|
172
177
|
};
|
|
178
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
179
|
+
};
|
|
180
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
173
181
|
const question = {
|
|
174
182
|
answer: getAnswer(identifiers),
|
|
175
183
|
instruction: getInstruction(identifiers),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA8KF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAmB9D,CAAC"}
|
|
@@ -101,6 +101,9 @@ const getThirdDegreeFunctionVariation = () => {
|
|
|
101
101
|
const racine2 = randint(racine1 + 1, 6);
|
|
102
102
|
const coin = coinFlip() ? -1 : 1;
|
|
103
103
|
const identifiers = { racine1, racine2, coin, a, c };
|
|
104
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
105
|
+
};
|
|
106
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
104
107
|
const question = {
|
|
105
108
|
instruction: getInstruction(identifiers),
|
|
106
109
|
startStatement: "S",
|
|
@@ -8,7 +8,7 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
8
8
|
import { round } from "../../../../math/utils/round.js";
|
|
9
9
|
import { valueParser } from "../../../../tree/parsers/valueParser.js";
|
|
10
10
|
const getInstruction = (identifiers) => {
|
|
11
|
-
return `Déterminer graphiquement l'ordonnée à l'origine
|
|
11
|
+
return `Déterminer graphiquement l'ordonnée à l'origine de la droite tracée ci-dessous : `;
|
|
12
12
|
};
|
|
13
13
|
const getAnswer = (identifiers) => {
|
|
14
14
|
const { b, secondPoint } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAuHF,KAAK,OAAO,GAAG;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAYF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoB7D,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { Rational, RationalConstructor, } from "../../../../math/numbers/rationa
|
|
|
7
7
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
8
8
|
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
9
9
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
10
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
10
11
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
11
12
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
12
13
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
@@ -20,11 +21,11 @@ $$
|
|
|
20
21
|
\\frac{y_B - y_A}{x_B - x_A}
|
|
21
22
|
$$
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
Choisis deux points appartenant à la droite, et utilise cette formule.`;
|
|
24
25
|
};
|
|
25
26
|
const getCorrection = (identifiers) => {
|
|
26
27
|
const { xA, yA, xB, yB } = identifiers;
|
|
27
|
-
return `On lit graphiquement que la droite passe par les
|
|
28
|
+
return `On lit graphiquement que la droite passe par les points $A(${xA};${yA})$ et $B(${xB};${yB})$.
|
|
28
29
|
|
|
29
30
|
Le coefficient directeur est donc :
|
|
30
31
|
|
|
@@ -96,6 +97,11 @@ const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
|
|
|
96
97
|
addValidProp(propositions, answer);
|
|
97
98
|
if (yB - yA !== 0)
|
|
98
99
|
tryToAddWrongProp(propositions, new Rational(xB - xA, yB - yA).simplify().toTree().toTex());
|
|
100
|
+
if (yB - yA !== 0) {
|
|
101
|
+
const a = frac(yB - yA, xB - xA).simplify();
|
|
102
|
+
const b = substract(yA, multiply(a, xA));
|
|
103
|
+
tryToAddWrongProp(propositions, b.simplify().toTex());
|
|
104
|
+
}
|
|
99
105
|
while (propositions.length < n) {
|
|
100
106
|
const wrongAnswer = new NumberNode(randint(-4, 5, [0]));
|
|
101
107
|
tryToAddWrongProp(propositions, wrongAnswer.toTex());
|
|
@@ -23,7 +23,7 @@ $$`;
|
|
|
23
23
|
};
|
|
24
24
|
const getInstruction = (identifiers) => {
|
|
25
25
|
const { xA, yA, xB, yB } = identifiers;
|
|
26
|
-
return `Soit $d$
|
|
26
|
+
return `Soit $d$ la droite passant par les points $A(${xA};${yA})$ et $B(${xB};${yB})$.
|
|
27
27
|
|
|
28
28
|
Déterminer le coefficient directeur de $d$.`;
|
|
29
29
|
};
|
|
@@ -27,7 +27,7 @@ const getAnswer = (identifiers) => {
|
|
|
27
27
|
return correctAnswer.toTex();
|
|
28
28
|
};
|
|
29
29
|
const getHint = (identifiers) => {
|
|
30
|
-
return `Détermine un vecteur directeur de $d$. Cela permet de trouver les coefficients $a$ et $b$ dans l'équation cartésienne $ax+by+c=0$. Puis
|
|
30
|
+
return `Détermine un vecteur directeur de $d$. Cela permet de trouver les coefficients $a$ et $b$ dans l'équation cartésienne $ax+by+c=0$. Puis utilise un point appartenant à $d$ pour obtenir $c$. `;
|
|
31
31
|
};
|
|
32
32
|
const getCorrection = (identifiers) => {
|
|
33
33
|
const { aX, aY, bX, bY } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianFromTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianFromTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"cartesianFromTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianFromTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAqBtC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAiKF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Line, LineConstructor } from "../../../../math/geometry/line.js";
|
|
4
|
-
import { PointConstructor, } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
|
|
5
5
|
import { Vector, VectorConstructor, } from "../../../../math/geometry/vector.js";
|
|
6
6
|
import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
|
|
7
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
8
|
import { isEqualNode, } from "../../../../tree/nodes/equations/equalNode.js";
|
|
8
9
|
import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
9
10
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
@@ -11,7 +12,7 @@ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
|
11
12
|
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
12
13
|
import { parseLatex } from "../../../../tree/parsers/latexParser.js";
|
|
13
14
|
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
14
|
-
const getPropositions = (n, { answer }) => {
|
|
15
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
15
16
|
const propositions = [];
|
|
16
17
|
addValidProp(propositions, answer);
|
|
17
18
|
while (propositions.length < n) {
|
|
@@ -31,7 +32,7 @@ const getInstruction = (identifiers) => {
|
|
|
31
32
|
const { pointBIdentifiers, pointIdentifiers } = identifiers;
|
|
32
33
|
const point = PointConstructor.fromIdentifiers(pointIdentifiers);
|
|
33
34
|
const pointB = PointConstructor.fromIdentifiers(pointBIdentifiers);
|
|
34
|
-
return `Soit $d$
|
|
35
|
+
return `Soit $d$ la droite passant par les points $${point.toTexWithCoords()}$ et $${pointB.toTexWithCoords()}$.
|
|
35
36
|
|
|
36
37
|
Déterminer une équation cartésienne de $d$.`;
|
|
37
38
|
};
|
|
@@ -43,9 +44,9 @@ $$
|
|
|
43
44
|
ax+by+c = 0
|
|
44
45
|
$$
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
$\\overrightarrow{AB}$ est un vecteur directeur de $d$.
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
Utilise ensuite les coordonnées d'un point de la droite pour déterminer $c$.`;
|
|
49
50
|
};
|
|
50
51
|
const getCorrection = (identifiers) => {
|
|
51
52
|
const { pointBIdentifiers, pointIdentifiers } = identifiers;
|
|
@@ -125,10 +126,13 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
128
|
const getCartesianFromTwoPointsQuestion = (ops) => {
|
|
128
|
-
const
|
|
129
|
+
const xA = randint(-10, 11);
|
|
130
|
+
const xB = randint(-10, 11, [xA]);
|
|
131
|
+
const yA = randint(-10, 11);
|
|
132
|
+
const yB = randint(-10, 11, [yA]);
|
|
129
133
|
const identifiers = {
|
|
130
|
-
pointIdentifiers:
|
|
131
|
-
pointBIdentifiers:
|
|
134
|
+
pointIdentifiers: new Point("A", xA.toTree(), yA.toTree()).toIdentifiers(),
|
|
135
|
+
pointBIdentifiers: new Point("A", xB.toTree(), yB.toTree()).toIdentifiers(),
|
|
132
136
|
};
|
|
133
137
|
return getQuestionFromIdentifiers(identifiers);
|
|
134
138
|
};
|
|
@@ -31,7 +31,7 @@ const getInstruction = (identifiers) => {
|
|
|
31
31
|
const { vectorIdentifiers, pointIdentifiers } = identifiers;
|
|
32
32
|
const point = PointConstructor.fromIdentifiers(pointIdentifiers);
|
|
33
33
|
const vector = VectorConstructor.fromIdentifiers(vectorIdentifiers);
|
|
34
|
-
return `Soit $d$
|
|
34
|
+
return `Soit $d$ la droite de vecteur directeur $${vector.toTexWithCoords()}$ et passant par le point $${point.toTexWithCoords()}$.
|
|
35
35
|
|
|
36
36
|
Déterminer une équation cartésienne de $d$.`;
|
|
37
37
|
};
|
|
@@ -43,7 +43,7 @@ $$
|
|
|
43
43
|
ax+by+c = 0
|
|
44
44
|
$$
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Utilise ensuite les coordonnées d'un point de la droite pour déterminer $c$.`;
|
|
47
47
|
};
|
|
48
48
|
const getCorrection = (identifiers) => {
|
|
49
49
|
const { vectorIdentifiers, pointIdentifiers } = identifiers;
|
|
@@ -64,7 +64,7 @@ $$
|
|
|
64
64
|
${nonCEq.toTex()}=0
|
|
65
65
|
$$
|
|
66
66
|
|
|
67
|
-
Pour déterminer $c$, on
|
|
67
|
+
Pour déterminer $c$, on utilise le fait que le point $${point.toTexWithCoords()}$ appartient à $d$ :
|
|
68
68
|
|
|
69
69
|
$$
|
|
70
70
|
${nonCEq.toDetailedEvaluation({ x: point.x, y: point.y }).toTex()}=0
|
|
@@ -43,7 +43,7 @@ const getAnswer = (identifiers) => {
|
|
|
43
43
|
return getVector(identifiers).toBinomCoords().toTex();
|
|
44
44
|
};
|
|
45
45
|
const getHint = (identifiers) => {
|
|
46
|
-
return "
|
|
46
|
+
return "Repère deux points appartenant à la droite. Le vecteur formé par ces deux points est un vecteur directeur de la droite.";
|
|
47
47
|
};
|
|
48
48
|
const getCorrection = (identifiers) => {
|
|
49
49
|
const { x1, x2, y1, y2 } = identifiers;
|
|
@@ -23,7 +23,7 @@ const rebuildIdentifiers = (oldIds) => {
|
|
|
23
23
|
const getInstruction = (identifiers) => {
|
|
24
24
|
const { xValue, yValue, c } = identifiers;
|
|
25
25
|
const equation = equal(add(add(multiply(yValue.toTree(), "x"), multiply((-xValue).toTree(), "y")).simplify({ forbidFactorize: true }), c.toTree()), new NumberNode(0)).toTex();
|
|
26
|
-
return `Soit
|
|
26
|
+
return `Soit la droite $d$ d'équation cartésienne :
|
|
27
27
|
|
|
28
28
|
$$
|
|
29
29
|
${equation}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAwGF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -9,15 +9,15 @@ import { deleteObjectNamesFromAnswer } from "../../../../geogebra/deleteObjectNa
|
|
|
9
9
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
10
10
|
import { approxEqual } from "../../../../geogebra/parsers/approxEqual.js";
|
|
11
11
|
const getHint = (identifiers) => {
|
|
12
|
-
return `Détermine un premier point par lequel passe la droite en utilisant l'ordonnée à l'origine de la droite. Puis, à l'aide du coefficient directeur, détermine un
|
|
12
|
+
return `Détermine un premier point par lequel passe la droite en utilisant l'ordonnée à l'origine de la droite. Puis, à l'aide du coefficient directeur, détermine un second point à partir du premier point.`;
|
|
13
13
|
};
|
|
14
14
|
const getCorrection = (identifiers) => {
|
|
15
15
|
const { correctA, correctB } = identifiers;
|
|
16
16
|
return `L'ordonnée à l'origine de la droite est $${correctB}$. La droite passe donc par le point de coordonnées $(0;${correctB})$.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Le coefficient directeur de $d$ est $${correctA}$. Donc, à partir du point $(0;${correctB})$, si l'on augmente l'abscisse de $1$ unité, l'ordonnée ${correctA < 0 ? "diminue" : "augmente"} de $${correctA}$ unité(s). La droite passe donc par le point de coordonnées $(1; ${correctB + correctA})$.
|
|
19
19
|
|
|
20
|
-
On place donc les deux points de coordonnées $(0; ${correctB})$ et $(1; ${correctA})$, puis on
|
|
20
|
+
On place donc les deux points de coordonnées $(0; ${correctB})$ et $(1; ${correctB + correctA})$, puis on trace la droite passant par ces deux points.`;
|
|
21
21
|
};
|
|
22
22
|
const getInstruction = (identifiers) => {
|
|
23
23
|
const { correctA, correctB } = identifiers;
|
|
@@ -62,7 +62,7 @@ const getInstruction = (identifiers) => {
|
|
|
62
62
|
const equation = toReduced
|
|
63
63
|
? `${getCartesianEquation(identifiers).toTex()}=0`
|
|
64
64
|
: `y=${getReducedEquation(identifiers).toTex()}`;
|
|
65
|
-
return `Soit $d$
|
|
65
|
+
return `Soit $d$ la droite d'équation ${toReduced ? "cartésienne" : "réduite"} :
|
|
66
66
|
|
|
67
67
|
$$
|
|
68
68
|
${equation}
|
|
@@ -74,7 +74,7 @@ ${toReduced
|
|
|
74
74
|
};
|
|
75
75
|
const getHint = (identifiers) => {
|
|
76
76
|
if (identifiers.toReduced)
|
|
77
|
-
return `Pour déterminer l'équation réduite de $d$, il faut isoler la variable $y$
|
|
77
|
+
return `Pour déterminer l'équation réduite de $d$, il faut isoler la variable $y$ dans le membre de gauche de l'équation, afin d'obtenir une équation de la forme :
|
|
78
78
|
|
|
79
79
|
$$
|
|
80
80
|
y = ax+b
|
|
@@ -98,7 +98,7 @@ const getCorrection = (identifiers) => {
|
|
|
98
98
|
});
|
|
99
99
|
if (res.rightChild.toTex() !== resSimp.toTex())
|
|
100
100
|
steps.push(new EqualNode("y".toTree(), resSimp).toTex());
|
|
101
|
-
return `On isole $y$
|
|
101
|
+
return `On isole $y$ dans le membre de gauche de l'équation :
|
|
102
102
|
|
|
103
103
|
${alignTex(steps.map((e) => [e]))}`;
|
|
104
104
|
}
|
|
@@ -118,12 +118,12 @@ ${alignTex(steps.map((e) => [e]))}`;
|
|
|
118
118
|
const equaSteps = [[equaTex]];
|
|
119
119
|
if (equaTex !== equaSimpTex)
|
|
120
120
|
equaSteps.push([equaSimpTex]);
|
|
121
|
-
return `On regroupe tous les termes
|
|
121
|
+
return `On regroupe tous les termes dans le membre de gauche :
|
|
122
122
|
|
|
123
123
|
${alignTex(equaSteps)}
|
|
124
124
|
|
|
125
125
|
${hasFracs
|
|
126
|
-
? `On
|
|
126
|
+
? `On multiplie les deux membres par $${coeff}$ pour obtenir des coefficients entiers :
|
|
127
127
|
|
|
128
128
|
$$
|
|
129
129
|
${cartesian.toTex()}
|
|
@@ -42,13 +42,13 @@ const getInstruction = (identifiers) => {
|
|
|
42
42
|
const { cartesianCoeffs1, cartesianCoeffs2 } = identifiers;
|
|
43
43
|
const coeffs1 = cartesianCoeffs1.map((c) => reifyAlgebraic(c));
|
|
44
44
|
const coeffs2 = cartesianCoeffs2.map((c) => reifyAlgebraic(c));
|
|
45
|
-
return `Soit $d_1$
|
|
45
|
+
return `Soit $d_1$ la droite d'équation cartésienne :
|
|
46
46
|
|
|
47
47
|
$$
|
|
48
48
|
${getEquation(coeffs1).toTex()}
|
|
49
49
|
$$
|
|
50
50
|
|
|
51
|
-
et $d_2$
|
|
51
|
+
et $d_2$ la droite d'équation cartésienne :
|
|
52
52
|
|
|
53
53
|
$$
|
|
54
54
|
${getEquation(coeffs2).toTex()}
|
|
@@ -39,7 +39,7 @@ const getHint = (identifiers) => {
|
|
|
39
39
|
const getCorrection = (identifiers) => {
|
|
40
40
|
return `Tout vecteur colinéaire à $\\overrightarrow{u}$ est également un vecteur directeur de $d$.
|
|
41
41
|
|
|
42
|
-
On peut donc multiplier les coordonnées de
|
|
42
|
+
On peut donc multiplier les coordonnées de $\\overrightarrow{u}$ par n'importe quel nombre pour obtenir un nouveau vecteur directeur de $d$.
|
|
43
43
|
|
|
44
44
|
Un autre vecteur directeur de $d$ est donc par exemple :
|
|
45
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directorVectorFromReductEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/directorVectorFromReductEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"directorVectorFromReductEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/directorVectorFromReductEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAa7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAiHF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAsBlE,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
|
6
6
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
7
|
import { binom, BinomialCoefficientNode, isBinomialCoefficientNode, } from "../../../../tree/nodes/operators/binomialCoefficientNode.js";
|
|
8
8
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
9
10
|
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
10
11
|
import { vectorParser } from "../../../../tree/parsers/vectorParser.js";
|
|
11
12
|
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
@@ -17,13 +18,17 @@ const getEquationTex = (identifiers) => {
|
|
|
17
18
|
.simplify({ forbidFactorize: true })
|
|
18
19
|
.toTex()}`;
|
|
19
20
|
};
|
|
20
|
-
const getPropositions = (n, { answer }) => {
|
|
21
|
+
const getPropositions = (n, { answer, aIds, bIds }) => {
|
|
21
22
|
const propositions = [];
|
|
22
23
|
addValidProp(propositions, answer);
|
|
24
|
+
const a = reifyAlgebraic(aIds);
|
|
23
25
|
while (propositions.length < n) {
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
26
|
+
const x = randint(-9, 10);
|
|
27
|
+
const y = randint(-9, 10);
|
|
28
|
+
//colinéaires
|
|
29
|
+
if (substract(multiply(x, a), y).evaluate() === 0)
|
|
30
|
+
continue;
|
|
31
|
+
tryToAddWrongProp(propositions, binom(x, y).toTex());
|
|
27
32
|
}
|
|
28
33
|
return shuffleProps(propositions, n);
|
|
29
34
|
};
|
|
@@ -33,7 +38,7 @@ const getAnswer = (identifiers) => {
|
|
|
33
38
|
return new BinomialCoefficientNode((1).toTree(), a).toTex();
|
|
34
39
|
};
|
|
35
40
|
const getInstruction = (identifiers) => {
|
|
36
|
-
return `Soit $d$ la droite d'équation :
|
|
41
|
+
return `Soit $d$ la droite d'équation réduite :
|
|
37
42
|
|
|
38
43
|
$$
|
|
39
44
|
${getEquationTex(identifiers)}
|
|
@@ -42,7 +47,7 @@ $$
|
|
|
42
47
|
Donner les coordonnées d'un vecteur directeur de $d$.`;
|
|
43
48
|
};
|
|
44
49
|
const getHint = (identifiers) => {
|
|
45
|
-
return "Le coefficient directeur de la droite représente
|
|
50
|
+
return "Le coefficient directeur de la droite représente la variation de l'ordonnée lorsque l'abscisse augmente de $1$. On peut donc en déduire un vecteur directeur d'abscisse $1$ de la droite.";
|
|
46
51
|
};
|
|
47
52
|
const getCorrection = (identifiers) => {
|
|
48
53
|
const { aIds, bIds } = identifiers;
|
|
@@ -25,9 +25,9 @@ $$`;
|
|
|
25
25
|
};
|
|
26
26
|
const getHint = (identifiers) => {
|
|
27
27
|
const u = new Vector("u", opposite("b"), "a".toTree());
|
|
28
|
-
return `
|
|
28
|
+
return `Commence par chercher les coordonnées d'un point appartenant à la droite. Pour cela, remplace par exemple $x$ par $0$ et déduis-en l'ordonnée $y$ du point d'abscisse $0$ de la droite.
|
|
29
29
|
|
|
30
|
-
Ensuite,
|
|
30
|
+
Ensuite, détermine les coordonnées d'un vecteur directeur de la droite. Une droite d'équation cartésienne de la forme :
|
|
31
31
|
|
|
32
32
|
$$
|
|
33
33
|
ax+by+c=0
|
|
@@ -52,9 +52,9 @@ const getCorrection = (identifiers) => {
|
|
|
52
52
|
|
|
53
53
|
${alignTex([[detailed.toTex()], [detailedSimp.toTex()], [y.toTex()]])}
|
|
54
54
|
|
|
55
|
-
Le point $${point.toTexWithCoords()}$ appartient donc à la droite $d$ : on
|
|
55
|
+
Le point $${point.toTexWithCoords()}$ appartient donc à la droite $d$ : on le place sur le graphique.
|
|
56
56
|
|
|
57
|
-
Puis
|
|
57
|
+
Puis on détermine les coordonnées d'un vecteur directeur de $d$. On sait qu'une droite d'équation cartésienne de la forme :
|
|
58
58
|
|
|
59
59
|
$$
|
|
60
60
|
ax+by+c=0
|
|
@@ -64,7 +64,7 @@ admet le vecteur $${u.toTexWithCoords()}$ comme vecteur directeur.
|
|
|
64
64
|
|
|
65
65
|
Ici, un vecteur directeur de $d$ est donc $${vector.toTexWithCoords()}$.
|
|
66
66
|
|
|
67
|
-
Pour tracer la droite $d$, on peut donc partir du point $A$, puis tracer le vecteur $${vector.toTex()}$.
|
|
67
|
+
Pour tracer la droite $d$, on peut donc partir du point $A$, puis tracer le vecteur $${vector.toTex()}$. En nommant $B$ l'extrémité de ce vecteur, on trace la droite passant par les points $A$ et $B$ : c'est la droite $d$.`;
|
|
68
68
|
};
|
|
69
69
|
const getGGBAnswer = (identifiers) => {
|
|
70
70
|
const { pointIds, vectorIds } = identifiers;
|
|
@@ -16,16 +16,16 @@ const getInstruction = (identifiers) => {
|
|
|
16
16
|
Tracer la droite $d$.`;
|
|
17
17
|
};
|
|
18
18
|
const getHint = (identifiers) => {
|
|
19
|
-
return `
|
|
19
|
+
return `Place le point $A$. Puis détermine l'image du point $A$ par la translation de vecteur $\\overrightarrow{u}$. La droite recherchée passe par ces deux points.`;
|
|
20
20
|
};
|
|
21
21
|
const getCorrection = (identifiers) => {
|
|
22
22
|
const { pointIds, vectorIds } = identifiers;
|
|
23
23
|
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
24
24
|
const vector = VectorConstructor.fromIdentifiers(vectorIds);
|
|
25
25
|
const B = vector.getEndPoint(point);
|
|
26
|
-
return `On place d'abord le point $A$. Puis
|
|
26
|
+
return `On place d'abord le point $A$. Puis on détermine l'image du point $A$ par la translation de vecteur $\\overrightarrow{u}$. Cela nous donne le point $${B.toTexWithCoords()}$.
|
|
27
27
|
|
|
28
|
-
On
|
|
28
|
+
On trace alors la droite qui passe par les points $A$ et $B$.`;
|
|
29
29
|
};
|
|
30
30
|
const getGGBAnswer = (identifiers) => {
|
|
31
31
|
const { pointIds, vectorIds } = identifiers;
|
|
@@ -44,16 +44,16 @@ const getInstruction = (identifiers) => {
|
|
|
44
44
|
const equation = equal(add(add(multiply(a, "x"), multiply(b, "y")), c), 0).simplify({
|
|
45
45
|
forbidFactorize: true,
|
|
46
46
|
});
|
|
47
|
-
return `Soit $d$
|
|
47
|
+
return `Soit $d$ la droite dont une équation cartésienne est :
|
|
48
48
|
|
|
49
49
|
$$
|
|
50
50
|
${equation.toTex()}
|
|
51
51
|
$$
|
|
52
52
|
|
|
53
|
-
Parmi les équations cartésiennes
|
|
53
|
+
Parmi les équations cartésiennes suivantes, laquelle est celle d'une droite parallèle à $d$ ?`;
|
|
54
54
|
};
|
|
55
55
|
const getHint = (identifiers) => {
|
|
56
|
-
return `Deux droites sont parallèles si un vecteur directeur de l'
|
|
56
|
+
return `Deux droites sont parallèles si un vecteur directeur de l'une est colinéaire à un vecteur directeur de l'autre. Détermine donc un vecteur directeur $\\overrightarrow{u}$ de $d$, puis un vecteur directeur de chacune des droites proposées, afin de trouver celui qui est colinéaire à $\\overrightarrow{u}$.`;
|
|
57
57
|
};
|
|
58
58
|
const getCorrection = (identifiers) => {
|
|
59
59
|
const { aIds, bIds, cIds, colinearityCoeffIds, fakeCIds } = identifiers;
|
|
@@ -68,7 +68,7 @@ ${equal("y", add(multiply(a, "x"), fakeB))
|
|
|
68
68
|
.toTex()}
|
|
69
69
|
$$
|
|
70
70
|
|
|
71
|
-
C'est donc cette équation qui
|
|
71
|
+
C'est donc cette équation qui est celle d'une droite parallèle à $d$.
|
|
72
72
|
`;
|
|
73
73
|
};
|
|
74
74
|
const getFindParallelLineFromReductEquationQuestion = (ops) => {
|