math-exercises 3.0.104 → 3.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.js +3 -4
  3. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +1 -1
  4. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +1 -1
  5. package/lib/exercises/math/functions/affines/affineAdjustment.js +1 -1
  6. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
  7. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +5 -1
  8. package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts +1 -0
  9. package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts.map +1 -1
  10. package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.js +6 -3
  11. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
  12. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +2 -1
  13. package/lib/exercises/math/functions/basics/countFunctionZeroes.js +1 -1
  14. package/lib/exercises/math/functions/basics/findZeroesProductQuotient.d.ts.map +1 -1
  15. package/lib/exercises/math/functions/basics/findZeroesProductQuotient.js +18 -3
  16. package/lib/exercises/math/functions/basics/graphicInequation.js +2 -2
  17. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +1 -1
  18. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +1 -1
  19. package/lib/exercises/math/functions/integral/integralKCosinus.js +1 -1
  20. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +1 -1
  21. package/lib/exercises/math/functions/sign/affineProductSignTable.d.ts.map +1 -1
  22. package/lib/exercises/math/functions/sign/affineProductSignTable.js +4 -2
  23. package/lib/exercises/math/functions/sign/affineProductSignTableThirdLine.js +1 -1
  24. package/lib/exercises/math/functions/sign/affineSignTable.d.ts.map +1 -1
  25. package/lib/exercises/math/functions/sign/affineSignTable.js +3 -1
  26. package/lib/exercises/math/functions/sign/equationFromSignTable.js +2 -2
  27. package/lib/exercises/math/functions/sign/readSignTable.js +2 -2
  28. package/lib/exercises/math/functions/variations/compareImagesInVarTable.d.ts.map +1 -1
  29. package/lib/exercises/math/functions/variations/compareImagesInVarTable.js +8 -7
  30. package/lib/exercises/math/functions/variations/partialVarTableFromGraph.js +2 -2
  31. package/lib/exercises/math/functions/variations/readExtremaOnGraph.d.ts.map +1 -1
  32. package/lib/exercises/math/functions/variations/readExtremaOnGraph.js +12 -6
  33. package/lib/exercises/math/functions/variations/readVarOnGraph.js +8 -8
  34. package/lib/exercises/math/functions/variations/varTableExtremaReading.js +6 -6
  35. package/lib/exercises/math/functions/variations/varTableFromGraph.d.ts.map +1 -1
  36. package/lib/exercises/math/functions/variations/varTableFromGraph.js +2 -7
  37. package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
  38. package/lib/exercises/math/functions/variations/varTableFromSentences.js +3 -1
  39. package/lib/exercises/math/geometry/optimisation/geometryExtremaReadingOnGraph.js +5 -5
  40. package/lib/exercises/math/geometry/optimisation/lengthIntervalOnPicture.js +1 -1
  41. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  42. package/lib/exercises/math/geometry/thales/thalesCalcul.js +3 -2
  43. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -1
  44. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +3 -2
  45. package/lib/exercises/math/probaStat/basicProbas/ballsBasicProbas.d.ts.map +1 -1
  46. package/lib/exercises/math/probaStat/basicProbas/ballsBasicProbas.js +2 -2
  47. package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +1 -1
  48. package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +1 -1
  49. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
  50. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -2
  51. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  52. package/lib/exercises/math/probaStat/stats1var/index.js +2 -2
  53. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts +7 -0
  54. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -0
  55. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +80 -0
  56. package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts +8 -0
  57. package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts.map +1 -0
  58. package/lib/exercises/math/probaStat/stats1var/medianWithTable.js +108 -0
  59. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
  60. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +9 -1
  61. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
  62. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -1
  63. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +2 -2
  64. package/lib/exercises/pc/dosage/concentrationCalculation.js +3 -3
  65. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +3 -3
  66. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
  67. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
  68. package/lib/exercises/pc/electricity/ohmLaw.js +1 -1
  69. package/lib/exercises/pc/energy/calorificValue.js +1 -1
  70. package/lib/exercises/pc/energy/combustionTransferEnergy.js +1 -1
  71. package/lib/exercises/pc/energy/combustionTransferEnergy2.js +2 -2
  72. package/lib/exercises/pc/energy/efficiencyCalculation.js +3 -3
  73. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +5 -5
  74. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +1 -1
  75. package/lib/exercises/pc/forces/gravitationalForcePlanets.js +1 -1
  76. package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +1 -1
  77. package/lib/exercises/pc/motion/averageSpeedCalculation.js +4 -4
  78. package/lib/exercises/pc/orderOfMagnitude.js +1 -1
  79. package/lib/exercises/pc/power/calculatePowerOfLight.js +1 -1
  80. package/lib/exercises/pc/spectral/spectralEnergy.js +1 -1
  81. package/lib/exercises/pc/waves/lightDistanceConversion.js +4 -4
  82. package/lib/exercises/pc/waves/periodicWaveCelerity.js +3 -3
  83. package/lib/index.d.ts +1 -0
  84. package/lib/index.d.ts.map +1 -1
  85. package/lib/math/geometry/triangles/triangle.d.ts +2 -1
  86. package/lib/math/geometry/triangles/triangle.d.ts.map +1 -1
  87. package/lib/math/geometry/triangles/triangle.js +3 -1
  88. package/lib/math/utils/round.d.ts.map +1 -1
  89. package/lib/math/utils/round.js +4 -0
  90. package/lib/playground.d.ts.map +1 -1
  91. package/lib/playground.js +1 -3
  92. package/lib/tree/nodes/sets/intervalNode.d.ts +4 -0
  93. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  94. package/lib/tree/nodes/sets/intervalNode.js +12 -0
  95. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getParityBetweenTwoNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AA0HF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
1
+ {"version":3,"file":"getParityBetweenTwoNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAyHF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
@@ -30,11 +30,10 @@ const getInstruction = (identifiers) => {
30
30
  return `Combien y a-t-il de nombres ${isAskingParity ? "pairs" : "impairs"} entre $${a}$ et $${b}$ ?`;
31
31
  };
32
32
  const getHint = (identifiers) => {
33
- return `Rappel sur la parité :
34
-
33
+ return `
35
34
  - Un nombre est pair s'il est divisible par $2$ (il finit par $0$, $2$, $4$, $6$ ou $8$) ;
36
- - Un nombre est impair s'il n'est **pas** divisible par $2$ (il finit par $1$, $3$, $5$, $7$ ou $9$) ;
37
- - Pensez que seuls les nombres **strictement entre** les deux bornes sont à prendre en compte.`;
35
+ - un nombre est impair s'il n'est **pas** divisible par $2$ (il finit par $1$, $3$, $5$, $7$ ou $9$) ;
36
+ - seuls les nombres **strictement entre** les deux bornes sont à prendre en compte.`;
38
37
  };
39
38
  const getCorrection = (identifiers) => {
40
39
  let { a, b, isAskingParity } = identifiers;
@@ -14,7 +14,7 @@ const getInstruction = (identifiers) => {
14
14
  const { affinecoeffs } = identifiers;
15
15
  const affine = AffineConstructor.fromCoeffs(affinecoeffs);
16
16
  const func = new CosNode(affine.toTree().simplify({ forbidFactorize: true })).toTex();
17
- return `Calculez la dérivée seconde de la fonction $f$ définie par :
17
+ return `Calculer la dérivée seconde de la fonction $f$ définie par :
18
18
 
19
19
  $$
20
20
  f(x) = ${func}
@@ -20,7 +20,7 @@ const getInstruction = (identifiers) => {
20
20
  const { affinecoeffs } = identifiers;
21
21
  const affine = AffineConstructor.fromCoeffs(affinecoeffs);
22
22
  const func = new SinNode(affine.toTree().simplify({ forbidFactorize: true })).toTex();
23
- return `Calculez la dérivée seconde de la fonction $f$ définie sur $\\mathbb{R}$ par :
23
+ return `Calculer la dérivée seconde de la fonction $f$ définie sur $\\mathbb{R}$ par :
24
24
 
25
25
  $$
26
26
  f(x) = ${func}
@@ -17,7 +17,7 @@ const getInstruction = ({ xValues, yValues }) => {
17
17
  ["$x$", ...xValues.map((n) => dollarize(n.frenchify()))],
18
18
  ["$y$", ...yValues.map((n) => dollarize(n.frenchify()))],
19
19
  ]);
20
- return `On considère la série statistique ci-dessous. Déterminez l'équation de la droite d'ajustement obtenue par la méthode des moindres carrés.
20
+ return `On considère la série statistique ci-dessous. Déterminer l'équation de la droite d'ajustement obtenue par la méthode des moindres carrés.
21
21
 
22
22
  ${dataTable}
23
23
 
@@ -1 +1 @@
1
- {"version":3,"file":"affineAdjustmentRsquared.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustmentRsquared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA2GF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAalE,CAAC"}
1
+ {"version":3,"file":"affineAdjustmentRsquared.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustmentRsquared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA+GF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAalE,CAAC"}
@@ -15,7 +15,11 @@ const getInstruction = (identifiers) => {
15
15
  ["$x$", ...xValues.map((n) => dollarize(n.frenchify()))],
16
16
  ["$y$", ...yValues.map((n) => dollarize(n.frenchify()))],
17
17
  ]);
18
- return `On considère la série statistique ci-dessous. Déterminez la valeur du coefficient de détermination. ${dataTable}
18
+ return `On considère la série statistique ci-dessous :
19
+
20
+ ${dataTable}
21
+
22
+ Déterminer la valeur du coefficient de détermination pour un ajustement affine de cette série.
19
23
  `;
20
24
  };
21
25
  const getAnswer = (identifiers) => {
@@ -2,6 +2,7 @@ import { Exercise } from "../../../../exercises/exercise.js";
2
2
  type Identifiers = {
3
3
  a: number;
4
4
  b: number;
5
+ isCoeffFirst: boolean;
5
6
  };
6
7
  export declare const algebricExpressionOfAffine: Exercise<Identifiers>;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"algebricExpressionOfAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/algebricExpressionOfAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0GF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
1
+ {"version":3,"file":"algebricExpressionOfAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/algebricExpressionOfAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA8GF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
@@ -3,10 +3,13 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
3
3
  import { Affine, AffineConstructor } from "../../../../math/polynomials/affine.js";
4
4
  import { randint } from "../../../../math/utils/random/randint.js";
5
5
  import { polynomialParser } from "../../../../tree/parsers/polynomialParser.js";
6
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
7
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
7
8
  const getInstruction = (identifiers) => {
8
- const { a, b } = identifiers;
9
- return `Soit une fonction affine $f$ dont le coefficient directeur vaut $${a}$ et l'ordonnée à l'origine vaut $${b}$.
9
+ const { a, b, isCoeffFirst } = identifiers;
10
+ const coeff = `le coefficient directeur vaut $${a}$`;
11
+ const ord = `l'ordonnée à l'origine vaut $${b}$`;
12
+ return `Soit une fonction affine $f$ dont ${isCoeffFirst ? coeff : ord} et ${isCoeffFirst ? ord : coeff}.
10
13
 
11
14
  Écrire l'expression algébrique de $f(x)$.`;
12
15
  };
@@ -45,7 +48,7 @@ const getAlgebricExpressionOfAffineQuestion = () => {
45
48
  const f = AffineConstructor.random();
46
49
  const a = f.a;
47
50
  const b = f.b;
48
- const identifiers = { a, b };
51
+ const identifiers = { a, b, isCoeffFirst: coinFlip() };
49
52
  return getQuestionFromIdentifiers(identifiers);
50
53
  };
51
54
  const getQuestionFromIdentifiers = (identifiers) => {
@@ -1 +1 @@
1
- {"version":3,"file":"leadingCoeffAndOriginOrdinate.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AA+FF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAkB/D,CAAC"}
1
+ {"version":3,"file":"leadingCoeffAndOriginOrdinate.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AA+FF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAkB/D,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
3
4
  import { Affine, AffineConstructor } from "../../../../math/polynomials/affine.js";
4
5
  import { randint } from "../../../../math/utils/random/randint.js";
5
6
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
@@ -75,7 +76,7 @@ const getPropositions = (n, { answer, a, b, isAskingA }) => {
75
76
  return shuffleProps(propositions, n);
76
77
  };
77
78
  const isAnswerValid = (ans, { answer }) => {
78
- return ans === answer;
79
+ return numberVEA(ans, answer);
79
80
  };
80
81
  export const leadingCoeffAndOriginOrdinate = {
81
82
  id: "leadingCoeffAndOriginOrdinate",
@@ -58,7 +58,7 @@ const getHint = (identifiers) => {
58
58
  default:
59
59
  break;
60
60
  }
61
- return `Quelles sont les valeurs de $x$ telles que $f(x) = 0$ ?`;
61
+ return `Combien de valeurs de $x$ ont pour image $0$ par $f$ ?`;
62
62
  };
63
63
  const getCorrection = (identifiers) => {
64
64
  const { type, a, b, c, d } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"findZeroesProductQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/findZeroesProductQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAqCrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AA+MF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAkB3D,CAAC"}
1
+ {"version":3,"file":"findZeroesProductQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/findZeroesProductQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAqCrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AA6NF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAkB3D,CAAC"}
@@ -77,7 +77,13 @@ const getHint = (identifiers) => {
77
77
  if (type === 1) {
78
78
  return `Un quotient est nul lorsque son numérateur est nul, et son dénominateur non nul. Cherche donc les valeurs de $x$ qui rendent le numérateur nul, mais pas le dénominateur.`;
79
79
  }
80
- return `Cherche les solutions de l'équation $x^2 = k$.`;
80
+ return `Tu peux factoriser cette expression en utilisant l'identité remarquable :
81
+
82
+ $$
83
+ a^2 - b^2 = (a+b)(a-b)
84
+ $$
85
+
86
+ Puis, utilise le fait qu'un produit est nul si et seulement si au moins un des deux facteurs est nul.`;
81
87
  };
82
88
  const getCorrection = (identifiers) => {
83
89
  const myFunc = buildFunc(identifiers);
@@ -124,11 +130,20 @@ $$
124
130
  ${answer}
125
131
  $$`;
126
132
  }
127
- return `On résout l'équation :
133
+ const sqrt = Math.sqrt(a);
134
+ return `On factorise en utilisant l'identité remarquable suivante :
135
+
136
+ $$
137
+ a^2 - b^2 = (a+b)(a-b)
138
+ $$
139
+
140
+ On a donc :
128
141
 
129
142
  ${alignTex([
130
143
  ["", buildFunc(identifiers).toTex() + "=0"],
131
- ["\\iff", `x^2=${a}`],
144
+ ["\\iff", `x^2 - ${sqrt}^2 = 0`],
145
+ ["\\iff", `\\left(x+${sqrt}\\right)\\left(x-${sqrt}\\right) = 0`],
146
+ ["\\iff", `x=-${sqrt} \\text{ ou } x=${sqrt}`],
132
147
  ])}
133
148
 
134
149
  Il y a donc deux solutions à cette équaton :
@@ -135,8 +135,8 @@ const getCorrection = (identifiers) => {
135
135
  : "inférieure";
136
136
  const word2 = isAskingSup
137
137
  ? isStrict
138
- ? "strictement au-dessous"
139
- : "au-dessous"
138
+ ? "strictement au-dessus"
139
+ : "au-dessus"
140
140
  : isStrict
141
141
  ? "strictement en-dessous"
142
142
  : "en-dessous";
@@ -48,7 +48,7 @@ const getInstruction = (identifiers) => {
48
48
  const inequation = new InequationSymbol(inegalitySymbol);
49
49
  const isStrict = inequation.isStrict;
50
50
  const isAskingSup = inequation.isSup;
51
- return `Ci-dessous est tracé la courbe représentative d'une fonction $f$. Déterminer graphiquement les solutions de l'inéquation $f(x)${isAskingSup ? (isStrict ? ">" : "\\geq") : isStrict ? "<" : "\\leq"}${yValue}$`;
51
+ return `Ci-dessous est tracée la courbe représentative d'une fonction $f$. Déterminer graphiquement les solutions de l'inéquation $f(x)${isAskingSup ? (isStrict ? ">" : "\\geq") : isStrict ? "<" : "\\leq"}${yValue}$`;
52
52
  };
53
53
  const getHint = (identifiers) => {
54
54
  const { yValue, inegalitySymbol, a, b } = identifiers;
@@ -13,7 +13,7 @@ import { random } from "../../../../utils/alea/random.js";
13
13
  import { unionIntervalParser } from "../../../../tree/parsers/unionIntervalParser.js";
14
14
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
15
15
  const getInstruction = (identifiers) => {
16
- return `Déterminer graphiquement les solutions de l'inéquation $f(x) ${identifiers.ineqSymbol} g(x)$ où $f$ et $g$ sont les fonctions représentées ci-dessous.`;
16
+ return `Déterminer graphiquement les solutions de l'inéquation $f(x) ${identifiers.ineqSymbol} g(x)$ où $f$ et $g$ sont les fonctions dont les courbes représentatives sont données ci-dessous.`;
17
17
  };
18
18
  const getKeys = (identifiers) => {
19
19
  return [
@@ -17,7 +17,7 @@ const getInstruction = (identifiers) => {
17
17
  const upperBound = trigValues[upperBoundIndex];
18
18
  const cosine = new MultiplyNode(k.toTree(), new CosNode(new VariableNode("x")));
19
19
  const integral = new IntegralNode(cosine, lowerBound, upperBound, "x");
20
- return `Calculez la valeur de l'intégrale suivante :
20
+ return `Calculer la valeur de l'intégrale suivante :
21
21
 
22
22
  $$
23
23
  ${integral.toTex()}
@@ -163,7 +163,7 @@ const getPropositions = (n, { answer }) => {
163
163
  addValidProp(propositions, answer, "raw");
164
164
  tryToAddWrongProp(propositions, "Paire", "raw");
165
165
  tryToAddWrongProp(propositions, "Impaire", "raw");
166
- tryToAddWrongProp(propositions, "Ni paire ni impaire", "raw");
166
+ tryToAddWrongProp(propositions, "Ni paire, ni impaire", "raw");
167
167
  tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
168
168
  return shuffleProps(propositions, n);
169
169
  };
@@ -1 +1 @@
1
- {"version":3,"file":"affineProductSignTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineProductSignTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAmNF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
1
+ {"version":3,"file":"affineProductSignTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineProductSignTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAqNF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
@@ -56,7 +56,7 @@ const getInstruction = (identifiers) => {
56
56
  const affine1 = AffineConstructor.fromCoeffs(identifiers.affine1Coeffs);
57
57
  const affine2 = AffineConstructor.fromCoeffs(identifiers.affine2Coeffs);
58
58
  const product = multiply(affine1.toTree(), affine2.toTree());
59
- return `Compléter le tableau de signes suivant afin de déterminer le signe de la fonction $f$ définie par :
59
+ return `Compléter le tableau de signes suivant afin de déterminer le signe de la fonction $f$ définie sur $\\mathbb{R}$ par :
60
60
 
61
61
  $$
62
62
  f(x) = ${product.toTex()}
@@ -65,7 +65,9 @@ $$`;
65
65
  const getHint = (identifiers) => {
66
66
  const affine1 = AffineConstructor.fromCoeffs(identifiers.affine1Coeffs);
67
67
  const affine2 = AffineConstructor.fromCoeffs(identifiers.affine2Coeffs);
68
- return `Résous les inéquations $${affine1.toTree().toTex()}>0$ et $${affine2
68
+ return `La fonction est définie sur $\\mathbb{R}$, donc les valeurs de $x$ vont de $-\\infty$ à $+\\infty$.
69
+
70
+ Résous ensuite les inéquations $${affine1.toTree().toTex()}>0$ et $${affine2
69
71
  .toTree()
70
72
  .toTex()}>0$.
71
73
 
@@ -53,7 +53,7 @@ const getInstruction = (identifiers) => {
53
53
  const affine1 = AffineConstructor.fromCoeffs(identifiers.affine1Coeffs);
54
54
  const affine2 = AffineConstructor.fromCoeffs(identifiers.affine2Coeffs);
55
55
  const product = multiply(affine1.toTree(), affine2.toTree());
56
- return `Compléter le tableau de signes suivant afin de déterminer le signe de la fonction $f$ définie par :
56
+ return `Compléter le tableau de signes suivant afin de déterminer le signe de la fonction $f$ définie sur $\\mathbb{R}$ par :
57
57
 
58
58
  $$
59
59
  f(x) = ${product.toTex()}
@@ -1 +1 @@
1
- {"version":3,"file":"affineSignTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineSignTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAoGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAkBjD,CAAC"}
1
+ {"version":3,"file":"affineSignTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineSignTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAsGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAkBjD,CAAC"}
@@ -31,7 +31,9 @@ f(x) = ${affine.toTree().toTex()}
31
31
  $$`;
32
32
  };
33
33
  const getHint = (identifiers) => {
34
- return `Résous l'inéquation $f(x)>0$.`;
34
+ return `La fonction est définie sur $\\mathbb{R}$, donc les valeurs de $x$ vont de $-\\infty$ à $+\\infty$.
35
+
36
+ Résous ensuite l'inéquation $f(x)>0$.`;
35
37
  };
36
38
  const getCorrection = (identifiers) => {
37
39
  const { affineCoeffs, initTable } = identifiers;
@@ -92,8 +92,8 @@ const getInstruction = (identifiers) => {
92
92
  }
93
93
  const secondRow = ["\\ ", ...signs, "\\ "];
94
94
  const table = [
95
- [`x`, ...firstRow],
96
- [`f(x)`, ...secondRow],
95
+ [x£`, ...firstRow],
96
+ [f(x)£`, ...secondRow],
97
97
  ];
98
98
  const sign = type === 0 ? "=" : ineqSymbol;
99
99
  return `On considère le tableau de signes suivant d'une fonction $f$ :
@@ -38,8 +38,8 @@ const getInstruction = (identifiers) => {
38
38
  }
39
39
  const secondRow = ["\\ ", ...signs, "\\ "];
40
40
  const table = [
41
- [`x`, ...firstRow],
42
- [`f(x)`, ...secondRow],
41
+ [x£`, ...firstRow],
42
+ [f(x)£`, ...secondRow],
43
43
  ];
44
44
  return `On considère le tableau de signes suivant d'une fonction $f$ :
45
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"compareImagesInVarTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/compareImagesInVarTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgJF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
1
+ {"version":3,"file":"compareImagesInVarTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/compareImagesInVarTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkJF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
@@ -13,7 +13,7 @@ const getPropositions = (n, { answer }) => {
13
13
  };
14
14
  const getAnswer = (identifiers) => {
15
15
  const { a, b, vars, xs, ys } = identifiers;
16
- const index = a < xs[0] ? 0 : a > xs[1] ? 2 : 1;
16
+ const index = a < xs[0] ? 0 : a >= xs[1] ? 2 : 1;
17
17
  if (vars[index] === "\\nearrow") {
18
18
  return "\\le";
19
19
  }
@@ -25,7 +25,7 @@ const getInstruction = (identifiers) => {
25
25
  const { a, b, vars, xs, ys } = identifiers;
26
26
  const firstIncr = vars[0] === "\\nearrow";
27
27
  const table = [
28
- ["x", "-\\infty", "\\ ", xs[0], "\\ ", xs[1], "\\ ", "+\\infty"],
28
+ ["£x£", "-\\infty", "\\ ", xs[0], "\\ ", xs[1], "\\ ", "+\\infty"],
29
29
  [
30
30
  " ",
31
31
  "\\ ",
@@ -36,7 +36,7 @@ const getInstruction = (identifiers) => {
36
36
  "\\ ",
37
37
  "\\ ",
38
38
  ],
39
- ["f(x)", "\\ ", vars[0], "\\ ", vars[1], "\\ ", vars[2], "\\ "],
39
+ ["£f(x)£", "\\ ", vars[0], "\\ ", vars[1], "\\ ", vars[2], "\\ "],
40
40
  [
41
41
  " ",
42
42
  "\\ ",
@@ -61,13 +61,14 @@ $$`;
61
61
  };
62
62
  const getHint = (identifiers) => {
63
63
  const { a, b, vars, xs, ys } = identifiers;
64
- return `Si $a$ et $b$ sont deux nombres d'un intervalle $I$ sur lequel une fonction $f$ est croissante, alors $f(a)\\leq f(b)$.
64
+ return `Soient $a$ et $b$ deux nombres d'un intervalle $I$, tels que $a\\leq b$ :
65
65
 
66
- Si sur cet intervalle, $f$ est décroissante, alors $f(a)\\geq f(b)$.`;
66
+ - si la fonction $f$ est croissante sur $I$, alors $f(a)\\leq f(b)$;
67
+ - si la fonction $f$ est décroissante sur $I$, alors $f(a)\\geq f(b)$.`;
67
68
  };
68
69
  const getCorrection = (identifiers) => {
69
70
  const { a, b, vars, xs, ys } = identifiers;
70
- const index = a < xs[0] ? 0 : a > xs[1] ? 2 : 1;
71
+ const index = a < xs[0] ? 0 : a >= xs[1] ? 2 : 1;
71
72
  const intervals = [
72
73
  new IntervalNode(MinusInfinityNode, xs[0].toTree(), ClosureType.OF),
73
74
  new IntervalNode(xs[0].toTree(), xs[1].toTree(), ClosureType.FF),
@@ -77,7 +78,7 @@ const getCorrection = (identifiers) => {
77
78
 
78
79
  Or, sur cet intervalle, la fonction $f$ est ${vars[index] === "\\nearrow" ? "croissante" : "décroissante"} d'après le tableau de variations.
79
80
 
80
- On en déduit que :
81
+ Puisque $${a}\\leq ${b}$, on en déduit que :
81
82
 
82
83
  $$
83
84
  f(${a}) \\ ${vars[index] === "\\nearrow" ? "\\le" : "\\ge"} f(${b})
@@ -64,7 +64,7 @@ const getSecondsLines = (coeffs) => {
64
64
  "\\ ",
65
65
  a > 0 ? fx1.toTree().toTex() : "\\ ",
66
66
  "\\ ",
67
- a > 0 ? "\\ " : fx1.toTree().toTex(),
67
+ a > 0 ? "\\ " : fx2.toTree().toTex(),
68
68
  "\\ ",
69
69
  "\\ ",
70
70
  ],
@@ -73,7 +73,7 @@ const getSecondsLines = (coeffs) => {
73
73
  "$\\ $",
74
74
  "\\ ",
75
75
  "\\ ",
76
- a > 0 ? "\\ " : fx2.toTree().toTex(),
76
+ a > 0 ? "\\ " : fx1.toTree().toTex(),
77
77
  "\\ ",
78
78
  a > 0 ? fx2.toTree().toTex() : "\\ ",
79
79
  "\\ ",
@@ -1 +1 @@
1
- {"version":3,"file":"readExtremaOnGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/readExtremaOnGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AACF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAiOF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoB7D,CAAC"}
1
+ {"version":3,"file":"readExtremaOnGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/readExtremaOnGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AACF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA2OF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoB7D,CAAC"}
@@ -48,18 +48,24 @@ ${identifiers.askingX
48
48
  const getHint = (identifiers) => {
49
49
  return `- Le maximum d'une fonction $f$ sur un intervalle $I$ est la plus grande valeur prise par $f(x)$ pour $x\\in I$. On dit alors que le maximum de $f$ sur $I$ est $f(x)$, atteint en $x$.
50
50
 
51
- - Le minimum d'une fonction $f$ sur un intervalle $I$ est la plus petite valeur prise par $f(x)$ sur pour $x\\in I$. On dit alors que le minimum de $f$ sur $I$ est $f(x)$, atteint en $x$.`;
51
+ - Le minimum d'une fonction $f$ sur un intervalle $I$ est la plus petite valeur prise par $f(x)$ pour $x\\in I$. On dit alors que le minimum de $f$ sur $I$ est $f(x)$, atteint en $x$.`;
52
52
  };
53
53
  const getCorrection = (identifiers) => {
54
- const { askingMax, askingX, splinePoints } = identifiers;
54
+ const { askingMax, askingX, splinePoints, intervalBounds } = identifiers;
55
55
  const word = askingMax ? "maximum" : "minimum";
56
56
  const xMin = splinePoints[0][0];
57
57
  const xMax = splinePoints[splinePoints.length - 1][0];
58
- const y = (askingMax ? Math.max : Math.min)(...splinePoints.map((e) => e[1]));
59
- const x = splinePoints.find((e) => e[1] === y)[0];
60
58
  const word2 = askingMax ? "grande" : "petite";
61
- const interval = `[${xMin};${xMax}]`;
62
- return `On lit graphiquement que le ${word} de $f(x)$ sur $${interval}$ est $${y.frenchify()}$, atteint pour $x = ${x.frenchify()}$. En effet, c'est la plus ${word2} valeur de $f(x)$ sur $${interval}$.`;
59
+ // const interval = `[${xMin};${xMax}]`;
60
+ const interval = intervalBounds[0] === xMin && intervalBounds[1] === xMax
61
+ ? `[${xMin};${xMax}]`
62
+ : `[${intervalBounds[0]};${intervalBounds[1]}]`;
63
+ const extremum = (askingMax ? Math.max : Math.min)(...splinePoints
64
+ .filter((e) => e[0] >= intervalBounds[0] && e[0] <= intervalBounds[1])
65
+ .map((e) => e[1]));
66
+ const x = splinePoints.find((e) => e[1] === extremum)[0].frenchify();
67
+ const y = extremum.frenchify();
68
+ return `On lit graphiquement que le ${word} de $f(x)$ sur $${interval}$ est $${y}$, atteint pour $x = ${x}$. En effet, c'est la plus ${word2} valeur de $f(x)$ sur $${interval}$.`;
63
69
  };
64
70
  const getKeys = (identifiers) => {
65
71
  return [];
@@ -10,16 +10,16 @@ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
10
10
  const getPropositions = (n, { answer }) => {
11
11
  const propositions = [];
12
12
  addValidProp(propositions, answer, "raw");
13
- tryToAddWrongProp(propositions, "Décroissante", "raw");
14
- tryToAddWrongProp(propositions, "Croissante", "raw");
15
- tryToAddWrongProp(propositions, "Non monotone", "raw");
13
+ tryToAddWrongProp(propositions, "$f$ est décroissante", "raw");
14
+ tryToAddWrongProp(propositions, "$f$ est croissante", "raw");
15
+ tryToAddWrongProp(propositions, "$f$ n'est pas monotone", "raw");
16
16
  return shuffleProps(propositions, n);
17
17
  };
18
18
  const getAnswer = (identifiers) => {
19
19
  const { intervalAskedIndex, coeffs } = identifiers;
20
20
  return (intervalAskedIndex % 2 === 0) === coeffs[3] > 0
21
- ? "Croissante"
22
- : "Décroissante";
21
+ ? "$f$ est croissante"
22
+ : "$f$ est décroissante";
23
23
  };
24
24
  const getInterval = (identifiers) => {
25
25
  const { intervalAskedIndex, coeffs } = identifiers;
@@ -39,14 +39,14 @@ Quel est le sens de variation de $f$ sur $${interval.toTex()}$ ?`;
39
39
  };
40
40
  const getHint = (identifiers) => {
41
41
  const interval = getInterval(identifiers);
42
- return `Pour les valeurs de $x$ comprises dans l'intervalle $${interval.toTex()}$, les valeurs de $f(x)$ sont-elles en augmentation, en diminution, ou bien varient-elles ?`;
42
+ return `Observe comment varient les valeurs de $f(x)$ pour les valeurs de $x$ comprises dans l'intervalle $${interval.toTex()}$.`;
43
43
  };
44
44
  const getCorrection = (identifiers) => {
45
45
  const interval = getInterval(identifiers);
46
46
  const answer = getAnswer(identifiers);
47
- return `Sur l'intervalle $${interval.toTex()}$, on lit graphiquement que les valeurs de $f(x)$ ${answer === "Croissante" ? "augmentent" : "diminuent"}.
47
+ return `Sur l'intervalle $${interval.toTex()}$, on lit graphiquement que les valeurs de $f(x)$ ${answer.includes("décroissante") ? "diminuent" : "augmentent"}.
48
48
 
49
- On en conclut donc que $f$ est ${answer.toLocaleLowerCase()} sur cet intervalle.`;
49
+ On en conclut donc que ${answer.toLocaleLowerCase()} sur cet intervalle.`;
50
50
  };
51
51
  const getRoots = (coeffs) => {
52
52
  const [d, c, b, a] = coeffs;
@@ -26,7 +26,7 @@ const getTable = (identifiers) => {
26
26
  const secondArrow = isFirstAscending ? "\\searrow" : "\\nearrow";
27
27
  return [
28
28
  [
29
- "x",
29
+ "£x£",
30
30
  xValues[0].frenchify(),
31
31
  "\\ ",
32
32
  xValues[1].frenchify(),
@@ -45,7 +45,7 @@ const getTable = (identifiers) => {
45
45
  "\\ ",
46
46
  isFirstAscending ? yValues[3].frenchify() : "\\ ",
47
47
  ],
48
- ["f(x)", "\\ ", firstArrow, "\\ ", secondArrow, "\\ ", firstArrow, "\\ "],
48
+ ["£f(x)£", "\\ ", firstArrow, "\\ ", secondArrow, "\\ ", firstArrow, "\\ "],
49
49
  [
50
50
  " ",
51
51
  !isFirstAscending ? "\\ " : yValues[0].frenchify(),
@@ -64,11 +64,11 @@ const getInstruction = (identifiers) => {
64
64
  const table = getTable(identifiers);
65
65
  let instruction = `On considère la fonction $f$ dont le tableau de variations est donné ci-dessous :
66
66
 
67
- <svg id="varTable">${JSON.stringify(table)}</svg>
67
+ <svg id="varTable">${JSON.stringify(table)}</svg>
68
68
 
69
- ${identifiers.isAskingX
70
- ? `Sur l'intervalle $${interval.toTex()}$, en quelle valeur le ${type} de la fonction $f$ est-il atteint ?`
71
- : `Sur l'intervalle $${interval.toTex()}$, quel est le ${type} de la fonction $f$ ?`}
69
+ ${identifiers.isAskingX
70
+ ? `Sur l'intervalle $${interval.toTexNoSpace()}$, en quelle valeur le ${type} de la fonction $f$ est-il atteint ?`
71
+ : `Sur l'intervalle $${interval.toTexNoSpace()}$, quel est le ${type} de la fonction $f$ ?`}
72
72
  `;
73
73
  return instruction;
74
74
  };
@@ -1 +1 @@
1
- {"version":3,"file":"varTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAgLF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAmBnD,CAAC"}
1
+ {"version":3,"file":"varTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AA0KF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAmBnD,CAAC"}
@@ -4,11 +4,6 @@ import { Polynomial } from "../../../../math/polynomials/polynomial.js";
4
4
  import { randint } from "../../../../math/utils/random/randint.js";
5
5
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
6
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
7
- const getFunc = (identifiers) => {
8
- const { coeffs } = identifiers;
9
- const poly = new Polynomial(coeffs);
10
- return (x) => coeffs;
11
- };
12
7
  const getRoots = (identifiers) => {
13
8
  const { coeffs } = identifiers;
14
9
  const [d, c, b, a] = coeffs;
@@ -64,7 +59,7 @@ const getAnswerTable = (identifiers) => {
64
59
  "\\ ",
65
60
  a > 0 ? fx1.toTree().toTex() : "\\ ",
66
61
  "\\ ",
67
- a > 0 ? "\\ " : fx1.toTree().toTex(),
62
+ a > 0 ? "\\ " : fx2.toTree().toTex(),
68
63
  "\\ ",
69
64
  "\\ ",
70
65
  ],
@@ -73,7 +68,7 @@ const getAnswerTable = (identifiers) => {
73
68
  "$\\ $",
74
69
  "\\ ",
75
70
  "\\ ",
76
- a > 0 ? "\\ " : fx2.toTree().toTex(),
71
+ a > 0 ? "\\ " : fx1.toTree().toTex(),
77
72
  "\\ ",
78
73
  a > 0 ? fx2.toTree().toTex() : "\\ ",
79
74
  "\\ ",
@@ -1 +1 @@
1
- {"version":3,"file":"varTableFromSentences.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromSentences.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,EAAE,eAAe,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAwLF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
1
+ {"version":3,"file":"varTableFromSentences.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromSentences.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,EAAE,eAAe,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AA0LF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
@@ -78,7 +78,9 @@ De plus, on a $f(${xsNodes[0].toTex()})=${vars[0]}$, $f(${xsNodes[1].toTex()})=$
78
78
  Dresser le tableau de variations de $f$.`;
79
79
  };
80
80
  const getHint = (identifiers) => {
81
- return `La première ligne d'un tableau de variations contient les valeurs de $x$. La deuxième ligne donne les variations de la fonction en fonction des valeurs de $x$ de la première ligne.`;
81
+ return `La première ligne d'un tableau de variations contient les valeurs de $x$ particulières : les bornes du domaine de définition, et les valeurs auxquelles le sens de variation change.
82
+
83
+ La deuxième ligne du tableau donne les variations de la fonction sur chaque intervalle, et les extremums (valeurs de $f(x)$).`;
82
84
  };
83
85
  const getCorrection = (identifiers) => {
84
86
  const { vars, xs } = identifiers;
@@ -25,7 +25,7 @@ const getAnswer = (identifiers) => {
25
25
  };
26
26
  const getInstruction = (identifiers) => {
27
27
  const { perimeter, askingX } = identifiers;
28
- return `On cherche à construire un rectangle de périmètre $${perimeter}$ et de surface la plus grande possible.
28
+ return `On cherche à construire un rectangle de périmètre $${perimeter}$ et d'aire la plus grande possible.
29
29
 
30
30
  On appelle $x$ la largeur du rectangle. Son aire s'obtient alors par la formule :
31
31
 
@@ -36,8 +36,8 @@ $$
36
36
  On a tracé ci-dessous la courbe de la fonction A.
37
37
 
38
38
  ${askingX
39
- ? `Quelle doit être la largeur du rectangle pour avoir la surface maximale ?`
40
- : `Quelle est la surface maximale de ce rectangle ?`}
39
+ ? `Quelle doit être la largeur du rectangle pour avoir l'aire maximale ?`
40
+ : `Quelle est l'aire maximale de ce rectangle ?`}
41
41
 
42
42
  *On pourra zoomer et se déplacer sur le graphique.*`;
43
43
  };
@@ -63,8 +63,8 @@ ${askingX
63
63
  On voit que le maximum de $A$ est $${y}$, atteint pour $x=${x}$.
64
64
 
65
65
  ${askingX
66
- ? `Le rectangle atteint donc sa surface maximale pour une largeur de $${x}$.`
67
- : `La surface maximale du rectangle est donc $${y}$.`}`;
66
+ ? `Le rectangle atteint donc son aire maximale pour une largeur de $${x}$.`
67
+ : `L'aire maximale du rectangle est donc $${y}$.`}`;
68
68
  };
69
69
  const getGGBOptions = (identifiers) => {
70
70
  const { perimeter } = identifiers;
@@ -27,7 +27,7 @@ Dans quel intervalle $x$ peut-il varier ?
27
27
  ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/squareWithX.png)`;
28
28
  };
29
29
  const getHint = (identifiers) => {
30
- return `Le point $M$ peut être situé n'importe où sur le segment $[AB]$. Quelle peut être la plus petit valeur de $AM$ ? et sa plus grande valeur ?`;
30
+ return `Le point $M$ peut être situé n'importe où sur le segment $[AB]$. Quelle peut être la plus petite valeur de $AM$ ? et sa plus grande valeur ?`;
31
31
  };
32
32
  const getCorrection = (identifiers) => {
33
33
  const { shape, side } = identifiers;