math-exercises 3.0.177 → 3.0.179

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 (255) hide show
  1. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts +14 -0
  2. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts.map +1 -0
  3. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.js +283 -0
  4. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts +15 -0
  5. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts.map +1 -0
  6. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.js +296 -0
  7. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +3 -3
  8. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts +14 -0
  9. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -0
  10. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +346 -0
  11. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts +15 -0
  12. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -0
  13. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +435 -0
  14. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts +13 -0
  15. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -0
  16. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +326 -0
  17. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts +14 -0
  18. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts.map +1 -0
  19. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.js +181 -0
  20. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts +10 -0
  21. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts.map +1 -0
  22. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.js +272 -0
  23. package/lib/exercises/math/derivation/problems/index.d.ts +5 -0
  24. package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -0
  25. package/lib/exercises/math/derivation/problems/index.js +4 -0
  26. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts +8 -0
  27. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -0
  28. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +171 -0
  29. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts +15 -0
  30. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -0
  31. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +328 -0
  32. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts +13 -0
  33. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -0
  34. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +275 -0
  35. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts +8 -0
  36. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts.map +1 -0
  37. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.js +137 -0
  38. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts +10 -0
  39. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +478 -0
  41. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts +10 -0
  42. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.js +499 -0
  44. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts +10 -0
  45. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.js +240 -0
  47. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts +12 -0
  48. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.js +436 -0
  50. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts +12 -0
  51. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.js +219 -0
  53. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts +13 -0
  54. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -0
  55. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +273 -0
  56. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts +18 -0
  57. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts.map +1 -0
  58. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.js +295 -0
  59. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts +13 -0
  60. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -0
  61. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +388 -0
  62. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts +9 -0
  63. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts.map +1 -0
  64. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.js +308 -0
  65. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts +14 -0
  66. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -0
  67. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +439 -0
  68. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts +14 -0
  69. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -0
  70. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +547 -0
  71. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts +15 -0
  72. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts.map +1 -0
  73. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.js +537 -0
  74. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts +15 -0
  75. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts.map +1 -0
  76. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.js +639 -0
  77. package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +1 -1
  78. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts +14 -0
  79. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -0
  80. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +530 -0
  81. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts +10 -0
  82. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts.map +1 -0
  83. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +451 -0
  84. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts +11 -0
  85. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -0
  86. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +514 -0
  87. package/lib/exercises/math/functions/composition/index.d.ts +0 -1
  88. package/lib/exercises/math/functions/composition/index.d.ts.map +1 -1
  89. package/lib/exercises/math/functions/composition/index.js +1 -1
  90. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +0 -1
  91. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/exponential/algebraic/index.js +1 -1
  93. package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
  94. package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
  95. package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
  96. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
  97. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
  98. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +226 -0
  99. package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
  100. package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
  101. package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
  102. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
  103. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
  104. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
  105. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
  106. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
  107. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
  108. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +32 -17
  109. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts +13 -0
  110. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts.map +1 -0
  111. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.js +195 -0
  112. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts +9 -0
  113. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts.map +1 -0
  114. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.js +220 -0
  115. package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts +15 -0
  116. package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts.map +1 -0
  117. package/lib/exercises/math/probaStat/conditional/conditionalProbability.js +332 -0
  118. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts +8 -0
  119. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts.map +1 -0
  120. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.js +222 -0
  121. package/lib/exercises/math/probaStat/conditional/index.d.ts +5 -0
  122. package/lib/exercises/math/probaStat/conditional/index.d.ts.map +1 -0
  123. package/lib/exercises/math/probaStat/conditional/index.js +4 -0
  124. package/lib/exercises/math/probaStat/index.d.ts +1 -2
  125. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  126. package/lib/exercises/math/probaStat/index.js +1 -2
  127. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts +1 -0
  128. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  129. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +26 -199
  130. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  131. package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
  132. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -1
  133. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +6 -2
  134. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
  135. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +6 -5
  136. package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts.map +1 -1
  137. package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.js +4 -27
  138. package/lib/exercises/math/probaStat/twoEventsSituations.d.ts +29 -0
  139. package/lib/exercises/math/probaStat/twoEventsSituations.d.ts.map +1 -0
  140. package/lib/exercises/math/probaStat/twoEventsSituations.js +145 -0
  141. package/lib/exercises/math/python/index.d.ts +1 -0
  142. package/lib/exercises/math/python/index.d.ts.map +1 -1
  143. package/lib/exercises/math/python/index.js +1 -0
  144. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
  145. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
  146. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
  147. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
  148. package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
  149. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  150. package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
  151. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
  152. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
  153. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
  154. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
  155. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
  156. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
  157. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
  158. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
  159. package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
  160. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
  161. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
  162. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
  163. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
  164. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
  165. package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
  166. package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts +4 -1
  167. package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts.map +1 -1
  168. package/lib/exercises/math/sequences/explicitFormulaUsage.js +47 -7
  169. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
  170. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
  171. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
  172. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
  173. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
  174. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
  175. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
  176. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
  177. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +2 -2
  178. package/lib/exercises/math/sequences/geometric/index.d.ts +3 -2
  179. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  180. package/lib/exercises/math/sequences/geometric/index.js +6 -2
  181. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
  182. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
  183. package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
  184. package/lib/exercises/math/sequences/geometric/situations/index.d.ts +0 -1
  185. package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
  186. package/lib/exercises/math/sequences/geometric/situations/index.js +1 -1
  187. package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
  188. package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
  189. package/lib/exercises/math/sequences/index.d.ts +1 -0
  190. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  191. package/lib/exercises/math/sequences/index.js +1 -0
  192. package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts +5 -1
  193. package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
  194. package/lib/exercises/math/sequences/recurrenceFormulaUsage.js +89 -9
  195. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
  196. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
  197. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -1
  198. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -1
  199. package/lib/exercises/math/trigonometry/circle/associatePoint.js +55 -6
  200. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
  201. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +5 -6
  202. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -1
  203. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +1 -3
  204. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
  205. package/lib/exercises/pc/snellDescartes.js +2 -2
  206. package/lib/exercises/vea/polynomialVEA.d.ts +2 -0
  207. package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -0
  208. package/lib/exercises/vea/polynomialVEA.js +17 -0
  209. package/lib/exercises/vea/valueTableVEA.d.ts +8 -0
  210. package/lib/exercises/vea/valueTableVEA.d.ts.map +1 -0
  211. package/lib/exercises/vea/valueTableVEA.js +12 -0
  212. package/lib/index.d.ts +152 -41
  213. package/lib/index.d.ts.map +1 -1
  214. package/lib/latexTester.d.ts.map +1 -1
  215. package/lib/latexTester.js +9 -6
  216. package/lib/math/polynomials/affine.d.ts +1 -0
  217. package/lib/math/polynomials/affine.d.ts.map +1 -1
  218. package/lib/math/polynomials/affine.js +5 -0
  219. package/lib/math/utils/arithmetic/primeFactors.js +1 -1
  220. package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
  221. package/lib/math/utils/functions/functionComposition.js +18 -1
  222. package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts +19 -0
  223. package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts.map +1 -0
  224. package/lib/math/utils/polynomial/polynomialInterpolationUtils.js +53 -0
  225. package/lib/math/utils/polynomial/polynomialUtils.d.ts +37 -0
  226. package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -0
  227. package/lib/math/utils/polynomial/polynomialUtils.js +223 -0
  228. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
  229. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
  230. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +434 -333
  231. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
  232. package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
  233. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
  234. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
  235. package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
  236. package/lib/prototypesEnhancement.d.ts +1 -0
  237. package/lib/prototypesEnhancement.d.ts.map +1 -1
  238. package/lib/prototypesEnhancement.js +3 -0
  239. package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
  240. package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
  241. package/lib/tests/questionTest.d.ts.map +1 -1
  242. package/lib/tests/questionTest.js +6 -3
  243. package/lib/tree/nodes/geometry/degree.js +1 -1
  244. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  245. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  246. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/operators/substractNode.js +2 -1
  248. package/lib/tree/parsers/degreeParser.js +2 -2
  249. package/lib/tree/utilities/nodeUtils.d.ts +6 -0
  250. package/lib/tree/utilities/nodeUtils.d.ts.map +1 -0
  251. package/lib/tree/utilities/nodeUtils.js +24 -0
  252. package/lib/utils/strings/prependArticle.d.ts +2 -0
  253. package/lib/utils/strings/prependArticle.d.ts.map +1 -0
  254. package/lib/utils/strings/prependArticle.js +1 -0
  255. package/package.json +1 -1
@@ -0,0 +1,451 @@
1
+ import { GeneratorOptionType, GeneratorOptionTarget, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
4
+ import { InequationSymbol, } from "../../../../math/inequations/inequation.js";
5
+ import { AffineConstructor } from "../../../../math/polynomials/affine.js";
6
+ import { Trinom, TrinomConstructor } from "../../../../math/polynomials/trinom.js";
7
+ import { randint } from "../../../../math/utils/random/randint.js";
8
+ import { exp } from "../../../../tree/nodes/functions/expNode.js";
9
+ import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
10
+ import { InequationSolutionNode } from "../../../../tree/nodes/inequations/inequationSolutionNode.js";
11
+ import { MinusInfinityNode, PlusInfinityNode, } from "../../../../tree/nodes/numbers/infiniteNode.js";
12
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
13
+ import { isMultiplyNode, multiply, } from "../../../../tree/nodes/operators/multiplyNode.js";
14
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
15
+ import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
16
+ import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
17
+ import { isUnionIntervalNode, UnionIntervalNode, } from "../../../../tree/nodes/sets/unionIntervalNode.js";
18
+ import { zip } from "../../../../utils/arrays/arrayZip.js";
19
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
20
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
21
+ const _simplifyMore = (node) => {
22
+ if (isMultiplyNode(node)) {
23
+ const nodeLeft = node.leftChild;
24
+ const nodeRight = node.rightChild;
25
+ try {
26
+ return multiply(nodeLeft.simplify({ forbidFactorize: true, towardsDistribute: true }), nodeRight.simplify({ forbidFactorize: true, towardsDistribute: true }));
27
+ }
28
+ catch (_) {
29
+ return node;
30
+ }
31
+ }
32
+ else {
33
+ return node;
34
+ }
35
+ };
36
+ const getInstructionNode = (a, b, c) => {
37
+ const nodeF = getNodeF(a, b, c);
38
+ const nodeG = "x".toTree();
39
+ const nodeExpG = exp(nodeG);
40
+ return multiply(nodeF, nodeExpG);
41
+ };
42
+ const getNodeF = (a, b, c) => {
43
+ if (a !== undefined) {
44
+ return TrinomConstructor.fromCoeffs([c, b, a]).toTree().simplify();
45
+ }
46
+ else if (b !== undefined) {
47
+ return AffineConstructor.fromCoeffs([c, b]).toTree().simplify();
48
+ }
49
+ else {
50
+ return c.toTree();
51
+ }
52
+ };
53
+ const getRootNodesOfDerivative = (a, b, c) => {
54
+ //get coeffs
55
+ let coeffs;
56
+ if (a !== undefined) {
57
+ coeffs = zip([c, b, a], [b, 2 * a, 0]).map(([c1, c2]) => c1 + c2);
58
+ }
59
+ else {
60
+ coeffs = zip([c, b], [b, 0]).map(([c1, c2]) => c1 + c2);
61
+ }
62
+ //get roots
63
+ if (coeffs.length === 3) {
64
+ const trinom = TrinomConstructor.fromCoeffs(coeffs);
65
+ return trinom.getRootsNode();
66
+ }
67
+ else {
68
+ const [c, b] = coeffs;
69
+ return [frac(opposite(c), b).simplify()];
70
+ }
71
+ };
72
+ const getTrinomInequationSolutionNode = (coeffs, ineqType) => {
73
+ const [c, b, a] = coeffs;
74
+ const ineq = new InequationSymbol(ineqType);
75
+ const trinom = new Trinom(a, b, c);
76
+ const roots = trinom.getRootsNode();
77
+ const aPositive = a > 0;
78
+ const insideInterval = new IntervalNode(roots[0], roots[1], ineq.isStrict ? ClosureType.OO : ClosureType.FF);
79
+ const outsideUnion = new UnionIntervalNode([
80
+ new IntervalNode(MinusInfinityNode, roots[0], ineq.isStrict ? ClosureType.OO : ClosureType.OF),
81
+ new IntervalNode(roots[1], PlusInfinityNode, ineq.isStrict ? ClosureType.OO : ClosureType.FO),
82
+ ]);
83
+ const tree = ineq.isSup
84
+ ? aPositive
85
+ ? outsideUnion
86
+ : insideInterval
87
+ : aPositive
88
+ ? insideInterval
89
+ : outsideUnion;
90
+ return new InequationSolutionNode(tree);
91
+ };
92
+ const getInstruction = (identifiers) => {
93
+ const { coeffsF } = identifiers;
94
+ const [c, b, a] = coeffsF;
95
+ const nodeH = getInstructionNode(a, b, c);
96
+ return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
97
+
98
+ $$
99
+ h(x) = ${nodeH.toTex()}
100
+ $$
101
+
102
+ Dresser le tableau de signes de $h'$ et de variations de $h$.
103
+
104
+ `;
105
+ };
106
+ const getInitTable = (identifiers) => {
107
+ const { coeffsF } = identifiers;
108
+ const [c, b, a] = coeffsF;
109
+ const nbRoots = getRootNodesOfDerivative(a, b, c).length;
110
+ if (nbRoots === 1) {
111
+ return [
112
+ ["$x$", "", "\\ ", "", "\\ ", ""],
113
+ //sign
114
+ ["$h'(x)$", "\\ ", "", "", "", "\\ "],
115
+ //var
116
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
117
+ ["$h(x)$", "\\ ", "", "", "", "\\ "],
118
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
119
+ ];
120
+ }
121
+ else {
122
+ return [
123
+ ["$x$", "", "\\ ", "", "\\ ", "", "\\ ", ""],
124
+ //sign
125
+ ["$h'(x)$", "\\ ", "", "", "", "", "", "\\ "],
126
+ //var
127
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
128
+ ["$h(x)$", "\\ ", "", "", "", "", "", "\\ "],
129
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
130
+ ];
131
+ }
132
+ };
133
+ const getAnswerTable = (identifiers) => {
134
+ const { coeffsF } = identifiers;
135
+ const [c, b, a] = coeffsF;
136
+ const rootNodes = getRootNodesOfDerivative(a, b, c);
137
+ const nodeH = getInstructionNode(a, b, c);
138
+ const nodeHPrime = nodeH.derivative();
139
+ if (rootNodes.length === 1) {
140
+ const [rootNode] = rootNodes;
141
+ const rootNodeMinus1 = substract(rootNode, 1);
142
+ const hPrimeRootMinus1 = nodeHPrime.evaluate({
143
+ x: rootNodeMinus1.evaluate(),
144
+ });
145
+ const [strSignHPrimeRootMinus1, strSignHPrimeRootPlus1] = hPrimeRootMinus1 > 0 ? ["+", "-"] : ["-", "+"];
146
+ const nodeHRoot = nodeH
147
+ .toDetailedEvaluation({
148
+ x: rootNode,
149
+ })
150
+ .simplify();
151
+ return [
152
+ ["$x$", "-\\infty", "\\ ", rootNode.toTex(), "\\ ", "+\\infty"],
153
+ //sign
154
+ [
155
+ "$h'(x)$",
156
+ "\\ ",
157
+ strSignHPrimeRootMinus1,
158
+ "0",
159
+ strSignHPrimeRootPlus1,
160
+ "\\ ",
161
+ ],
162
+ //var
163
+ ...(strSignHPrimeRootMinus1 === "+"
164
+ ? [
165
+ ["$\\ $", "\\ ", "\\ ", nodeHRoot.toTex(), "\\ ", "\\ "],
166
+ ["$h(x)$", "\\ ", "\\nearrow", "\\ ", "\\searrow", "\\ "],
167
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
168
+ ]
169
+ : [
170
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
171
+ ["$h(x)$", "\\ ", "\\searrow", "\\ ", "\\nearrow", "\\ "],
172
+ ["$\\ $", "\\ ", "\\ ", nodeHRoot.toTex(), "\\ ", "\\ "],
173
+ ]),
174
+ ];
175
+ }
176
+ else {
177
+ const [rootNode1, rootNode2] = rootNodes;
178
+ const root1Minus1 = substract(rootNode1, 1);
179
+ const hPrimeRoot1Minus1 = nodeHPrime.evaluate({
180
+ x: root1Minus1.evaluate(),
181
+ });
182
+ const [strSignHPrimeRoot1Minus1, strSignHPrimeRootAvg, strSignHPrimeRoot2Plus1,] = hPrimeRoot1Minus1 > 0 ? ["+", "-", "+"] : ["-", "+", "-"];
183
+ const [nodeHRoot1, nodeHRoot2] = [rootNode1, rootNode2].map((nodeX) => nodeH
184
+ .toDetailedEvaluation({
185
+ x: nodeX,
186
+ })
187
+ .simplify());
188
+ return [
189
+ [
190
+ "$x$",
191
+ "-\\infty",
192
+ "\\ ",
193
+ rootNode1.toTex(),
194
+ "\\ ",
195
+ rootNode2.toTex(),
196
+ "\\ ",
197
+ "+\\infty",
198
+ ],
199
+ //sign
200
+ [
201
+ "$h'(x)$",
202
+ "\\ ",
203
+ strSignHPrimeRoot1Minus1,
204
+ "0",
205
+ strSignHPrimeRootAvg,
206
+ "0",
207
+ strSignHPrimeRoot2Plus1,
208
+ "\\ ",
209
+ ],
210
+ //var
211
+ ...(strSignHPrimeRoot1Minus1 === "+"
212
+ ? [
213
+ [
214
+ "$\\ $",
215
+ "\\ ",
216
+ "\\ ",
217
+ nodeHRoot1.toTex(),
218
+ "\\ ",
219
+ "\\ ",
220
+ "\\ ",
221
+ "\\ ",
222
+ ],
223
+ [
224
+ "$h(x)$",
225
+ "\\ ",
226
+ "\\nearrow",
227
+ "\\ ",
228
+ "\\searrow",
229
+ "\\ ",
230
+ "\\nearrow",
231
+ "\\ ",
232
+ ],
233
+ [
234
+ "$\\ $",
235
+ "\\ ",
236
+ "\\ ",
237
+ "\\ ",
238
+ "\\ ",
239
+ nodeHRoot2.toTex(),
240
+ "\\ ",
241
+ "\\ ",
242
+ ],
243
+ ]
244
+ : [
245
+ [
246
+ "$\\ $",
247
+ "\\ ",
248
+ "\\ ",
249
+ "\\ ",
250
+ "\\ ",
251
+ nodeHRoot2.toTex(),
252
+ "\\ ",
253
+ "\\ ",
254
+ ],
255
+ [
256
+ "$h(x)$",
257
+ "\\ ",
258
+ "\\searrow",
259
+ "\\ ",
260
+ "\\nearrow",
261
+ "\\ ",
262
+ "\\searrow",
263
+ "\\ ",
264
+ ],
265
+ [
266
+ "$\\ $",
267
+ "\\ ",
268
+ "\\ ",
269
+ nodeHRoot1.toTex(),
270
+ "\\ ",
271
+ "\\ ",
272
+ "\\ ",
273
+ "\\ ",
274
+ ],
275
+ ]),
276
+ ];
277
+ }
278
+ };
279
+ const getHint = () => {
280
+ return `Commence par déterminer la fonction dérivée $h'$ de $h$. Puis, étudie le signe de $h'$ en résolvant l'inéquation $h'(x)\\geq 0$.
281
+
282
+ Enfin, sers-toi de la propriété suivante :
283
+
284
+ - si $h'$ est positive sur un intervalle $I$, alors $h$ est croissante sur $I$;
285
+ - si $h'$ est négative sur un intervalle $I$, alors $h$ est décroissante sur $I$.`;
286
+ };
287
+ const getCorrection = (identifiers) => {
288
+ const { coeffsF } = identifiers;
289
+ const [c, b, a] = coeffsF;
290
+ const rootNodes = getRootNodesOfDerivative(a, b, c);
291
+ const nodeH = getInstructionNode(a, b, c);
292
+ const nodeHPrime = nodeH.derivative();
293
+ if (rootNodes.length === 1) {
294
+ const [rootNode] = rootNodes;
295
+ const rootTex = rootNode.toTex();
296
+ const rootNodeMinus1 = substract(rootNode, 1);
297
+ const hPrimeRootMinus1 = nodeHPrime.evaluate({
298
+ x: rootNodeMinus1.evaluate(),
299
+ });
300
+ const signs = hPrimeRootMinus1 > 0 ? ["+", "-"] : ["-", "+"];
301
+ const signWords = signs.map((strSign) => strSign === "+" ? "positive" : "négative");
302
+ const words = signs.map((strSign) => strSign === "+" ? "croissante" : "décroissante");
303
+ const image = nodeH
304
+ .toDetailedEvaluation({
305
+ x: rootNode,
306
+ })
307
+ .simplify();
308
+ return `On calcule $h'$ :
309
+
310
+ $$
311
+ h'(x) = ${nodeHPrime.simplify().toTex()}
312
+ $$
313
+
314
+ On détermine ensuite le signe de $h'(x)$ :
315
+
316
+ ${alignTex([
317
+ ["", "h'(x) \\geq 0"],
318
+ ["\\iff", nodeHPrime.simplify().toTex() + "\\geq 0"],
319
+ ["\\iff", "x" + (b > 0 ? "\\geq" : "\\leq") + rootTex],
320
+ ])}
321
+
322
+ $h'$ est donc ${signWords[0]} sur $]-\\infty; ${rootTex}]$, puis ${signWords[1]} sur $[${rootTex}; +\\infty[$.
323
+
324
+ On en conclut que $h$ est ${words[0]} sur $]-\\infty; ${rootTex}]$, puis ${words[1]} sur $[${rootTex}; +\\infty[$.
325
+
326
+ Pour compléter le tableau, il ne reste plus qu'à calculer l'image par $h$ de $${rootTex}$ :
327
+
328
+ $$
329
+ h\\left(${rootTex}\\right) = ${image.toTex()} = ${image.simplify().toTex()}
330
+ $$`;
331
+ }
332
+ else {
333
+ const coeffs = zip([c, b, a], [b, 2 * a, 0]).map(([c1, c2]) => c1 + c2);
334
+ const inequationSolutionNode = getTrinomInequationSolutionNode(coeffs, "\\ge");
335
+ const arrIntervalNode = (() => {
336
+ if (isUnionIntervalNode(inequationSolutionNode.intervalSolution)) {
337
+ return inequationSolutionNode.intervalSolution.sets;
338
+ }
339
+ else {
340
+ return [inequationSolutionNode.intervalSolution];
341
+ }
342
+ })();
343
+ return `On calcule $h'$ :
344
+
345
+ $$
346
+ h'(x) = ${nodeHPrime.simplify().toTex()}
347
+ $$
348
+
349
+ On détermine ensuite le signe de $h'(x)$ :
350
+
351
+ ${alignTex([
352
+ ["", "h'(x) \\geq 0"],
353
+ ["\\iff", nodeHPrime.simplify().toTex() + "\\geq 0"],
354
+ ["\\iff", frac(nodeHPrime, exp("x".toTree())).simplify().toTex() + "\\geq 0"],
355
+ ])}
356
+
357
+ On résout l'inéquation :
358
+
359
+ $$
360
+ ${inequationSolutionNode.toTex()}
361
+ $$
362
+
363
+ $h$ est donc croissante sur ${arrIntervalNode
364
+ .map((node) => `$${node.toTex()}$`)
365
+ .join(" et ")}.
366
+
367
+ On calcule enfin les extrema locaux de $h$.
368
+
369
+ `;
370
+ }
371
+ };
372
+ const getKeys = () => {
373
+ return ["infty"];
374
+ };
375
+ const isAnswerTableValid = (ans, { answerTable }) => {
376
+ try {
377
+ return varSignTableVEA(ans, answerTable);
378
+ }
379
+ catch (err) {
380
+ return handleVEAError(err);
381
+ }
382
+ };
383
+ const getSignVarTableProductFExpQuestion = (optsIn) => {
384
+ const opts = optsIn ?? optsDefault;
385
+ const { typeF } = opts;
386
+ const coeffsF = (() => {
387
+ switch (typeF) {
388
+ case "affine": {
389
+ const b = randint(-8, 9, [0]);
390
+ const c = randint(-4, 5) * b;
391
+ return [c, b];
392
+ }
393
+ case "second degré": {
394
+ // return TrinomConstructor.randomNiceRoots().coefficients;
395
+ //we want integer roots for h'
396
+ const b = randint(1, 11);
397
+ return [1, b, 1];
398
+ }
399
+ default:
400
+ throw new Error("Unsupported typeF: " + typeF);
401
+ }
402
+ })();
403
+ const identifiers = {
404
+ coeffsF,
405
+ };
406
+ return getQuestionFromIdentifiers(identifiers, opts);
407
+ };
408
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
409
+ return {
410
+ answerTable: getAnswerTable(identifiers),
411
+ instruction: getInstruction(identifiers),
412
+ keys: getKeys(identifiers),
413
+ answerFormat: "tex",
414
+ identifiers,
415
+ options: opts,
416
+ hint: getHint(identifiers),
417
+ correction: getCorrection(identifiers),
418
+ initTable: getInitTable(identifiers),
419
+ };
420
+ };
421
+ const optsDefault = {
422
+ typeF: "affine",
423
+ };
424
+ const options = [
425
+ {
426
+ id: "typeF",
427
+ label: "Fonction $f$",
428
+ type: GeneratorOptionType.select,
429
+ target: GeneratorOptionTarget.generation,
430
+ values: ["affine", "second degré"],
431
+ defaultValue: optsDefault.typeF,
432
+ },
433
+ ];
434
+ export const signVarTableProductFExp = {
435
+ id: "signVarTableProductFExp",
436
+ label: "Dresser le tableau de variations de $x \\mapsto f(x)\\exp(x)$",
437
+ isSingleStep: true,
438
+ generator: (nb, opts) => getDistinctQuestions(() => getSignVarTableProductFExpQuestion(opts), nb),
439
+ options,
440
+ qcmTimer: 60,
441
+ freeTimer: 60,
442
+ isAnswerTableValid,
443
+ subject: "Mathématiques",
444
+ getInstruction,
445
+ getHint,
446
+ getCorrection,
447
+ getAnswerTable,
448
+ getQuestionFromIdentifiers,
449
+ hasHintAndCorrection: true,
450
+ answerType: "signVarTable",
451
+ };
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ coeffsF: number[];
4
+ isFOverExp: boolean;
5
+ };
6
+ type Options = {
7
+ typeF: string;
8
+ };
9
+ export declare const signVarTableQuotientFExp: Exercise<Identifiers, Options>;
10
+ export {};
11
+ //# sourceMappingURL=signVarTableQuotientFExp.d.ts.map
@@ -0,0 +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;AAsIrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAubF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAiBF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBnE,CAAC"}