math-exercises 3.0.156 → 3.0.158

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 (321) hide show
  1. package/lib/exercises/exercise.d.ts +7 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
  4. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts +14 -0
  5. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts.map +1 -0
  6. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.js +145 -0
  7. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts +16 -0
  8. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts.map +1 -0
  9. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +444 -0
  10. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts +15 -0
  11. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -0
  12. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +292 -0
  13. package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts +4 -0
  14. package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts.map +1 -0
  15. package/lib/exercises/math/calculLitteral/equation/exp/index.js +3 -0
  16. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts +4 -1
  17. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +148 -31
  19. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts +4 -1
  20. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  21. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +124 -44
  22. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts +18 -0
  23. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -0
  24. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +437 -0
  25. package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts +2 -0
  26. package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts.map +1 -0
  27. package/lib/exercises/math/calculLitteral/inequations/exp/index.js +1 -0
  28. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts.map +1 -1
  29. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.js +4 -1
  30. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
  31. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +29 -0
  32. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
  33. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +35 -2
  34. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
  35. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +19 -0
  36. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts +10 -0
  37. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -0
  38. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +282 -0
  39. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  40. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +30 -2
  41. package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
  42. package/lib/exercises/math/derivation/derivative/productDerivative.js +68 -1
  43. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  44. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +40 -4
  45. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -1
  46. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +30 -3
  47. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts +12 -0
  48. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.js +127 -0
  50. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts +13 -0
  51. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.js +161 -0
  53. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts +11 -0
  54. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts.map +1 -0
  55. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.js +116 -0
  56. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts +8 -0
  57. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts.map +1 -0
  58. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.js +142 -0
  59. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +4 -0
  60. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -0
  61. package/lib/exercises/math/derivation/derivativeNumber/index.js +4 -0
  62. package/lib/exercises/math/derivation/index.d.ts +1 -1
  63. package/lib/exercises/math/derivation/index.js +1 -1
  64. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts.map +1 -1
  65. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.js +5 -4
  66. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts +13 -0
  67. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -0
  68. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +278 -0
  69. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts +11 -0
  70. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -0
  71. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +211 -0
  72. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts +9 -0
  73. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts.map +1 -0
  74. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +142 -0
  75. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +5 -0
  76. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -0
  77. package/lib/exercises/math/functions/exponential/algebraic/index.js +4 -0
  78. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts +14 -0
  79. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts.map +1 -0
  80. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +337 -0
  81. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts +11 -0
  82. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -0
  83. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +234 -0
  84. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts +9 -0
  85. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -0
  86. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +190 -0
  87. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts +9 -0
  88. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -0
  89. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +190 -0
  90. package/lib/exercises/math/functions/exponential/definition/index.d.ts +5 -0
  91. package/lib/exercises/math/functions/exponential/definition/index.d.ts.map +1 -0
  92. package/lib/exercises/math/functions/exponential/definition/index.js +4 -0
  93. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts +13 -0
  94. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -0
  95. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +375 -0
  96. package/lib/exercises/math/functions/linear/linearFromExercise.d.ts.map +1 -1
  97. package/lib/exercises/math/functions/linear/linearFromExercise.js +4 -3
  98. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
  99. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +30 -3
  100. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
  101. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +35 -1
  102. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
  103. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +1 -1
  104. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.d.ts.map +1 -1
  105. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.js +23 -1
  106. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
  107. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +29 -0
  108. package/lib/exercises/math/functions/variations/exp/index.d.ts +3 -0
  109. package/lib/exercises/math/functions/variations/exp/index.d.ts.map +1 -0
  110. package/lib/exercises/math/functions/variations/exp/index.js +2 -0
  111. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts +9 -0
  112. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -0
  113. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +101 -0
  114. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts +11 -0
  115. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -0
  116. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +192 -0
  117. package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +2 -2
  118. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +1 -1
  119. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts.map +1 -1
  120. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.js +4 -5
  121. package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.js +4 -4
  122. package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
  123. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +5 -3
  124. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  125. package/lib/exercises/math/geometry/thales/thalesCalcul.js +1 -1
  126. package/lib/exercises/math/geometry/vectors/colinearity/determinant.js +1 -1
  127. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +1 -1
  128. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.d.ts.map +1 -1
  129. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +33 -7
  130. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  131. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
  132. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +38 -1
  133. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
  134. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +18 -5
  135. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
  136. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +45 -21
  137. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
  138. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +33 -12
  139. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
  140. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +38 -15
  141. package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
  142. package/lib/exercises/math/percent/findTVA.js +17 -11
  143. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +1 -1
  144. package/lib/exercises/math/probaStat/basicProbas/index.d.ts +1 -0
  145. package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
  146. package/lib/exercises/math/probaStat/basicProbas/index.js +1 -1
  147. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.d.ts.map +1 -1
  148. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.js +114 -20
  149. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.js +2 -2
  150. package/lib/exercises/math/probaStat/conditionalProbability.d.ts +4 -1
  151. package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
  152. package/lib/exercises/math/probaStat/conditionalProbability.js +38 -5
  153. package/lib/exercises/math/probaStat/independancy/independancy.d.ts +9 -0
  154. package/lib/exercises/math/probaStat/independancy/independancy.d.ts.map +1 -0
  155. package/lib/exercises/math/probaStat/independancy/independancy.js +114 -0
  156. package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts +9 -0
  157. package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts.map +1 -0
  158. package/lib/exercises/math/probaStat/independancy/independancyFindCap.js +101 -0
  159. package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts +9 -0
  160. package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts.map +1 -0
  161. package/lib/exercises/math/probaStat/independancy/independancyFindCup.js +118 -0
  162. package/lib/exercises/math/probaStat/independancy/index.d.ts +5 -0
  163. package/lib/exercises/math/probaStat/independancy/index.d.ts.map +1 -0
  164. package/lib/exercises/math/probaStat/independancy/index.js +4 -0
  165. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts +10 -0
  166. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts.map +1 -0
  167. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.js +106 -0
  168. package/lib/exercises/math/probaStat/index.d.ts +1 -1
  169. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  170. package/lib/exercises/math/probaStat/index.js +1 -1
  171. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
  172. package/lib/exercises/math/probaStat/stats1var/etendueTable.d.ts.map +1 -1
  173. package/lib/exercises/math/probaStat/stats1var/etendueTable.js +5 -1
  174. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +1 -1
  175. package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts.map +1 -1
  176. package/lib/exercises/math/probaStat/stats1var/medianWithTable.js +19 -5
  177. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.js +1 -1
  178. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
  179. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +41 -29
  180. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -1
  181. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +10 -3
  182. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -1
  183. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +9 -2
  184. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.d.ts.map +1 -1
  185. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.js +25 -10
  186. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts +9 -0
  187. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts.map +1 -0
  188. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.js +118 -0
  189. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -1
  190. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +55 -6
  191. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -1
  192. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +42 -1
  193. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts +4 -1
  194. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
  195. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +57 -7
  196. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  197. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +24 -2
  198. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  199. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +31 -8
  200. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -1
  201. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  202. package/lib/exercises/math/sequences/arithmetic/index.js +1 -1
  203. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
  204. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +11 -1
  205. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.js +5 -5
  206. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
  207. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +3 -1
  208. package/lib/exercises/math/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  209. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +41 -2
  210. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  211. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -2
  212. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
  213. package/lib/exercises/math/sequences/sequenceEvaluation.js +22 -2
  214. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.js +1 -1
  215. package/lib/exercises/math/spaceGeometry/sphere/index.d.ts +2 -0
  216. package/lib/exercises/math/spaceGeometry/sphere/index.d.ts.map +1 -1
  217. package/lib/exercises/math/spaceGeometry/sphere/index.js +3 -1
  218. package/lib/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.d.ts +12 -0
  219. package/lib/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.d.ts.map +1 -0
  220. package/lib/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.js +205 -0
  221. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts +13 -0
  222. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts.map +1 -0
  223. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +215 -0
  224. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.3d.d.ts +14 -0
  225. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.3d.d.ts.map +1 -0
  226. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.3d.js +390 -0
  227. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts +9 -0
  228. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts.map +1 -0
  229. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +107 -0
  230. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts +10 -0
  231. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -0
  232. package/lib/exercises/math/trigonometry/circle/associatePoint.js +86 -0
  233. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts +10 -0
  234. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts.map +1 -0
  235. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.js +205 -0
  236. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts +7 -0
  237. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -0
  238. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +121 -0
  239. package/lib/exercises/math/trigonometry/circle/index.d.ts +7 -0
  240. package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -0
  241. package/lib/exercises/math/trigonometry/circle/index.js +7 -0
  242. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts +10 -0
  243. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -0
  244. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +100 -0
  245. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts +8 -0
  246. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -0
  247. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +97 -0
  248. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts +10 -0
  249. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -0
  250. package/lib/exercises/math/trigonometry/circle/remarkableValues.js +112 -0
  251. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts +7 -0
  252. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -0
  253. package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +92 -0
  254. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts +7 -0
  255. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -0
  256. package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +104 -0
  257. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts +7 -0
  258. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts.map +1 -0
  259. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.js +83 -0
  260. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts +8 -0
  261. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -0
  262. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +111 -0
  263. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts +8 -0
  264. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts.map +1 -0
  265. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +101 -0
  266. package/lib/exercises/math/trigonometry/functions/index.d.ts +6 -0
  267. package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -0
  268. package/lib/exercises/math/trigonometry/functions/index.js +6 -0
  269. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts +9 -0
  270. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts.map +1 -0
  271. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.js +151 -0
  272. package/lib/exercises/math/trigonometry/index.d.ts +3 -14
  273. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  274. package/lib/exercises/math/trigonometry/index.js +3 -14
  275. package/lib/exercises/math/trigonometry/triangle/index.d.ts +7 -0
  276. package/lib/exercises/math/trigonometry/triangle/index.d.ts.map +1 -0
  277. package/lib/exercises/math/trigonometry/triangle/index.js +6 -0
  278. package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts +10 -0
  279. package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts.map +1 -0
  280. package/lib/exercises/math/trigonometry/triangle/trigonometry.js +207 -0
  281. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts +10 -0
  282. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts.map +1 -0
  283. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +174 -0
  284. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts +11 -0
  285. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts.map +1 -0
  286. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.js +224 -0
  287. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts +13 -0
  288. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts.map +1 -0
  289. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.js +189 -0
  290. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts +13 -0
  291. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts.map +1 -0
  292. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +290 -0
  293. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts +18 -0
  294. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts.map +1 -0
  295. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.js +386 -0
  296. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
  297. package/lib/exercises/pc/mathExosInPC.d.ts +2 -2
  298. package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
  299. package/lib/exercises/pc/mathExosInPC.js +2 -2
  300. package/lib/exercises/vea/setVEA.d.ts.map +1 -1
  301. package/lib/exercises/vea/setVEA.js +4 -0
  302. package/lib/index.d.ts +87 -29
  303. package/lib/index.d.ts.map +1 -1
  304. package/lib/math/geometry/segment.d.ts +1 -1
  305. package/lib/math/geometry/vector.d.ts +2 -1
  306. package/lib/math/geometry/vector.d.ts.map +1 -1
  307. package/lib/math/geometry/vector.js +1 -1
  308. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  309. package/lib/math/numbers/reals/real.js +2 -0
  310. package/lib/playground.d.ts.map +1 -1
  311. package/lib/playground.js +3 -1
  312. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  313. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  314. package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -1
  315. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  316. package/lib/tree/nodes/functions/sqrtNode.js +17 -6
  317. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  318. package/lib/utils/arrays/dichoFilter.d.ts +2 -0
  319. package/lib/utils/arrays/dichoFilter.d.ts.map +1 -0
  320. package/lib/utils/arrays/dichoFilter.js +11 -0
  321. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"halfPieChartCommenting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/halfPieChartCommenting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6PF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAmBxD,CAAC"}
1
+ {"version":3,"file":"halfPieChartCommenting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/halfPieChartCommenting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoQF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAmBxD,CAAC"}
@@ -79,7 +79,10 @@ const getGGBOptions = (identifiers) => {
79
79
  // const angleM = (angleA + angleB) / 2;
80
80
  const angleM = angleA +
81
81
  Math.atan2(Math.sin(angleB - angleA), Math.cos(angleB - angleA)) / 2;
82
- return [0.8 * Math.cos(angleM), 1.2 * Math.sin(angleM)];
82
+ const cosM = Math.cos(angleM);
83
+ const sinM = Math.sin(angleM);
84
+ const offsetY = cosM > 0 ? -0.1 : 0;
85
+ return [0.8 * cosM, 1.2 * sinM + offsetY];
83
86
  };
84
87
  const ggb = new GeogebraConstructor({
85
88
  commands: [
@@ -1 +1 @@
1
- {"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
1
+ {"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkHF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
@@ -8,6 +8,32 @@ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
8
8
  import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
9
9
  import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
10
10
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
11
+ const getHint = () => {
12
+ return `Utilise la formule de dérivation suivante :
13
+
14
+ $$
15
+ \\left(e^{u}\\right)' = u' \\times e^{u}
16
+ $$`;
17
+ };
18
+ const getCorrection = (identifiers) => {
19
+ const { a, b } = identifiers;
20
+ const affine = new Polynomial([b, a]);
21
+ return `On utilise la formule de dérivation suivante :
22
+
23
+ $$
24
+ \\left(e^{u}\\right)' = u' \\times e^{u}
25
+ $$
26
+
27
+ Ici, $u(x) = ${affine.toTree().toTex()}$.
28
+
29
+ Donc $u'(x) = ${a}$.
30
+
31
+ Ainsi,
32
+
33
+ $$
34
+ f'(x) = ${getAnswer(identifiers)}
35
+ $$`;
36
+ };
11
37
  const getInstruction = (identifiers) => {
12
38
  const { a, b } = identifiers;
13
39
  const affine = new Polynomial([b, a]);
@@ -40,6 +66,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
40
66
  keys: ["x", "epower", "exp"],
41
67
  answerFormat: "tex",
42
68
  identifiers,
69
+ hint: getHint(identifiers),
70
+ correction: getCorrection(identifiers),
43
71
  };
44
72
  return question;
45
73
  };
@@ -87,4 +115,5 @@ export const expDerivativeOne = {
87
115
  getAnswer,
88
116
  getInstruction,
89
117
  getQuestionFromIdentifiers,
118
+ hasHintAndCorrection: true,
90
119
  };
@@ -1 +1 @@
1
- {"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
1
+ {"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoIF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
@@ -2,12 +2,42 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../e
2
2
  import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
5
- import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
5
+ import { exp, ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
6
6
  import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
7
- import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
7
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
8
+ import { multiply, MultiplyNode, } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
9
  import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
9
10
  import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
10
11
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
12
+ import { alignTex } from "../../../../../utils/latex/alignTex.js";
13
+ const getHint = () => {
14
+ return `La fonction proposée est un produit. On peut donc utiliser la formule de dérivation :
15
+
16
+ $$
17
+ (uv)' = u'v+uv'
18
+ $$`;
19
+ };
20
+ const getCorrection = (identifiers) => {
21
+ const { a, b } = identifiers;
22
+ const affine = new Polynomial([b, a]).toTree();
23
+ const expo = exp("x");
24
+ return `$f(x)$ est de la forme $u(x)\\times v(x)$, avec $u(x) = ${affine.toTex()}$, et $v(x) = ${expo.toTex()}$.
25
+
26
+ On a donc $u'(x) = ${a}$, et $v'(x) = ${expo.toTex()}$.
27
+
28
+ On utilise alors la formule de dérivation d'un produit :
29
+
30
+ $$
31
+ (uv)' = u'v+uv'
32
+ $$
33
+
34
+ Cela donne :
35
+
36
+ ${alignTex([
37
+ ["f'(x)", "=", add(multiply(a, expo), multiply(affine, expo)).toTex()],
38
+ ["", "=", getAnswer(identifiers)],
39
+ ])}`;
40
+ };
11
41
  const getInstruction = (identifiers) => {
12
42
  const { a, b } = identifiers;
13
43
  const myfunction = new MultiplyNode(new Polynomial([b, a]).toTree(), new ExpNode(new VariableNode("x")));
@@ -33,6 +63,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
33
63
  keys: ["x", "epower", "exp"],
34
64
  answerFormat: "tex",
35
65
  identifiers,
66
+ hint: getHint(identifiers),
67
+ correction: getCorrection(identifiers),
36
68
  };
37
69
  return question;
38
70
  };
@@ -83,4 +115,5 @@ export const expDerivativeThree = {
83
115
  getInstruction,
84
116
  getAnswer,
85
117
  getQuestionFromIdentifiers,
118
+ hasHintAndCorrection: true,
86
119
  };
@@ -1 +1 @@
1
- {"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
1
+ {"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
@@ -8,6 +8,22 @@ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.j
8
8
  import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
9
9
  import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
10
10
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
11
+ const getHint = () => {
12
+ return `La fonction exponentielle est égale à sa dérivée.`;
13
+ };
14
+ const getCorrection = (identifiers) => {
15
+ return `On sait que la fonction exponentielle est égale à sa dérivée, c'est à dire :
16
+
17
+ $$
18
+ \\left(e^x\\right)' = e^x
19
+ $$
20
+
21
+ On a donc :
22
+
23
+ $$
24
+ f'(x) = ${getAnswer(identifiers)}
25
+ $$`;
26
+ };
11
27
  const getInstruction = (identifiers) => {
12
28
  const { a, b } = identifiers;
13
29
  const myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))), new NumberNode(b));
@@ -37,6 +53,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
37
53
  keys: ["x", "epower", "exp"],
38
54
  answerFormat: "tex",
39
55
  identifiers,
56
+ hint: getHint(identifiers),
57
+ correction: getCorrection(identifiers),
40
58
  };
41
59
  return question;
42
60
  };
@@ -77,4 +95,5 @@ export const expDerivativeTwo = {
77
95
  getAnswer,
78
96
  getInstruction,
79
97
  getQuestionFromIdentifiers,
98
+ hasHintAndCorrection: true,
80
99
  };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ c: number;
6
+ d: number;
7
+ };
8
+ export declare const expOverExpDerivative: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=expOverExpDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expOverExpDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expOverExpDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAqCrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmUF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
@@ -0,0 +1,282 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../../math/utils/random/randint.js";
4
+ import { exp, ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
5
+ import { add, AddNode } from "../../../../../tree/nodes/operators/addNode.js";
6
+ import { frac, FractionNode, isFractionNode, } from "../../../../../tree/nodes/operators/fractionNode.js";
7
+ import { multiply, MultiplyNode, } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { power } from "../../../../../tree/nodes/operators/powerNode.js";
9
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
10
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
11
+ const getInstructionNode = (identifiers) => {
12
+ const { a, b, c, d } = identifiers;
13
+ const nodeNum = add(multiply(a, exp("x".toTree())), b);
14
+ const nodeDen = add(multiply(c, exp("x".toTree())), d);
15
+ return frac(nodeNum, nodeDen);
16
+ };
17
+ const getPrettyFractionNode = (nodeFraction) => {
18
+ const nodeNum = nodeFraction.leftChild.simplify({ towardsDistribute: true });
19
+ const nodeDen = nodeFraction.rightChild;
20
+ return frac(nodeNum, nodeDen);
21
+ };
22
+ const getInstruction = (identifiers) => {
23
+ const nodeF = getInstructionNode(identifiers);
24
+ return `Déterminer la dérivée de la fonction $f$ définie par :
25
+
26
+ $$
27
+ f(x) = ${nodeF.toTex()}
28
+ $$`;
29
+ };
30
+ const getAnswerNode = (identifiers) => {
31
+ const nodeRaw = getInstructionNode(identifiers).derivative();
32
+ if (isFractionNode(nodeRaw)) {
33
+ const nodeFraction = nodeRaw;
34
+ return getPrettyFractionNode(nodeFraction);
35
+ }
36
+ else {
37
+ return nodeRaw;
38
+ }
39
+ };
40
+ const getAnswer = (identifiers) => {
41
+ return getAnswerNode(identifiers).toTex();
42
+ };
43
+ const getHint = () => {
44
+ return `Si $u$ et $v$ sont deux fonctions dérivables alors, pour $x$ tel que $v(x)\\neq0$, on a :
45
+
46
+ $$
47
+ (\\frac{u}{v})'(x) = \\frac{u'(x)v(x)-u(x)v'(x)}{{v(x)}^2}
48
+ $$
49
+
50
+ `;
51
+ };
52
+ const getCorrection = (identifiers) => {
53
+ const nodeInstruction = getInstructionNode(identifiers);
54
+ const [nodeU, nodeV] = [
55
+ nodeInstruction.leftChild,
56
+ nodeInstruction.rightChild,
57
+ ];
58
+ const [nodeUPrime, nodeVPrime] = [nodeU, nodeV].map((node) => node.derivative().simplify());
59
+ return `On doit calculer la dérivée d'un quotient.
60
+
61
+ Ici, on a :
62
+
63
+ $$
64
+ u(x) = ${nodeU.toTex()}
65
+ $$
66
+
67
+ $$
68
+ v(x) = ${nodeV.toTex()}
69
+ $$
70
+
71
+ On calcule :
72
+
73
+ $$
74
+ u'(x) = ${nodeUPrime.toTex()}
75
+ $$
76
+
77
+ $$
78
+ v'(x) = ${nodeVPrime.toTex()}
79
+ $$
80
+
81
+ Donc :
82
+
83
+ $$
84
+ (\\frac{u}{v})'(x) = ${frac(substract(multiply(nodeUPrime, nodeV), multiply(nodeU, nodeVPrime)), power(nodeV, 2)).toTex()}
85
+ $$
86
+
87
+ $$
88
+ (\\frac{u}{v})'(x) = ${frac(substract(multiply(nodeUPrime, nodeV).simplify({ towardsDistribute: true }), multiply(nodeU, nodeVPrime).simplify({ towardsDistribute: true })), power(nodeV, 2)).toTex()}
89
+ $$
90
+
91
+ $$
92
+ f'(x) = ${getAnswer(identifiers)}
93
+ $$
94
+
95
+ `;
96
+ };
97
+ const getPropositions = (n, { answer, ...identifiers }) => {
98
+ const propositions = [];
99
+ addValidProp(propositions, answer);
100
+ const { a, b, c, d } = identifiers;
101
+ //student: (u/v)' = u'/v'
102
+ {
103
+ tryToAddWrongProp(propositions, frac(a, c).simplify({ decimalToFractions: true }).toTex());
104
+ }
105
+ //student: (u/v)' = (u'v+uv')/v²
106
+ {
107
+ class WrongFractionNode extends FractionNode {
108
+ derivative(varName) {
109
+ const numNode = add(multiply(this.leftChild.derivative(varName), this.rightChild), multiply(this.leftChild, this.rightChild.derivative(varName)));
110
+ const denNode = power(this.rightChild, 2);
111
+ return frac(numNode, denNode);
112
+ }
113
+ }
114
+ const wrongInstructionNode = (() => {
115
+ const nodeNum = add(multiply(a, exp("x".toTree())), b);
116
+ const nodeDen = add(multiply(c, exp("x".toTree())), d);
117
+ return new WrongFractionNode(nodeNum, nodeDen);
118
+ })();
119
+ const nodeRaw = wrongInstructionNode.derivative();
120
+ let nodeWrong;
121
+ if (isFractionNode(nodeRaw)) {
122
+ nodeWrong = getPrettyFractionNode(nodeRaw);
123
+ }
124
+ else {
125
+ nodeWrong = nodeRaw;
126
+ }
127
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
128
+ }
129
+ //student: (u/v)' = -u'/v²
130
+ {
131
+ class WrongFractionNode extends FractionNode {
132
+ derivative(varName) {
133
+ const numNode = multiply(-1, this.leftChild).derivative(varName);
134
+ const denNode = power(this.rightChild, 2);
135
+ return frac(numNode, denNode);
136
+ }
137
+ }
138
+ const wrongInstructionNode = (() => {
139
+ const nodeNum = add(multiply(a, exp("x".toTree())), b);
140
+ const nodeDen = add(multiply(c, exp("x".toTree())), d);
141
+ return new WrongFractionNode(nodeNum, nodeDen);
142
+ })();
143
+ const nodeRaw = wrongInstructionNode.derivative();
144
+ let nodeWrong;
145
+ if (isFractionNode(nodeRaw)) {
146
+ nodeWrong = getPrettyFractionNode(nodeRaw);
147
+ }
148
+ else {
149
+ nodeWrong = nodeRaw;
150
+ }
151
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
152
+ }
153
+ //student: exp(x)' = x.exp(x)
154
+ {
155
+ class MyAddNode extends AddNode {
156
+ simplify(opts, log) {
157
+ if (this.leftChild.evaluate() === 0 ||
158
+ this.rightChild.evaluate() === 0) {
159
+ return (0).toTree();
160
+ }
161
+ else {
162
+ return super.simplify(opts, log);
163
+ }
164
+ }
165
+ }
166
+ class MyMultiplyNode extends MultiplyNode {
167
+ derivative(varName) {
168
+ return new MyAddNode(new MyMultiplyNode(this.leftChild.derivative(varName).simplify(), this.rightChild), new MyMultiplyNode(this.leftChild, this.rightChild.derivative(varName).simplify())).simplify();
169
+ }
170
+ simplify(opts, log) {
171
+ if (this.leftChild.evaluate() === 0 ||
172
+ this.rightChild.evaluate() === 0) {
173
+ return (0).toTree();
174
+ }
175
+ else {
176
+ return super.simplify(opts, log);
177
+ }
178
+ }
179
+ }
180
+ class WrongExpNode extends ExpNode {
181
+ derivative(varName = "x") {
182
+ const derivateSuper = new MyMultiplyNode(this.child.derivative(varName), exp(this.child));
183
+ return new MyMultiplyNode(varName.toTree(), derivateSuper);
184
+ }
185
+ }
186
+ const wrongInstructionNode = (() => {
187
+ const nodeNum = add(new MyMultiplyNode(a.toTree(), new WrongExpNode("x".toTree())), b);
188
+ const nodeDen = add(new MyMultiplyNode(c.toTree(), new WrongExpNode("x".toTree())), d);
189
+ return frac(nodeNum, nodeDen);
190
+ })();
191
+ const nodeRaw = wrongInstructionNode.derivative();
192
+ let nodeWrong;
193
+ if (isFractionNode(nodeRaw)) {
194
+ const nodeFraction = nodeRaw;
195
+ const nodeNum = nodeFraction.leftChild.simplify({});
196
+ const nodeDen = nodeFraction.rightChild;
197
+ nodeWrong = frac(nodeNum, nodeDen);
198
+ }
199
+ else {
200
+ nodeWrong = nodeRaw;
201
+ }
202
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
203
+ }
204
+ return shuffleProps(propositions, n);
205
+ };
206
+ const isAnswerValid = (ans, { answer }) => {
207
+ const nodeAns = parseAlgebraic(ans);
208
+ const nodeAnswer = parseAlgebraic(answer);
209
+ return [0, 1, 2, 10].every((x) => {
210
+ return (substract(nodeAns.evaluate({ x }), nodeAnswer.evaluate({ x })).evaluate() === 0);
211
+ });
212
+ };
213
+ const getExpOverExpDerivativeQuestion = () => {
214
+ function createRandomIdentifiers() {
215
+ const a = randint(-9, 10, [0]);
216
+ const b = randint(-9, 10, [0]);
217
+ const c = randint(9, 10, [0]);
218
+ const d = randint(-9, 10, [c, -c, 0]);
219
+ const identifiers = { a, b, c, d };
220
+ return identifiers;
221
+ }
222
+ let identifiers;
223
+ let counter = -1;
224
+ let isValid = false;
225
+ while (!isValid && counter < 100) {
226
+ counter++;
227
+ const identifiersCandidate = createRandomIdentifiers();
228
+ try {
229
+ const nodeAnswer = getAnswerNode(identifiersCandidate);
230
+ if (nodeAnswer && isFractionNode(nodeAnswer)) {
231
+ const nodeFraction = nodeAnswer;
232
+ const isZero = nodeFraction.leftChild.evaluate() === 0;
233
+ isValid = !isZero;
234
+ if (isValid) {
235
+ identifiers = identifiersCandidate;
236
+ }
237
+ }
238
+ }
239
+ catch (_) {
240
+ (() => { })();
241
+ }
242
+ }
243
+ if (!isValid) {
244
+ const identifiersDefault = {
245
+ a: 1,
246
+ b: 2,
247
+ c: 2,
248
+ d: 3,
249
+ };
250
+ identifiers = identifiersDefault;
251
+ }
252
+ return getQuestionFromIdentifiers(identifiers);
253
+ };
254
+ const getQuestionFromIdentifiers = (identifiers) => {
255
+ const question = {
256
+ instruction: getInstruction(identifiers),
257
+ startStatement: "f'(x)",
258
+ answer: getAnswer(identifiers),
259
+ keys: ["x", "epower"],
260
+ answerFormat: "tex",
261
+ identifiers,
262
+ hint: getHint(identifiers),
263
+ correction: getCorrection(identifiers),
264
+ };
265
+ return question;
266
+ };
267
+ export const expOverExpDerivative = {
268
+ id: "expOverExpDerivative",
269
+ connector: "=",
270
+ label: "Dérivée de $\\frac{a e^x + b}{c e^x + d}$",
271
+ isSingleStep: false,
272
+ generator: (nb) => getDistinctQuestions(getExpOverExpDerivativeQuestion, nb),
273
+ getPropositions,
274
+ qcmTimer: 60,
275
+ freeTimer: 60,
276
+ isAnswerValid,
277
+ subject: "Mathématiques",
278
+ getAnswer,
279
+ getInstruction,
280
+ getQuestionFromIdentifiers,
281
+ hasHintAndCorrection: true,
282
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+DF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyFF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -3,6 +3,31 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
5
5
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
6
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
7
+ const getHint = () => {
8
+ return `On rappelle que :
9
+
10
+ $$
11
+ \\left(\\frac{1}{x}\\right)' = -\\frac{1}{x^2}
12
+ $$`;
13
+ };
14
+ const getCorrection = (identifiers) => {
15
+ const { a } = identifiers;
16
+ return `On a :
17
+
18
+ $$
19
+ f(x) = ${a}\\times \\frac{1}{x}
20
+ $$
21
+
22
+ donc
23
+
24
+ ${alignTex([
25
+ ["f'(x)", "=", `${a}\\times \\left(\\frac{1}{x}\\right)'`],
26
+ ["", "=", `${a}\\times \\left(-\\frac{1}{x^2}\\right)`],
27
+ ["", "=", getAnswer(identifiers)],
28
+ ])}
29
+ `;
30
+ };
6
31
  const getInstruction = (identifiers) => {
7
32
  const { a } = identifiers;
8
33
  return `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par :
@@ -17,7 +42,7 @@ const getAnswer = (identifiers) => {
17
42
  return answer;
18
43
  };
19
44
  const getInverseFunctionDerivative = () => {
20
- const a = randint(-19, 20, [0]);
45
+ const a = randint(-19, 20, [0, 1]);
21
46
  const identifiers = { a };
22
47
  return getQuestionFromIdentifiers(identifiers);
23
48
  };
@@ -29,6 +54,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
29
54
  keys: ["x"],
30
55
  answerFormat: "tex",
31
56
  identifiers,
57
+ hint: getHint(identifiers),
58
+ correction: getCorrection(identifiers),
32
59
  };
33
60
  return question;
34
61
  };
@@ -59,7 +86,7 @@ const isAnswerValid = (ans, { answer }) => {
59
86
  export const inverseFunctionDerivative = {
60
87
  id: "inverseFunctionDerivative",
61
88
  connector: "=",
62
- label: "Dérivée d'une fonction inverse",
89
+ label: "Dérivée d'une fonction inverse du type $f(x) = \\frac{k}{x}$",
63
90
  isSingleStep: false,
64
91
  generator: (nb) => getDistinctQuestions(getInverseFunctionDerivative, nb),
65
92
  qcmTimer: 60,
@@ -70,4 +97,5 @@ export const inverseFunctionDerivative = {
70
97
  getAnswer,
71
98
  getInstruction,
72
99
  getQuestionFromIdentifiers,
100
+ hasHintAndCorrection: true,
73
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"productDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/productDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAuFF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
1
+ {"version":3,"file":"productDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/productDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA2JF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -1,9 +1,73 @@
1
1
  import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Polynomial, PolynomialConstructor, } from "../../../../math/polynomials/polynomial.js";
4
- import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
4
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
5
+ import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js";
5
6
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
6
7
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
8
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
9
+ const getHint = () => {
10
+ return `La fonction $f$ est un produit de la forme :
11
+
12
+ $$
13
+ f(x) = u(x)\\times v(x)
14
+ $$
15
+
16
+ On peut alors utiliser la formule de la dérivée d'un produit :
17
+
18
+ $$
19
+ (uv)' = u'v+uv'
20
+ $$`;
21
+ };
22
+ const getCorrection = (identifiers) => {
23
+ const { poly1Coeffs, poly2Coeffs } = identifiers;
24
+ const u = new Polynomial(poly1Coeffs);
25
+ const uTree = u.toTree();
26
+ const uprime = u.derivate();
27
+ const uprimeTree = uprime.toTree();
28
+ const v = new Polynomial(poly2Coeffs);
29
+ const vTree = v.toTree();
30
+ const vprime = v.derivate();
31
+ const vprimeTree = vprime.toTree();
32
+ return `La fonction $f$ est un produit de la forme $u(x)\\times v(x)$, avec :
33
+
34
+ $$
35
+ u(x) = ${uTree.toTex()}
36
+ $$
37
+
38
+ et
39
+
40
+ $$
41
+ v(x) = ${vTree.toTex()}
42
+ $$
43
+
44
+ On a donc $u'(x) = ${uprimeTree.toTex()}$ et $v'(x) = ${vprimeTree.toTex()}$.
45
+
46
+ La fonction dérivée de $f$ est donc :
47
+
48
+ ${alignTex([
49
+ ["f'(x)", "=", "u'v+uv'"],
50
+ [
51
+ "",
52
+ "=",
53
+ add(multiply(uprimeTree, vTree), multiply(uTree, vprimeTree)).toTex(),
54
+ ],
55
+ [
56
+ "",
57
+ "=",
58
+ add(multiply(uprimeTree, vTree).simplify({
59
+ towardsDistribute: true,
60
+ forbidFactorize: true,
61
+ }), multiply(uTree, vprimeTree).simplify({
62
+ towardsDistribute: true,
63
+ forbidFactorize: true,
64
+ })).toTex(),
65
+ ],
66
+ ["", "=", getAnswer(identifiers)],
67
+ ])}
68
+
69
+ `;
70
+ };
7
71
  const getInstruction = (identifiers) => {
8
72
  const { poly1Coeffs, poly2Coeffs } = identifiers;
9
73
  const poly1 = new Polynomial(poly1Coeffs);
@@ -37,6 +101,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
37
101
  keys: ["x", "xsquare", "xcube"],
38
102
  answerFormat: "tex",
39
103
  identifiers,
104
+ hint: getHint(identifiers),
105
+ correction: getCorrection(identifiers),
40
106
  };
41
107
  return question;
42
108
  };
@@ -83,4 +149,5 @@ export const productDerivative = {
83
149
  getAnswer,
84
150
  getInstruction,
85
151
  getQuestionFromIdentifiers,
152
+ hasHintAndCorrection: true,
86
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA6GF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
1
+ {"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAsJF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}