math-exercises 3.0.201 → 3.0.202

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 (113) hide show
  1. package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +2 -0
  2. package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -1
  3. package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +2 -2
  4. package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.js +2 -2
  5. package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts.map +1 -1
  6. package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js +9 -2
  7. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +1 -1
  8. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +1 -0
  9. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -1
  10. package/lib/exercises/math/derivation/derivative/trigo/index.js +1 -1
  11. package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts.map +1 -1
  12. package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +1 -1
  13. package/lib/exercises/math/derivation/problems/index.d.ts +1 -0
  14. package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -1
  15. package/lib/exercises/math/derivation/problems/index.js +1 -1
  16. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -1
  17. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +31 -21
  18. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -1
  19. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +8 -128
  20. package/lib/exercises/math/derivation/tangent/index.d.ts +1 -0
  21. package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
  22. package/lib/exercises/math/derivation/tangent/index.js +1 -1
  23. package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
  24. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  25. package/lib/exercises/math/derivation/variations/index.js +1 -1
  26. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -1
  27. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +47 -20
  28. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
  29. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +29 -6
  30. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
  31. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +33 -0
  32. package/lib/exercises/math/equaDiff/exponentialDifferentialEquation.d.ts +7 -0
  33. package/lib/exercises/math/equaDiff/exponentialDifferentialEquation.d.ts.map +1 -0
  34. package/lib/exercises/math/equaDiff/exponentialDifferentialEquation.js +86 -0
  35. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -1
  36. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +35 -7
  37. package/lib/exercises/math/equaDiff/index.d.ts +1 -1
  38. package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
  39. package/lib/exercises/math/equaDiff/index.js +1 -1
  40. package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -1
  41. package/lib/exercises/math/functions/integral/integralExpU.js +48 -0
  42. package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -1
  43. package/lib/exercises/math/functions/integral/integralFractions.js +52 -0
  44. package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -1
  45. package/lib/exercises/math/functions/integral/integralTrinomials.js +40 -0
  46. package/lib/exercises/math/functions/logarithm/log10Simplifying.js +2 -2
  47. package/lib/exercises/math/functions/logarithm/powerEquation.js +1 -1
  48. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
  49. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +30 -25
  50. package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
  51. package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +52 -5
  52. package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts.map +1 -1
  53. package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.js +26 -35
  54. package/lib/exercises/math/integration/fromExpr/index.d.ts +1 -0
  55. package/lib/exercises/math/integration/fromExpr/index.d.ts.map +1 -1
  56. package/lib/exercises/math/integration/fromExpr/index.js +1 -1
  57. package/lib/exercises/math/primitive/constantPrimitive.d.ts.map +1 -1
  58. package/lib/exercises/math/primitive/constantPrimitive.js +25 -1
  59. package/lib/exercises/math/primitive/exponentialPrimitive.d.ts.map +1 -1
  60. package/lib/exercises/math/primitive/exponentialPrimitive.js +17 -0
  61. package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
  62. package/lib/exercises/math/primitive/polynomialPrimitive.js +17 -1
  63. package/lib/exercises/math/primitive/sinCosPrimitive.d.ts.map +1 -1
  64. package/lib/exercises/math/primitive/sinCosPrimitive.js +20 -1
  65. package/lib/exercises/math/primitive/usualPrimitives.d.ts.map +1 -1
  66. package/lib/exercises/math/primitive/usualPrimitives.js +1 -0
  67. package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.js +4 -4
  68. package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.js +3 -3
  69. package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.js +4 -4
  70. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js +1 -1
  71. package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts.map +1 -1
  72. package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.js +12 -25
  73. package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts +1 -1
  74. package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts.map +1 -1
  75. package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.js +1 -2
  76. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts.map +1 -1
  77. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.js +11 -26
  78. package/lib/exercises/math/spaceGeometry/planes/index.d.ts +1 -0
  79. package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -1
  80. package/lib/exercises/math/spaceGeometry/planes/index.js +1 -1
  81. package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts.map +1 -1
  82. package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.js +11 -25
  83. package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts.map +1 -1
  84. package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js +25 -5
  85. package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts +1 -0
  86. package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts.map +1 -1
  87. package/lib/exercises/math/spaceGeometry/scalarProduct/index.js +1 -1
  88. package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js +2 -2
  89. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -1
  90. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +87 -24
  91. package/lib/exercises/pc/mathExosInPC.d.ts +1 -1
  92. package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
  93. package/lib/exercises/pc/mathExosInPC.js +1 -1
  94. package/lib/index.d.ts +55 -0
  95. package/lib/index.d.ts.map +1 -1
  96. package/lib/math/geometry/spaceVector.d.ts +2 -0
  97. package/lib/math/geometry/spaceVector.d.ts.map +1 -1
  98. package/lib/math/geometry/spaceVector.js +40 -0
  99. package/lib/math/utils/polynomial/polynomialUtils.d.ts +2 -2
  100. package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -1
  101. package/lib/math/utils/polynomial/polynomialUtils.js +5 -2
  102. package/lib/tests/exoTest.js +1 -1
  103. package/lib/tests/questionTest.d.ts.map +1 -1
  104. package/lib/tests/questionTest.js +7 -3
  105. package/lib/tests/singleExo.test.d.ts.map +1 -1
  106. package/lib/tests/singleExo.test.js +2 -2
  107. package/lib/tree/utilities/nodeComparator.d.ts +1 -1
  108. package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
  109. package/lib/tree/utilities/nodeComparator.js +6 -4
  110. package/lib/tree/utilities/nodeSimplifier.d.ts +1 -0
  111. package/lib/tree/utilities/nodeSimplifier.d.ts.map +1 -1
  112. package/lib/tree/utilities/nodeSimplifier.js +40 -0
  113. package/package.json +1 -1
@@ -1,4 +1,6 @@
1
1
  export * from "./scatterPlotCommenting.js";
2
+ export * from "./scatterPlotFillDataTableFromScatterPlotData.js";
3
+ export * from "./scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js";
2
4
  export * from "./scatterPlotInterpreting.js";
3
5
  export * from "./scatterPlotBuildScatterPlotFromDataTable.js";
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/dataRepresentations/scatterPlot/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAG3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+CAA+C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/dataRepresentations/scatterPlot/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kDAAkD,CAAC;AACjE,cAAc,iEAAiE,CAAC;AAChF,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+CAA+C,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from "./scatterPlotCommenting.js";
2
- // export * from "./scatterPlotFillDataTableFromScatterPlotData.js";
3
- // export * from "./scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js";
2
+ export * from "./scatterPlotFillDataTableFromScatterPlotData.js";
3
+ export * from "./scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js";
4
4
  export * from "./scatterPlotInterpreting.js";
5
5
  export * from "./scatterPlotBuildScatterPlotFromDataTable.js";
@@ -37,7 +37,7 @@ const getInitTable = (identifiers) => {
37
37
  const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
38
38
  const arrValue = getArrValueForScatterPlotData(arrPoint, strGroupBy);
39
39
  const tableRaw = [
40
- [`$${strGroupBy}$`, ...arrValue.map(() => "\\ ")],
40
+ [strGroupBy, ...arrValue.map(() => "\\ ")],
41
41
  ["\\text{valeur}", ...arrValue.map(() => "")],
42
42
  ["\\text{effectif}", ...arrValue.map(() => "")],
43
43
  ];
@@ -55,7 +55,7 @@ const getAnswerTable = (identifiers) => {
55
55
  };
56
56
  });
57
57
  const tableRaw = [
58
- [`$${strGroupBy}$`, ...arrValue.map(() => "\\ ")],
58
+ [strGroupBy, ...arrValue.map(() => "\\ ")],
59
59
  ["\\text{valeur}", ...arrDict.map(({ value }) => value.frenchify())],
60
60
  ["\\text{effectif}", ...arrDict.map(({ count }) => count.frenchify())],
61
61
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AA0B7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,eAAe,EAAE,CAAC;CACvC,CAAC;AAwXF,eAAO,MAAM,0DAA0D,EAAE,QAAQ,CAAC,WAAW,CA2B1F,CAAC"}
1
+ {"version":3,"file":"scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AA0B7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,eAAe,EAAE,CAAC;CACvC,CAAC;AA+XF,eAAO,MAAM,0DAA0D,EAAE,QAAQ,CAAC,WAAW,CA2B1F,CAAC"}
@@ -34,7 +34,7 @@ const getInitTable = (identifiers) => {
34
34
  const { strGroupBy, isTransposed, nodeIdsDataClasses } = identifiers;
35
35
  const arrDataClass = nodeIdsDataClasses.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
36
36
  const tableRaw = [
37
- [`$${strGroupBy}$`, ...arrDataClass.map(() => `\\ `)],
37
+ [strGroupBy, ...arrDataClass.map(() => `\\ `)],
38
38
  [
39
39
  "\\text{classe}",
40
40
  ...arrDataClass.map((intervalNode) => intervalNode.toTex()),
@@ -54,7 +54,7 @@ const getAnswerTable = (identifiers) => {
54
54
  }).length;
55
55
  });
56
56
  const tableRaw = [
57
- [`$${strGroupBy}$`, ...arrDataClass.map(() => `\\ `)],
57
+ [strGroupBy, ...arrDataClass.map(() => `\\ `)],
58
58
  [
59
59
  "\\text{classe}",
60
60
  ...arrDataClass.map((intervalNode) => intervalNode.toTex()),
@@ -329,6 +329,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
329
329
  correction: getCorrection(identifiers),
330
330
  correctionGgbOptions: getCorrectionGGBOptions(identifiers),
331
331
  ggbOptions: getGGBOptions(identifiers),
332
+ style: {
333
+ tableOptions: {
334
+ firstColumnIsHeader: true,
335
+ firstRowIsHeader: true,
336
+ firstCellIsDivided: false,
337
+ },
338
+ },
332
339
  };
333
340
  };
334
341
  export const scatterPlotFillDataTableWithDataClassesFromScatterPlotData = {
@@ -66,7 +66,7 @@ $$
66
66
  On dérive alors de nouveau :
67
67
 
68
68
  ${alignTex([
69
- ["f'(x)", "=", multiply(multiply(a, a), exp(aff)).toTex()],
69
+ ["f''(x)", "=", multiply(multiply(a, a), exp(aff)).toTex()],
70
70
  ["", "=", getAnswer(identifiers)],
71
71
  ])}
72
72
  `;
@@ -4,4 +4,5 @@ export * from "./sinSecondDegreeDerivative.js";
4
4
  export * from "./cosSecondDegreeDerivative.js";
5
5
  export * from "./productOfSinAXPlusBCosCXPlusDDerivative.js";
6
6
  export * from "./sinAndCosMixedWithSquareDerivative.js";
7
+ export * from "./sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC"}
@@ -4,4 +4,4 @@ export * from "./sinSecondDegreeDerivative.js";
4
4
  export * from "./cosSecondDegreeDerivative.js";
5
5
  export * from "./productOfSinAXPlusBCosCXPlusDDerivative.js";
6
6
  export * from "./sinAndCosMixedWithSquareDerivative.js";
7
- // export * from "./sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js";
7
+ export * from "./sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js";
@@ -1 +1 @@
1
- {"version":3,"file":"sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAoH7C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,eAAe,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,mBAAmB,EAAE,eAAe,CAAC;CACtC,CAAC;AAkaF,eAAO,MAAM,+CAA+C,EAAE,QAAQ,CAAC,WAAW,CAqB/E,CAAC"}
1
+ {"version":3,"file":"sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAoH7C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,eAAe,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,mBAAmB,EAAE,eAAe,CAAC;CACtC,CAAC;AAuaF,eAAO,MAAM,+CAA+C,EAAE,QAAQ,CAAC,WAAW,CAqB/E,CAAC"}
@@ -392,7 +392,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
392
392
  try {
393
393
  const nodeAns = parseAlgebraic(ans);
394
394
  const nodeAnswer = getAnswerNode(identifiers);
395
- return NodeComparator.isEqualViaRandomEvaluations(nodeAns, nodeAnswer, 3);
395
+ return NodeComparator.isEqualViaRandomEvaluations(nodeAns, nodeAnswer, 3, 4);
396
396
  }
397
397
  catch (e) {
398
398
  handleVEAError(e);
@@ -1,4 +1,5 @@
1
1
  export * from "./problemMaximizeBoxVolumeFindX.js";
2
2
  export * from "./problemProjectileHeightFindAbscissa.js";
3
+ export * from "./problemMaximizeProfitFindProduction.js";
3
4
  export * from "./problemMovementOnLineFindSpeedAtPoint.js";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/problems/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AAEzD,cAAc,4CAA4C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/problems/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export * from "./problemMaximizeBoxVolumeFindX.js";
2
2
  export * from "./problemProjectileHeightFindAbscissa.js";
3
- // export * from "./problemMaximizeProfitFindProduction.js";
3
+ export * from "./problemMaximizeProfitFindProduction.js";
4
4
  export * from "./problemMovementOnLineFindSpeedAtPoint.js";
@@ -1 +1 @@
1
- {"version":3,"file":"problemMaximizeProfitFindProduction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAIL,0BAA0B,EAC3B,MAAM,6DAA6D,CAAC;AAYrE,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,0BAA0B,EAAE,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoaF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsBF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,WAAW,EACX,OAAO,CAoBR,CAAC"}
1
+ {"version":3,"file":"problemMaximizeProfitFindProduction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAIL,0BAA0B,EAC3B,MAAM,6DAA6D,CAAC;AAYrE,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,0BAA0B,EAAE,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsbF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsBF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,WAAW,EACX,OAAO,CAoBR,CAAC"}
@@ -196,7 +196,7 @@ const createRandomIdentifiers = (typeF) => {
196
196
  // const height = randint(200, 5000);
197
197
  const basePOver3 = Math.floor(baseP / 3);
198
198
  const isXForMaxGreaterThanBoundPHigh = probaFlip(0.24);
199
- const [nodeF, boundPHigh, arrPOF] = (() => {
199
+ const [nodeFRoundedExpanded, boundPHigh, arrPOF] = (() => {
200
200
  switch (typeF) {
201
201
  case "polynôme (degré $2$)": {
202
202
  //roots
@@ -211,11 +211,14 @@ const createRandomIdentifiers = (typeF) => {
211
211
  // const nodeU = opposite(frac(multiply(4, height), power(b - a, 2)));
212
212
  const nodeU = (-1).toTree();
213
213
  const nodeF = createNodeFPolynomialFromRoots(nodeU, arrNodeX);
214
+ //rounding
215
+ const arrNodeCoeffRounded = getArrNodeCoeffOfPolynomialNode(nodeF).map((node) => round(node.evaluate(), 2).toTree());
216
+ const nodeFRoundedExpanded = createNodeFPolynomialFromCoeffs(arrNodeCoeffRounded);
214
217
  const boundPHigh = isXForMaxGreaterThanBoundPHigh
215
218
  ? randint(a + 1, xForMax)
216
219
  : randint(xForMax + 1, 2 * xForMax);
217
220
  const pof1 = new PointOfFunction(xForMax.toTree(), nodeF.evaluate({ x: xForMax }).toTree(), (0).toTree());
218
- return [nodeF, boundPHigh, [pof1]];
221
+ return [nodeFRoundedExpanded, boundPHigh, [pof1]];
219
222
  }
220
223
  case "polynôme (degré $3$)": {
221
224
  //hermite
@@ -264,16 +267,19 @@ const createRandomIdentifiers = (typeF) => {
264
267
  }
265
268
  })();
266
269
  const arrNodeCoeff = createArrNodeCoeffCubic(pof1, pof2);
267
- const nodeF = createNodeFPolynomialFromCoeffs(arrNodeCoeff);
268
- return [nodeF, maxP, [pof1, pof2]];
270
+ // const nodeF = createNodeFPolynomialFromCoeffs(arrNodeCoeff);
271
+ //rounding
272
+ // const arrNodeCoeffRounded = getArrNodeCoeffOfPolynomialNode(nodeF).map(
273
+ // (node) => round(node.evaluate(), 2).toTree(),
274
+ // );
275
+ const arrNodeCoeffRounded = arrNodeCoeff.map((node) => round(node.evaluate(), 2).toTree());
276
+ const nodeFRoundedExpanded = createNodeFPolynomialFromCoeffs(arrNodeCoeffRounded);
277
+ return [nodeFRoundedExpanded, maxP, [pof1, pof2]];
269
278
  }
270
279
  default:
271
280
  throw new Error("Unsupported typeF: " + typeF);
272
281
  }
273
282
  })();
274
- //rounding
275
- const arrNodeCoeffRounded = getArrNodeCoeffOfPolynomialNode(nodeF).map((node) => round(node.evaluate(), 2).toTree());
276
- const nodeFRoundedExpanded = createNodeFPolynomialFromCoeffs(arrNodeCoeffRounded);
277
283
  const identifiers = {
278
284
  nodeIdsF: nodeFRoundedExpanded.toIdentifiers(),
279
285
  pofIds: arrPOF.map((pof) => pof.toIdentifiers()),
@@ -282,21 +288,19 @@ const createRandomIdentifiers = (typeF) => {
282
288
  };
283
289
  return identifiers;
284
290
  };
285
- const isIdentifiersQCPassed = (identifiers) => {
286
- const isExploding = (identifiers) => {
287
- try {
288
- getCorrection(identifiers);
289
- return false;
290
- }
291
- catch (_) {
292
- return true;
293
- }
294
- };
295
- return !isExploding(identifiers);
291
+ const isIdentifiersQCPassed = (_identifiers) => {
292
+ // const isExploding = (identifiers: Identifiers) => {
293
+ // try {
294
+ // getCorrection(identifiers);
295
+ // return false;
296
+ // } catch (_) {
297
+ // return true;
298
+ // }
299
+ // };
300
+ // return !isExploding(identifiers);
301
+ return true;
296
302
  };
297
- const getProblemMaximizeProfitFindProductionQuestion = (optsIn) => {
298
- const arrayedOpts = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
299
- const typeF = random(arrayedOpts.typeF);
303
+ const createQCPassedIdentifiers = (typeF) => {
300
304
  let identifiers;
301
305
  let counter = -1;
302
306
  let isValid = false;
@@ -312,6 +316,12 @@ const getProblemMaximizeProfitFindProductionQuestion = (optsIn) => {
312
316
  const identifiersDefault = createRandomIdentifiers("polynôme (degré $2$)");
313
317
  identifiers = identifiersDefault;
314
318
  }
319
+ return identifiers;
320
+ };
321
+ const getProblemMaximizeProfitFindProductionQuestion = (optsIn) => {
322
+ const arrayedOpts = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
323
+ const typeF = random(arrayedOpts.typeF);
324
+ const identifiers = createQCPassedIdentifiers(typeF);
315
325
  return getQuestionFromIdentifiers(identifiers);
316
326
  };
317
327
  const getQuestionFromIdentifiers = (identifiers) => {
@@ -1 +1 @@
1
- {"version":3,"file":"derivativeEquationSolvingByManipulatingLineY.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAqE7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,eAAe,EAAE,eAAe,EAAE,CAAC;CACpC,CAAC;AA0gBF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAmB5E,CAAC"}
1
+ {"version":3,"file":"derivativeEquationSolvingByManipulatingLineY.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAsE7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,eAAe,EAAE,eAAe,EAAE,CAAC;CACpC,CAAC;AAqaF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAmB5E,CAAC"}
@@ -11,8 +11,10 @@ import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
11
11
  import { add } from "../../../../tree/nodes/operators/addNode.js";
12
12
  import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
13
13
  import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
14
+ import { power } from "../../../../tree/nodes/operators/powerNode.js";
14
15
  import { substract } from "../../../../tree/nodes/operators/substractNode.js";
15
16
  import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
17
+ import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
16
18
  import { discreteSetParser } from "../../../../tree/parsers/discreteSetParser.js";
17
19
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
18
20
  import { randomMany } from "../../../../utils/alea/random.js";
@@ -314,135 +316,13 @@ const getDerivativeEquationSolvingByManipulatingLineYQuestion = (opts) => {
314
316
  }
315
317
  }
316
318
  if (!isValid) {
317
- //copié-collé depuis le dashboard::viewer
319
+ const nodeSlope = (-0.2).toTree();
320
+ const nodeF = frac(add(multiply(2025, power(new VariableNode("x"), 4)), multiply(60, add(multiply(-225, power(new VariableNode("x"), 3)), multiply(9, add(multiply(-30, power(new VariableNode("x"), 2)), multiply(15, add(multiply(17, new VariableNode("x")), -30))))))), 121500);
321
+ const arrNodeAbscissa = [-2, 2, 5].map((v) => v.toTree());
318
322
  const identifiersDefault = {
319
- nodeIdsSlope: {
320
- id: 7,
321
- value: -0.2,
322
- },
323
- nodeIdsF: {
324
- id: 3,
325
- leftChild: {
326
- id: 0,
327
- leftChild: {
328
- id: 2,
329
- leftChild: {
330
- id: 7,
331
- value: 2025,
332
- },
333
- rightChild: {
334
- id: 5,
335
- leftChild: {
336
- id: 10,
337
- name: "x",
338
- },
339
- rightChild: {
340
- id: 7,
341
- value: 4,
342
- },
343
- },
344
- },
345
- rightChild: {
346
- id: 2,
347
- leftChild: {
348
- id: 7,
349
- value: 60,
350
- },
351
- rightChild: {
352
- id: 0,
353
- leftChild: {
354
- id: 2,
355
- leftChild: {
356
- id: 7,
357
- value: -225,
358
- },
359
- rightChild: {
360
- id: 5,
361
- leftChild: {
362
- id: 10,
363
- name: "x",
364
- },
365
- rightChild: {
366
- id: 7,
367
- value: 3,
368
- },
369
- },
370
- },
371
- rightChild: {
372
- id: 2,
373
- leftChild: {
374
- id: 7,
375
- value: 9,
376
- },
377
- rightChild: {
378
- id: 0,
379
- leftChild: {
380
- id: 2,
381
- leftChild: {
382
- id: 7,
383
- value: -30,
384
- },
385
- rightChild: {
386
- id: 5,
387
- leftChild: {
388
- id: 10,
389
- name: "x",
390
- },
391
- rightChild: {
392
- id: 7,
393
- value: 2,
394
- },
395
- },
396
- },
397
- rightChild: {
398
- id: 2,
399
- leftChild: {
400
- id: 7,
401
- value: 15,
402
- },
403
- rightChild: {
404
- id: 0,
405
- leftChild: {
406
- id: 2,
407
- leftChild: {
408
- id: 7,
409
- value: 17,
410
- },
411
- rightChild: {
412
- id: 10,
413
- name: "x",
414
- },
415
- },
416
- rightChild: {
417
- id: 7,
418
- value: -30,
419
- },
420
- },
421
- },
422
- },
423
- },
424
- },
425
- },
426
- },
427
- rightChild: {
428
- id: 7,
429
- value: 121500,
430
- },
431
- },
432
- nodeIdsAbscissa: [
433
- {
434
- id: 7,
435
- value: -2,
436
- },
437
- {
438
- id: 7,
439
- value: 2,
440
- },
441
- {
442
- id: 7,
443
- value: 5,
444
- },
445
- ],
323
+ nodeIdsSlope: nodeSlope.toIdentifiers(),
324
+ nodeIdsF: nodeF.toIdentifiers(),
325
+ nodeIdsAbscissa: arrNodeAbscissa.map((node) => node.toIdentifiers()),
446
326
  };
447
327
  identifiers = identifiersDefault;
448
328
  }
@@ -6,6 +6,7 @@ export * from "./derivativeNumberOrImageReading.js";
6
6
  export * from "./horizontalTangentFromAlgebraic.js";
7
7
  export * from "./derivativeReadingByManipulatingPoint.js";
8
8
  export * from "./derivativeEquationSolvingByManipulatingPoint.js";
9
+ export * from "./derivativeEquationSolvingByManipulatingLineY.js";
9
10
  export * from "./placePointsOfDerivativeFromGraph.js";
10
11
  export * from "./tangentEquationFromGraph.js";
11
12
  export * from "./tangentEquationFromFunctionExpression.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAElE,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,4CAA4C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAClE,cAAc,mDAAmD,CAAC;AAClE,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,4CAA4C,CAAC"}
@@ -6,7 +6,7 @@ export * from "./derivativeNumberOrImageReading.js";
6
6
  export * from "./horizontalTangentFromAlgebraic.js";
7
7
  export * from "./derivativeReadingByManipulatingPoint.js";
8
8
  export * from "./derivativeEquationSolvingByManipulatingPoint.js";
9
- // export * from "./derivativeEquationSolvingByManipulatingLineY.js";
9
+ export * from "./derivativeEquationSolvingByManipulatingLineY.js";
10
10
  export * from "./placePointsOfDerivativeFromGraph.js";
11
11
  export * from "./tangentEquationFromGraph.js";
12
12
  export * from "./tangentEquationFromFunctionExpression.js";
@@ -6,6 +6,7 @@ export * from "./signVarTableFromGraph.js";
6
6
  export * from "./signVarTableFromDerivativeGraph.js";
7
7
  export * from "./signVarTableTrinom.js";
8
8
  export * from "./signVarTableProductFExp.js";
9
+ export * from "./signVarTableQuotientFExp.js";
9
10
  export * from "./findAbscissaOfExtremaFromFunctionExpression.js";
10
11
  export * from "./findExtremaFromFunctionExpression.js";
11
12
  export * from "./signVarTableFromFunctionExpression.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC;AAExC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wEAAwE,CAAC;AACvF,cAAc,wEAAwE,CAAC;AACvF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC;AAExC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wEAAwE,CAAC;AACvF,cAAc,wEAAwE,CAAC;AACvF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC"}
@@ -7,7 +7,7 @@ export * from "./signVarTableFromDerivativeGraph.js";
7
7
  export * from "./signVarTableTrinom.js";
8
8
  // export * from "./signVarTable3dDegree.js";
9
9
  export * from "./signVarTableProductFExp.js";
10
- // export * from "./signVarTableQuotientFExp.js";
10
+ export * from "./signVarTableQuotientFExp.js";
11
11
  export * from "./findAbscissaOfExtremaFromFunctionExpression.js";
12
12
  export * from "./findExtremaFromFunctionExpression.js";
13
13
  export * from "./signVarTableFromFunctionExpression.js";
@@ -1 +1 @@
1
- {"version":3,"file":"signVarTableQuotientFExp.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableQuotientFExp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AA6HrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAqbF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAiBF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBnE,CAAC"}
1
+ {"version":3,"file":"signVarTableQuotientFExp.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableQuotientFExp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AA6IrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAucF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAiBF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBnE,CAAC"}
@@ -20,17 +20,27 @@ import { zip } from "../../../../utils/arrays/arrayZip.js";
20
20
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
21
21
  import { alignTex } from "../../../../utils/latex/alignTex.js";
22
22
  const tryToSimplify = (node) => {
23
- try {
24
- return NodeSimplifier.simplifyByVibrating(node, 5, true);
25
- }
26
- catch (_) {
27
- try {
28
- return NodeSimplifier.simplifyByVibrating(node, 5, false);
29
- }
30
- catch (_) {
31
- return node;
32
- }
33
- }
23
+ // console.log("tryToSimplify", node.toTex());
24
+ // try {
25
+ // return NodeSimplifier.simplifyByVibrating(node, 5, true);
26
+ // } catch (_) {
27
+ // try {
28
+ // return NodeSimplifier.simplifyByVibrating(node, 5, false);
29
+ // } catch (_) {
30
+ // return node;
31
+ // }
32
+ // }
33
+ // const simplifyOptionsPass1: SimplifyOptions = {
34
+ // towardsDistribute: true,
35
+ // calculatePowers: true,
36
+ // forceAddFractions: true,
37
+ // };
38
+ // const simplifyOptionsPass2: SimplifyOptions = {
39
+ // forbidFactorize: false,
40
+ // forceAddFractions: true,
41
+ // };
42
+ // return node.simplify(simplifyOptionsPass1).simplify(simplifyOptionsPass2);
43
+ return NodeSimplifier.simplifyByInfiltrating(node, {});
34
44
  };
35
45
  const getInstructionNode = (a, b, c, isFOverExp) => {
36
46
  const nodeF = getNodeF(a, b, c);
@@ -432,21 +442,33 @@ const createRandomIdentifiers = (opts) => {
432
442
  };
433
443
  return identifiers;
434
444
  };
435
- const getSignVarTableQuotientFExpQuestion = (optsIn) => {
436
- const opts = optsIn ?? optsDefault;
445
+ const isIdentifiersQCPassed = (identifiers) => {
446
+ const isExploding = (identifiers) => {
447
+ let isExploding = false;
448
+ try {
449
+ {
450
+ const { coeffsF, isFOverExp } = identifiers;
451
+ const [c, b, a] = coeffsF;
452
+ getInstructionNode(a, b, c, isFOverExp);
453
+ }
454
+ getAnswerTable(identifiers);
455
+ getCorrection(identifiers);
456
+ }
457
+ catch (_) {
458
+ isExploding = true;
459
+ }
460
+ return isExploding;
461
+ };
462
+ return !isExploding(identifiers);
463
+ };
464
+ const createQCPassedIdentifiers = (opts) => {
437
465
  let identifiers;
438
466
  let counter = -1;
439
467
  let isValid = false;
440
468
  while (!isValid && counter < 100) {
441
469
  counter++;
442
470
  const identifiersCandidate = createRandomIdentifiers(opts);
443
- try {
444
- getAnswerTable(identifiersCandidate, opts);
445
- isValid = true;
446
- }
447
- catch (_) {
448
- (() => { })();
449
- }
471
+ isValid = isIdentifiersQCPassed(identifiersCandidate);
450
472
  if (isValid) {
451
473
  identifiers = identifiersCandidate;
452
474
  }
@@ -458,6 +480,11 @@ const getSignVarTableQuotientFExpQuestion = (optsIn) => {
458
480
  };
459
481
  identifiers = identifiersDefault;
460
482
  }
483
+ return identifiers;
484
+ };
485
+ const getSignVarTableQuotientFExpQuestion = (optsIn) => {
486
+ const opts = optsIn ?? optsDefault;
487
+ const identifiers = createQCPassedIdentifiers(opts);
461
488
  return getQuestionFromIdentifiers(identifiers, opts);
462
489
  };
463
490
  const getQuestionFromIdentifiers = (identifiers, opts) => {
@@ -1 +1 @@
1
- {"version":3,"file":"equaDiffAyPlusB.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffAyPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8HF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAYjD,CAAC"}
1
+ {"version":3,"file":"equaDiffAyPlusB.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffAyPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoJF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
@@ -26,12 +26,32 @@ const getAnswer = (identifiers) => {
26
26
  : multiply("C", exp(multiply(a, "x"))));
27
27
  return correctAnswer.toTex();
28
28
  };
29
- // const getHint: GetHint<Identifiers> = (identifiers) => {
30
- // return ``;
31
- // };
32
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
33
- // return ``;
34
- // };
29
+ const getHint = () => {
30
+ return `Les solutions de l'équation différentielle $y' = ay+b$ sont les fonctions de la forme :
31
+
32
+ $$
33
+ y = Ce^{ax} - \\frac{b}{a}
34
+ $$
35
+
36
+ où $C\\in \\mathbb{R}$.`;
37
+ };
38
+ const getCorrection = (identifiers) => {
39
+ return `On sait que les solutions de l'équation différentielle $y' = ay+b$ sont les fonctions de la forme :
40
+
41
+ $$
42
+ y = Ce^{ax} - \\frac{b}{a}
43
+ $$
44
+
45
+ où $C\\in \\mathbb{R}$.
46
+
47
+ Ici, les solutions sont donc les fonctions de la forme :
48
+
49
+ $$
50
+ ${getAnswer(identifiers)}
51
+ $$
52
+
53
+ où $C\\in \\mathbb{R}$.`;
54
+ };
35
55
  const getQuestionFromIdentifiers = (identifiers) => {
36
56
  const question = {
37
57
  answer: getAnswer(identifiers),
@@ -39,6 +59,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
39
59
  keys: ["y", "x", "equal", "C", "epower"],
40
60
  answerFormat: "tex",
41
61
  identifiers,
62
+ hint: getHint(identifiers),
63
+ correction: getCorrection(identifiers),
42
64
  };
43
65
  return question;
44
66
  };
@@ -96,4 +118,5 @@ export const equaDiffAyPlusB = {
96
118
  isAnswerValid,
97
119
  subject: "Mathématiques",
98
120
  getQuestionFromIdentifiers,
121
+ hasHintAndCorrection: true,
99
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"equaDiffCheckSolutionFirstOrder.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAcrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,eAAe,CAAC;IACrC,mBAAmB,EAAE,eAAe,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AA8IF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
1
+ {"version":3,"file":"equaDiffCheckSolutionFirstOrder.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAcrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,eAAe,CAAC;IACrC,mBAAmB,EAAE,eAAe,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAkLF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}