math-exercises 3.0.56 → 3.0.58

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 (286) hide show
  1. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +2 -0
  2. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/operations/operationsPriorities.js +46 -36
  4. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
  5. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +65 -13
  6. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  7. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -4
  8. package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts +16 -0
  9. package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -0
  10. package/lib/exercises/math/calculLitteral/factorisation/facto1.js +184 -0
  11. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  12. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +43 -0
  13. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -1
  14. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  15. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
  16. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
  17. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +23 -0
  18. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
  19. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +23 -0
  20. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
  21. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +49 -0
  22. package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
  23. package/lib/exercises/math/conversion/capacityConversion.js +68 -12
  24. package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
  25. package/lib/exercises/math/conversion/hoursToDecimal.js +73 -15
  26. package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
  27. package/lib/exercises/math/conversion/lengthConversion.js +55 -6
  28. package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
  29. package/lib/exercises/math/conversion/massConversion.js +72 -16
  30. package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
  31. package/lib/exercises/math/conversion/volumeConversion.js +72 -12
  32. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts +8 -0
  33. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -0
  34. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +102 -0
  35. package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts +7 -0
  36. package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -0
  37. package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +52 -0
  38. package/lib/exercises/math/derivation/convexity/index.d.ts +4 -0
  39. package/lib/exercises/math/derivation/convexity/index.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/convexity/index.js +3 -0
  41. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts +7 -0
  42. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +134 -0
  44. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts +8 -0
  45. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +79 -0
  47. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts +8 -0
  48. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +85 -0
  50. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts +8 -0
  51. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +86 -0
  53. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts +8 -0
  54. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -0
  55. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +76 -0
  56. package/lib/exercises/math/derivation/derivative/exp/index.d.ts +6 -0
  57. package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -0
  58. package/lib/exercises/math/derivation/derivative/exp/index.js +5 -0
  59. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts +7 -0
  60. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -0
  61. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +84 -0
  62. package/lib/exercises/math/derivation/derivative/index.d.ts +6 -27
  63. package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
  64. package/lib/exercises/math/derivation/derivative/index.js +6 -27
  65. package/lib/exercises/math/derivation/derivative/ln/index.d.ts +4 -0
  66. package/lib/exercises/math/derivation/derivative/ln/index.d.ts.map +1 -0
  67. package/lib/exercises/math/derivation/derivative/ln/index.js +3 -0
  68. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts +8 -0
  69. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -0
  70. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +81 -0
  71. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts +8 -0
  72. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -0
  73. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +103 -0
  74. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts +8 -0
  75. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -0
  76. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +77 -0
  77. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +10 -0
  78. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -0
  79. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +71 -0
  80. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +11 -0
  81. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -0
  82. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +88 -0
  83. package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts +8 -0
  84. package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts.map +1 -0
  85. package/lib/exercises/math/derivation/derivative/polynomial/index.js +7 -0
  86. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +10 -0
  87. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -0
  88. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +115 -0
  89. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts +10 -0
  90. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -0
  91. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +80 -0
  92. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts +9 -0
  93. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -0
  94. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +67 -0
  95. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +10 -0
  96. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -0
  97. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +134 -0
  98. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts +11 -0
  99. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -0
  100. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +97 -0
  101. package/lib/exercises/math/derivation/derivative/power/index.d.ts +3 -0
  102. package/lib/exercises/math/derivation/derivative/power/index.d.ts.map +1 -0
  103. package/lib/exercises/math/derivation/derivative/power/index.js +2 -0
  104. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts +9 -0
  105. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -0
  106. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +122 -0
  107. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts +8 -0
  108. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -0
  109. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +118 -0
  110. package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts +3 -0
  111. package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts.map +1 -0
  112. package/lib/exercises/math/derivation/derivative/sqrt/index.js +3 -0
  113. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts +7 -0
  114. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -0
  115. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +115 -0
  116. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts +8 -0
  117. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -0
  118. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +77 -0
  119. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts +8 -0
  120. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -0
  121. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +85 -0
  122. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts +8 -0
  123. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -0
  124. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +81 -0
  125. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts +7 -0
  126. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -0
  127. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +103 -0
  128. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +5 -0
  129. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -0
  130. package/lib/exercises/math/derivation/derivative/trigo/index.js +4 -0
  131. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts +8 -0
  132. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -0
  133. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +70 -0
  134. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts +7 -0
  135. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -0
  136. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +91 -0
  137. package/lib/exercises/math/derivation/derivativeNumberCalcul.d.ts.map +1 -1
  138. package/lib/exercises/math/derivation/derivativeNumberCalcul.js +4 -2
  139. package/lib/exercises/math/derivation/index.d.ts +2 -0
  140. package/lib/exercises/math/derivation/index.d.ts.map +1 -1
  141. package/lib/exercises/math/derivation/index.js +2 -0
  142. package/lib/exercises/math/derivation/variations/index.d.ts +2 -0
  143. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -0
  144. package/lib/exercises/math/derivation/variations/index.js +1 -0
  145. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts +11 -0
  146. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -0
  147. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +168 -0
  148. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
  149. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +39 -22
  150. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
  151. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +7 -1
  152. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  153. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +38 -15
  154. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
  155. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +29 -8
  156. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts +8 -0
  157. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -0
  158. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +86 -0
  159. package/lib/exercises/math/equaDiff/index.d.ts +1 -1
  160. package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
  161. package/lib/exercises/math/equaDiff/index.js +1 -1
  162. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  163. package/lib/exercises/math/functions/affines/signFunction.js +23 -11
  164. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  165. package/lib/exercises/math/functions/exponential/expEquation.js +3 -0
  166. package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
  167. package/lib/exercises/math/functions/exponential/expFactorization.js +3 -0
  168. package/lib/exercises/math/functions/exponential/expSimplifiying.d.ts.map +1 -1
  169. package/lib/exercises/math/functions/exponential/expSimplifiying.js +83 -45
  170. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
  171. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +12 -5
  172. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts +2 -0
  173. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts.map +1 -0
  174. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.js +63 -0
  175. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
  176. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +68 -29
  177. package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts.map +1 -1
  178. package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +56 -4
  179. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -1
  180. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +71 -25
  181. package/lib/exercises/math/limits/polynomLimit.d.ts +1 -1
  182. package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
  183. package/lib/exercises/math/limits/polynomLimit.js +28 -9
  184. package/lib/exercises/math/limits/polynomLimitNoFI.d.ts +1 -1
  185. package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
  186. package/lib/exercises/math/limits/polynomLimitNoFI.js +29 -10
  187. package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
  188. package/lib/exercises/math/powers/calculateNegativePower.js +59 -16
  189. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  190. package/lib/exercises/math/powers/decimalToScientific.js +55 -11
  191. package/lib/exercises/math/powers/index.d.ts +1 -0
  192. package/lib/exercises/math/powers/index.d.ts.map +1 -1
  193. package/lib/exercises/math/powers/index.js +1 -0
  194. package/lib/exercises/math/powers/powersDivision.d.ts +5 -2
  195. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  196. package/lib/exercises/math/powers/powersDivision.js +68 -53
  197. package/lib/exercises/math/powers/powersMixOperations.d.ts +1 -0
  198. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  199. package/lib/exercises/math/powers/powersMixOperations.js +88 -17
  200. package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts +10 -0
  201. package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -0
  202. package/lib/exercises/math/powers/powersOfTenMixOperations.js +129 -0
  203. package/lib/exercises/math/powers/powersOfTenToDecimal.d.ts.map +1 -1
  204. package/lib/exercises/math/powers/powersOfTenToDecimal.js +32 -3
  205. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  206. package/lib/exercises/math/powers/powersProduct.js +1 -0
  207. package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
  208. package/lib/exercises/math/powers/scientificToDecimal.js +50 -10
  209. package/lib/exercises/math/primitive/klogUPrimitive.js +1 -1
  210. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  211. package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
  212. package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -0
  213. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
  214. package/lib/exercises/math/probaStat/stats1var/averageList.js +4 -4
  215. package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
  216. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +42 -11
  217. package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -1
  218. package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +8 -20
  219. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
  220. package/lib/exercises/math/probaStat/stats1var/etendueList.js +4 -6
  221. package/lib/exercises/math/probaStat/stats1var/interquartilesList.d.ts.map +1 -1
  222. package/lib/exercises/math/probaStat/stats1var/interquartilesList.js +4 -4
  223. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
  224. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +4 -4
  225. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  226. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -9
  227. package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
  228. package/lib/exercises/math/probaStat/stats1var/median.js +19 -14
  229. package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
  230. package/lib/exercises/math/probaStat/stats1var/medianList.js +3 -0
  231. package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
  232. package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -11
  233. package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
  234. package/lib/exercises/math/probaStat/stats1var/quartilesList.js +18 -14
  235. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.d.ts.map +1 -1
  236. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +4 -4
  237. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
  238. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +4 -4
  239. package/lib/exercises/math/probaStat/stats1var/varianceList.d.ts.map +1 -1
  240. package/lib/exercises/math/probaStat/stats1var/varianceList.js +4 -4
  241. package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
  242. package/lib/exercises/math/probaStat/stats1var/varianceTable.js +4 -4
  243. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
  244. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +40 -2
  245. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
  246. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +32 -0
  247. package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
  248. package/lib/exercises/math/trigonometry/trigonometry.js +67 -1
  249. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  250. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +89 -0
  251. package/lib/exercises/pc/index.d.ts +5 -5
  252. package/lib/exercises/pc/index.d.ts.map +1 -1
  253. package/lib/exercises/pc/index.js +5 -5
  254. package/lib/index.d.ts +56 -45
  255. package/lib/index.d.ts.map +1 -1
  256. package/lib/math/geometry/angle.d.ts.map +1 -1
  257. package/lib/math/geometry/angle.js +0 -5
  258. package/lib/math/geometry/vector.d.ts +1 -0
  259. package/lib/math/geometry/vector.d.ts.map +1 -1
  260. package/lib/math/geometry/vector.js +19 -0
  261. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  262. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  263. package/lib/math/numbers/decimals/decimal.js +2 -0
  264. package/lib/math/systems/generalSystem.d.ts +6 -1
  265. package/lib/math/systems/generalSystem.d.ts.map +1 -1
  266. package/lib/math/systems/generalSystem.js +137 -0
  267. package/lib/math/utils/arithmetic/lcm.js +1 -1
  268. package/lib/playground.d.ts.map +1 -1
  269. package/lib/playground.js +4 -34
  270. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  271. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  272. package/lib/tree/nodes/equations/equalNode.d.ts +7 -1
  273. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  274. package/lib/tree/nodes/equations/equalNode.js +17 -9
  275. package/lib/tree/nodes/functions/logNode.js +2 -4
  276. package/lib/tree/nodes/operators/addNode.js +1 -1
  277. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  278. package/lib/tree/nodes/operators/fractionNode.js +35 -11
  279. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  280. package/lib/tree/nodes/operators/multiplyNode.js +4 -3
  281. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  282. package/lib/tree/nodes/operators/powerNode.js +5 -0
  283. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  284. package/lib/tree/nodes/sets/intervalNode.js +3 -1
  285. package/lib/tree/parsers/latexParser.js +6 -2
  286. package/package.json +1 -1
@@ -0,0 +1,86 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
4
+ import { randint } from "../../../../../math/utils/random/randint.js";
5
+ import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
6
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
7
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
9
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
10
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
11
+ const getInstruction = (identifiers) => {
12
+ const { a, b } = identifiers;
13
+ const myfunction = new MultiplyNode(new Polynomial([b, a]).toTree(), new ExpNode(new VariableNode("x")));
14
+ return `Déterminer la dérivée de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x) = ${myfunction.toTex()}
18
+ $$`;
19
+ };
20
+ const getAnswerNode = (identifiers) => {
21
+ const { a, b } = identifiers;
22
+ const derivative = new MultiplyNode(new Polynomial([b + a, a]).toTree(), new ExpNode(new VariableNode("x")));
23
+ return derivative;
24
+ };
25
+ const getAnswer = (identifiers) => {
26
+ return getAnswerNode(identifiers).simplify().toTex();
27
+ };
28
+ const getQuestionFromIdentifiers = (identifiers) => {
29
+ const question = {
30
+ instruction: getInstruction(identifiers),
31
+ startStatement: "f'(x)",
32
+ answer: getAnswer(identifiers),
33
+ keys: ["x", "epower", "exp"],
34
+ answerFormat: "tex",
35
+ identifiers,
36
+ };
37
+ return question;
38
+ };
39
+ const getExpDerivativeThree = () => {
40
+ const a = randint(-9, 10, [0]);
41
+ const b = randint(-9, 10);
42
+ const identifiers = { a, b };
43
+ return getQuestionFromIdentifiers(identifiers);
44
+ };
45
+ const getPropositions = (n, { answer, a, b }) => {
46
+ const propositions = [];
47
+ addValidProp(propositions, answer);
48
+ tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))).toTex());
49
+ tryToAddWrongProp(propositions, new MultiplyNode(new Polynomial([b + a, -a]).toTree(), new ExpNode(new VariableNode("x"))).toTex());
50
+ tryToAddWrongProp(propositions, a + "");
51
+ tryToAddWrongProp(propositions, new MultiplyNode(new MultiplyNode(new NumberNode(a), new VariableNode("x")), new ExpNode(new VariableNode("x"))).toTex());
52
+ return shuffleProps(propositions, n);
53
+ };
54
+ const isAnswerValid = (ans, { answer, ...identifiers }) => {
55
+ try {
56
+ const parsed = parseAlgebraic(ans);
57
+ const node = getAnswerNode(identifiers);
58
+ return (parsed
59
+ .simplify({ towardsDistribute: true, forbidFactorize: true })
60
+ .toTex() ===
61
+ node
62
+ .simplify({
63
+ towardsDistribute: true,
64
+ forbidFactorize: true,
65
+ })
66
+ .toTex());
67
+ }
68
+ catch (err) {
69
+ return handleVEAError(err);
70
+ }
71
+ };
72
+ export const expDerivativeThree = {
73
+ id: "expDerivativeThree",
74
+ connector: "=",
75
+ label: "Dérivée de $(ax+b) \\times \\exp(x)$",
76
+ isSingleStep: false,
77
+ generator: (nb) => getDistinctQuestions(getExpDerivativeThree, nb),
78
+ getPropositions,
79
+ qcmTimer: 60,
80
+ freeTimer: 60,
81
+ isAnswerValid,
82
+ subject: "Mathématiques",
83
+ getInstruction,
84
+ getAnswer,
85
+ getQuestionFromIdentifiers,
86
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const expDerivativeTwo: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=expDerivativeTwo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
@@ -0,0 +1,76 @@
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 { ExpNode } from "../../../../../tree/nodes/functions/expNode.js"; // Importer le nœud d'exponentielle
5
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
6
+ import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
7
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
9
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
10
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
11
+ const getInstruction = (identifiers) => {
12
+ const { a, b } = identifiers;
13
+ const myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))), new NumberNode(b));
14
+ return `Déterminer la dérivée de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x) = ${myfunction.toTex()}
18
+ $$`;
19
+ };
20
+ const getAnswer = (identifiers) => {
21
+ const { a, b } = identifiers;
22
+ const derivative = new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x")));
23
+ const answer = derivative.toTex();
24
+ return answer;
25
+ };
26
+ const getExpDerivative = () => {
27
+ const a = randint(-9, 10, [0]);
28
+ const b = randint(-9, 10);
29
+ const identifiers = { a, b };
30
+ const question = {
31
+ instruction: getInstruction(identifiers),
32
+ startStatement: "f'(x)",
33
+ answer: getAnswer(identifiers),
34
+ keys: ["x", "epower", "exp"],
35
+ answerFormat: "tex",
36
+ identifiers,
37
+ };
38
+ return question;
39
+ };
40
+ const getPropositions = (n, { answer, a, b }) => {
41
+ const propositions = [];
42
+ addValidProp(propositions, answer);
43
+ const myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))), new NumberNode(b));
44
+ tryToAddWrongProp(propositions, myfunction.toTex());
45
+ tryToAddWrongProp(propositions, a + "");
46
+ while (propositions.length < n) {
47
+ const randomA = randint(-9, 10, [0]);
48
+ tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(randomA), new ExpNode(new VariableNode("x"))).toTex());
49
+ }
50
+ return shuffleProps(propositions, n);
51
+ };
52
+ const isAnswerValid = (ans, { a, answer }) => {
53
+ try {
54
+ const parsed = parseAlgebraic(ans);
55
+ if (!parsed)
56
+ return false;
57
+ return parsed.simplify().toTex() === answer;
58
+ }
59
+ catch (err) {
60
+ return handleVEAError(err);
61
+ }
62
+ };
63
+ export const expDerivativeTwo = {
64
+ id: "expDerivativeTwo",
65
+ connector: "=",
66
+ label: "Dérivée de $a \\times \\exp(x) + b$",
67
+ isSingleStep: false,
68
+ generator: (nb) => getDistinctQuestions(getExpDerivative, nb),
69
+ getPropositions,
70
+ qcmTimer: 60,
71
+ freeTimer: 60,
72
+ isAnswerValid,
73
+ subject: "Mathématiques",
74
+ getAnswer,
75
+ getInstruction,
76
+ };
@@ -0,0 +1,6 @@
1
+ export * from "./expDerivativeOne.js";
2
+ export * from "./expDerivativeThree.js";
3
+ export * from "./expDerivativeTwo.js";
4
+ export * from "./expDerivativeFour.js";
5
+ export * from "./secondDerivativeOfExpoFunction.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./expDerivativeOne.js";
2
+ export * from "./expDerivativeThree.js";
3
+ export * from "./expDerivativeTwo.js";
4
+ export * from "./expDerivativeFour.js";
5
+ export * from "./secondDerivativeOfExpoFunction.js";
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ coeffs: number[];
4
+ };
5
+ export declare const secondDerivativeOfExpoFunction: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=secondDerivativeOfExpoFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secondDerivativeOfExpoFunction.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAgFF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Polynomial, PolynomialConstructor, } from "../../../../../math/polynomials/polynomial.js";
4
+ import { expUDerivate } from "../../../../../math/utils/functions/expUDerivate.js";
5
+ import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
6
+ import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
7
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
9
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
10
+ const getInstruction = (identifiers) => {
11
+ const { coeffs } = identifiers;
12
+ const polynom = new Polynomial(coeffs);
13
+ const funct = new ExpNode(polynom.toTree());
14
+ return `Déterminer la fonction dérivée seconde $f''$ de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x)=${funct.toTex()}
18
+ $$`;
19
+ };
20
+ const getAnswer = (identifiers) => {
21
+ const { coeffs } = identifiers;
22
+ const polynom = new Polynomial(coeffs);
23
+ const funct = new ExpNode(polynom.toTree());
24
+ const uDerivated = polynom.derivate().toTree();
25
+ const uSecondDerivated = polynom.secondDerivate();
26
+ return new AddNode(new MultiplyNode(uSecondDerivated.toTree(), funct).simplify(), new MultiplyNode(uDerivated, expUDerivate(funct, polynom)).simplify())
27
+ .simplify({ towardsDistribute: true, forbidFactorize: true })
28
+ .toTex();
29
+ };
30
+ const getSecondDerivativeOfExpoFunctionQuestion = () => {
31
+ const polynom = PolynomialConstructor.randomWithOrder(1, "x");
32
+ const identifiers = { coeffs: polynom.coefficients };
33
+ const question = {
34
+ answer: getAnswer(identifiers),
35
+ instruction: getInstruction(identifiers),
36
+ keys: ["epower", "x", "lnBrackets"],
37
+ answerFormat: "tex",
38
+ identifiers,
39
+ };
40
+ return question;
41
+ };
42
+ const getPropositions = (n, { answer, coeffs }) => {
43
+ const propositions = [];
44
+ addValidProp(propositions, answer);
45
+ generateProposition(coeffs).forEach((value) => tryToAddWrongProp(propositions, value.toTex()));
46
+ while (propositions.length < n) {
47
+ tryToAddWrongProp(propositions, new ExpNode(PolynomialConstructor.random(2).toTree()).toTex());
48
+ }
49
+ return shuffleProps(propositions, n);
50
+ };
51
+ const isAnswerValid = (ans, { answer, coeffs }) => {
52
+ try {
53
+ const parsed = parseAlgebraic(ans);
54
+ if (!parsed)
55
+ return false;
56
+ return (parsed
57
+ .simplify({ towardsDistribute: true, forbidFactorize: true })
58
+ .toTex() === answer);
59
+ }
60
+ catch (err) {
61
+ return handleVEAError(err);
62
+ }
63
+ };
64
+ const generateProposition = (coeffs) => {
65
+ const u = new Polynomial(coeffs, "x");
66
+ const e = new ExpNode(u.toTree());
67
+ const firstPropostion = expUDerivate(e, u);
68
+ const secondProposition = new MultiplyNode(u.toTree(), firstPropostion);
69
+ const thirdProposition = new ExpNode(u.derivate().toTree());
70
+ return [firstPropostion, secondProposition, thirdProposition];
71
+ };
72
+ export const secondDerivativeOfExpoFunction = {
73
+ id: "secondDerivativeOfExpoFunction",
74
+ label: "Dérivée seconde d'une fonction de type $\\exp(u)$",
75
+ levels: ["TermSpé"],
76
+ isSingleStep: true,
77
+ sections: ["Dérivation"],
78
+ generator: (nb) => getDistinctQuestions(getSecondDerivativeOfExpoFunctionQuestion, nb),
79
+ qcmTimer: 60,
80
+ freeTimer: 60,
81
+ getPropositions,
82
+ isAnswerValid,
83
+ subject: "Mathématiques",
84
+ };
@@ -1,31 +1,10 @@
1
- export { constanteDerivative } from "./constanteDerivative.js";
2
- export * from "./expDerivativeOne.js";
3
- export * from "./expDerivativeThree.js";
4
- export * from "./expDerivativeTwo.js";
5
- export * from "./expDerivativeFour.js";
6
- export { firstDegreeDerivative } from "./firstDegreeDerivative.js";
7
1
  export * from "./inverseFunctionDerivative.js";
8
- export * from "./lnDerivativeOne.js";
9
- export * from "./lnDerivativeThree.js";
10
- export * from "./lnDerivativeTwo.js";
11
- export * from "./powerFunctionDerivative.js";
12
2
  export * from "./quotientDerivative.js";
13
3
  export * from "./productDerivative.js";
14
- export * from "./rootFunctionDerivative.js";
15
- export { secondDegreeDerivative } from "./secondDegreeDerivative.js";
16
- export { thirdDegreeDerivative } from "./thirdDegreeDerivative.js";
17
- export * from "./thirdDegreeFunctionVariation.js";
18
- export * from "./usualderivative.js";
19
- export * from "./sqrtCompositionDerivation.js";
20
- export * from "./cosCompositionDerivation.js";
21
- export * from "./sinCompositionDerivation.js";
22
- export * from "./powerCompositionDerivation.js";
23
- export * from "./sinSecondDegreeDerivative.js";
24
- export * from "./cosSecondDegreeDerivative.js";
25
- export * from "./convexityTrinomials.js";
26
- export * from "./convexityQuadrinomials.js";
27
- export * from "./inflexionPointQuadrinomials.js";
28
- export * from "./secondDerivativeOfTrinom.js";
29
- export * from "./secondDerivativeOfThirdDegreeFunction.js";
30
- export * from "./secondDerivativeOfExpoFunction.js";
4
+ export * from "./exp/index.js";
5
+ export * from "./ln/index.js";
6
+ export * from "./polynomial/index.js";
7
+ export * from "./trigo/index.js";
8
+ export * from "./power/index.js";
9
+ export * from "./sqrt/index.js";
31
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -1,30 +1,9 @@
1
- export { constanteDerivative } from "./constanteDerivative.js";
2
- export * from "./expDerivativeOne.js";
3
- export * from "./expDerivativeThree.js";
4
- export * from "./expDerivativeTwo.js";
5
- export * from "./expDerivativeFour.js";
6
- export { firstDegreeDerivative } from "./firstDegreeDerivative.js";
7
1
  export * from "./inverseFunctionDerivative.js";
8
- export * from "./lnDerivativeOne.js";
9
- export * from "./lnDerivativeThree.js";
10
- export * from "./lnDerivativeTwo.js";
11
- export * from "./powerFunctionDerivative.js";
12
2
  export * from "./quotientDerivative.js";
13
3
  export * from "./productDerivative.js";
14
- export * from "./rootFunctionDerivative.js";
15
- export { secondDegreeDerivative } from "./secondDegreeDerivative.js";
16
- export { thirdDegreeDerivative } from "./thirdDegreeDerivative.js";
17
- export * from "./thirdDegreeFunctionVariation.js";
18
- export * from "./usualderivative.js";
19
- export * from "./sqrtCompositionDerivation.js";
20
- export * from "./cosCompositionDerivation.js";
21
- export * from "./sinCompositionDerivation.js";
22
- export * from "./powerCompositionDerivation.js";
23
- export * from "./sinSecondDegreeDerivative.js";
24
- export * from "./cosSecondDegreeDerivative.js";
25
- export * from "./convexityTrinomials.js";
26
- export * from "./convexityQuadrinomials.js";
27
- export * from "./inflexionPointQuadrinomials.js";
28
- export * from "./secondDerivativeOfTrinom.js";
29
- export * from "./secondDerivativeOfThirdDegreeFunction.js";
30
- export * from "./secondDerivativeOfExpoFunction.js";
4
+ export * from "./exp/index.js";
5
+ export * from "./ln/index.js";
6
+ export * from "./polynomial/index.js";
7
+ export * from "./trigo/index.js";
8
+ export * from "./power/index.js";
9
+ export * from "./sqrt/index.js";
@@ -0,0 +1,4 @@
1
+ export * from "./lnDerivativeOne.js";
2
+ export * from "./lnDerivativeThree.js";
3
+ export * from "./lnDerivativeTwo.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./lnDerivativeOne.js";
2
+ export * from "./lnDerivativeThree.js";
3
+ export * from "./lnDerivativeTwo.js";
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const lnDerivativeOne: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=lnDerivativeOne.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/lnDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
4
+ import { RationalFrac } from "../../../../../math/polynomials/rationalFrac.js";
5
+ import { randint } from "../../../../../math/utils/random/randint.js";
6
+ import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
7
+ import { LogNode } from "../../../../../tree/nodes/functions/logNode.js";
8
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
9
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
10
+ const getInstruction = (identifiers) => {
11
+ const { a, b } = identifiers;
12
+ const polynom = new Polynomial([b, a]);
13
+ const logTree = new LogNode(polynom.toTree());
14
+ return `Déterminer la dérivée de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x) = ${logTree.toTex()}
18
+ $$`;
19
+ };
20
+ const getAnswer = (identifiers) => {
21
+ const { a, b } = identifiers;
22
+ const polynom = new Polynomial([b, a]);
23
+ const answer = new RationalFrac(new Polynomial([a]), polynom)
24
+ .simplify()
25
+ .toTree()
26
+ .toTex();
27
+ return answer;
28
+ };
29
+ const getLnDerivative = () => {
30
+ const a = randint(-9, 10, [0]);
31
+ const b = randint(-9, 10);
32
+ const identifiers = { a, b };
33
+ const question = {
34
+ instruction: getInstruction(identifiers),
35
+ startStatement: "f'(x)",
36
+ answer: getAnswer(identifiers),
37
+ keys: ["x", "lnBrackets", "epower"],
38
+ answerFormat: "tex",
39
+ identifiers,
40
+ };
41
+ return question;
42
+ };
43
+ const getPropositions = (n, { answer, a, b }) => {
44
+ const propositions = [];
45
+ addValidProp(propositions, answer);
46
+ const polynom = new Polynomial([b, a]);
47
+ const logTree = new LogNode(polynom.toTree());
48
+ tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(a), logTree).toTex());
49
+ tryToAddWrongProp(propositions, a + "");
50
+ tryToAddWrongProp(propositions, new ExpNode(polynom.toTree()).toTex());
51
+ tryToAddWrongProp(propositions, polynom.toTree().toTex());
52
+ tryToAddWrongProp(propositions, `\\frac{${a}}{${logTree.toTex()}}`);
53
+ tryToAddWrongProp(propositions, `\\frac{1}{${polynom.toTree().toTex()}}`);
54
+ return shuffleProps(propositions, n);
55
+ };
56
+ const isAnswerValid = (ans, { a, b }) => {
57
+ const frac = new RationalFrac(new Polynomial([a]), new Polynomial([b, a]));
58
+ const nonSimplified = frac.toTree();
59
+ const simplified = frac.simplify().toTree();
60
+ const texs = [
61
+ ...simplified.toAllValidTexs(),
62
+ ...nonSimplified.toAllValidTexs(),
63
+ ];
64
+ return texs.includes(ans);
65
+ };
66
+ export const lnDerivativeOne = {
67
+ id: "lnDerivativeOne",
68
+ connector: "=",
69
+ label: "Dérivée de $\\ln(ax + b)$",
70
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermSpé"],
71
+ sections: ["Dérivation", "Logarithme népérien"],
72
+ isSingleStep: false,
73
+ generator: (nb) => getDistinctQuestions(getLnDerivative, nb),
74
+ qcmTimer: 60,
75
+ freeTimer: 60,
76
+ getPropositions,
77
+ isAnswerValid,
78
+ subject: "Mathématiques",
79
+ getAnswer,
80
+ getInstruction,
81
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const lnDerivativeThree: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=lnDerivativeThree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8GF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Affine } from "../../../../../math/polynomials/affine.js";
4
+ import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
5
+ import { randint } from "../../../../../math/utils/random/randint.js";
6
+ import { LogNode } from "../../../../../tree/nodes/functions/logNode.js";
7
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
8
+ import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
9
+ import { FractionNode } from "../../../../../tree/nodes/operators/fractionNode.js";
10
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
12
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
13
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
14
+ const getInstruction = (identifiers) => {
15
+ const { a, b } = identifiers;
16
+ const affine = new Polynomial([b, a]).toTree();
17
+ const myfunction = new MultiplyNode(affine, new LogNode(new VariableNode("x")));
18
+ return `Déterminer la dérivée de la fonction :
19
+
20
+ $$
21
+ f(x) = ${myfunction.toTex()}
22
+ $$`;
23
+ };
24
+ const getAnswer = (identifiers) => {
25
+ const { a, b } = identifiers;
26
+ const affine = new Polynomial([b, a]).toTree();
27
+ const derivative = new AddNode(new MultiplyNode(new NumberNode(a), new LogNode(new VariableNode("x"))), new FractionNode(affine, new VariableNode("x")));
28
+ return derivative
29
+ .simplify({
30
+ forbidFactorize: true,
31
+ forceDistributeFractions: true,
32
+ towardsDistribute: true,
33
+ })
34
+ .toTex();
35
+ };
36
+ const getKeys = (identifiers) => {
37
+ return ["x", "lnBrackets", "epower"];
38
+ };
39
+ const getLnDerivative = () => {
40
+ const a = randint(-9, 10, [0]);
41
+ const b = randint(-9, 10);
42
+ const identifiers = { a, b };
43
+ const question = {
44
+ instruction: getInstruction(identifiers),
45
+ startStatement: "f'(x)",
46
+ answer: getAnswer(identifiers),
47
+ keys: getKeys(identifiers),
48
+ answerFormat: "tex",
49
+ identifiers,
50
+ };
51
+ return question;
52
+ };
53
+ const getPropositions = (n, { answer, a, b }) => {
54
+ const propositions = [];
55
+ addValidProp(propositions, answer);
56
+ const affine = new Affine(a, b).toTree();
57
+ tryToAddWrongProp(propositions, new FractionNode(new NumberNode(a), new VariableNode("x")).toTex());
58
+ tryToAddWrongProp(propositions, new FractionNode(affine, new VariableNode("x")).toTex());
59
+ if (a === 1)
60
+ tryToAddWrongProp(propositions, "\\ln\\left(x\\right)");
61
+ else
62
+ tryToAddWrongProp(propositions, `${a}\\ln\\left(x\\right)`);
63
+ while (propositions.length < n) {
64
+ const randomA = randint(-9, 10, [0]);
65
+ const randomB = randint(-9, 10);
66
+ tryToAddWrongProp(propositions, new AddNode(new MultiplyNode(new NumberNode(randomA), new LogNode(new VariableNode("x"))), new FractionNode(new Polynomial([randomB, randomA]).toTree(), new VariableNode("x"))).toTex());
67
+ }
68
+ return shuffleProps(propositions, n);
69
+ };
70
+ const isAnswerValid = (ans, { a, b, answer }) => {
71
+ try {
72
+ const parsed = parseAlgebraic(ans);
73
+ if (!parsed)
74
+ return false;
75
+ return (parsed
76
+ .simplify({
77
+ forbidFactorize: true,
78
+ forceDistributeFractions: true,
79
+ towardsDistribute: true,
80
+ })
81
+ .toTex() === answer);
82
+ }
83
+ catch (err) {
84
+ return handleVEAError(err);
85
+ }
86
+ };
87
+ export const lnDerivativeThree = {
88
+ id: "lnDerivativeThree",
89
+ connector: "=",
90
+ label: "Dérivée de $\\ln(x) \\times (ax+b)$",
91
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermSpé"],
92
+ sections: ["Dérivation", "Logarithme népérien"],
93
+ isSingleStep: false,
94
+ generator: (nb) => getDistinctQuestions(getLnDerivative, nb),
95
+ qcmTimer: 60,
96
+ freeTimer: 60,
97
+ getPropositions,
98
+ isAnswerValid,
99
+ subject: "Mathématiques",
100
+ getKeys,
101
+ getAnswer,
102
+ getInstruction,
103
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const lnDerivativeTwo: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=lnDerivativeTwo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lnDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/lnDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAWjD,CAAC"}