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,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ affineA: number;
4
+ affineB: number;
5
+ };
6
+ export declare const sqrtCompositionDerivation: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=sqrtCompositionDerivation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqrtCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqFF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
4
+ import { randint } from "../../../../../math/utils/random/randint.js";
5
+ import { SqrtNode } from "../../../../../tree/nodes/functions/sqrtNode.js";
6
+ import { FractionNode } from "../../../../../tree/nodes/operators/fractionNode.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 { affineA, affineB } = identifiers;
12
+ const affine = new Affine(affineA, affineB);
13
+ const fct = new SqrtNode(affine.toTree());
14
+ return `Déterminer la dérivée de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x) = ${fct.toTex()}
18
+ $$`;
19
+ };
20
+ const getAnswer = (identifiers) => {
21
+ const { affineA, affineB } = identifiers;
22
+ const affine = new Affine(affineA, affineB);
23
+ const fct = new SqrtNode(affine.toTree());
24
+ const fraction = new FractionNode(affine.a.toTree(), new MultiplyNode((2).toTree(), fct)).simplify();
25
+ return fraction.toTex();
26
+ };
27
+ const getSqrtCompositionDerivationQuestion = () => {
28
+ const affine = AffineConstructor.random();
29
+ const identifiers = { affineA: affine.a, affineB: affine.b };
30
+ const question = {
31
+ answer: getAnswer(identifiers),
32
+ instruction: getInstruction(identifiers),
33
+ keys: ["x"],
34
+ answerFormat: "tex",
35
+ identifiers,
36
+ };
37
+ return question;
38
+ };
39
+ const getPropositions = (n, { answer, affineA, affineB }) => {
40
+ const propositions = [];
41
+ addValidProp(propositions, answer);
42
+ const affine = new Affine(affineA, affineB);
43
+ const fct = new SqrtNode(affine.toTree());
44
+ tryToAddWrongProp(propositions, new MultiplyNode(affineA.toTree(), fct).toTex());
45
+ tryToAddWrongProp(propositions, new FractionNode(affine.a.toTree(), fct).simplify().toTex());
46
+ tryToAddWrongProp(propositions, new SqrtNode(affineA.toTree()).simplify().toTex());
47
+ while (propositions.length < n) {
48
+ tryToAddWrongProp(propositions, new FractionNode(randint(-10, 10).toTree(), new MultiplyNode((2).toTree(), fct))
49
+ .simplify()
50
+ .toTex());
51
+ }
52
+ return shuffleProps(propositions, n);
53
+ };
54
+ const isAnswerValid = (ans, { answer, affineA, affineB }) => {
55
+ try {
56
+ const parsed = parseAlgebraic(ans);
57
+ const simplified = parsed.simplify();
58
+ return simplified.toTex() === answer;
59
+ }
60
+ catch (err) {
61
+ return handleVEAError(err);
62
+ }
63
+ };
64
+ export const sqrtCompositionDerivation = {
65
+ id: "sqrtCompositionDerivation",
66
+ connector: "=",
67
+ label: "Dérivée de $\\sqrt{ax+b}$",
68
+ isSingleStep: true,
69
+ generator: (nb) => getDistinctQuestions(getSqrtCompositionDerivationQuestion, nb),
70
+ qcmTimer: 60,
71
+ freeTimer: 60,
72
+ getPropositions,
73
+ isAnswerValid,
74
+ subject: "Mathématiques",
75
+ getAnswer,
76
+ getInstruction,
77
+ };
@@ -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 sqrtProductDerivative: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=sqrtProductDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqrtProductDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { addValidProp, shuffleProps, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../../math/utils/random/randint.js";
4
+ import { sqrt } from "../../../../../tree/nodes/functions/sqrtNode.js";
5
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
6
+ import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
7
+ import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
9
+ const getPropositions = (n, { answer }) => {
10
+ const propositions = [];
11
+ addValidProp(propositions, answer);
12
+ while (propositions.length < n) {
13
+ throw Error("QCM not implemented");
14
+ }
15
+ return shuffleProps(propositions, n);
16
+ };
17
+ const getAnswer = (identifiers) => {
18
+ const { a, b } = identifiers;
19
+ //asqrt(x) + (ax+b)/2sqrt(x) = (2ax+ ax+b)/2sqrt(x)
20
+ return frac(add(multiply(3 * a, "x"), b), multiply(2, sqrt("x")))
21
+ .simplify()
22
+ .toTex();
23
+ };
24
+ const getFunction = (identifiers) => {
25
+ const { a, b } = identifiers;
26
+ return multiply(add(multiply(a, "x"), b).simplify({ forbidFactorize: true }), sqrt("x"));
27
+ };
28
+ const getInstruction = (identifiers) => {
29
+ return `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie sur $[0; +\\infty[$ par :
30
+
31
+ $$
32
+ f(x) = ${getFunction(identifiers).toTex()}
33
+ $$`;
34
+ };
35
+ const getHint = (identifiers) => {
36
+ return ``;
37
+ };
38
+ const getCorrection = (identifiers) => {
39
+ return ``;
40
+ };
41
+ const getKeys = (identifiers) => {
42
+ return ["x"];
43
+ };
44
+ const isAnswerValid = (ans, { answer }) => {
45
+ try {
46
+ throw Error("VEA not implemented");
47
+ }
48
+ catch (err) {
49
+ return handleVEAError(err);
50
+ }
51
+ };
52
+ const getSqrtProductDerivativeQuestion = (ops) => {
53
+ const a = randint(-9, 10, [0]);
54
+ const b = randint(-9, 10);
55
+ const identifiers = { a, b };
56
+ return getQuestionFromIdentifiers(identifiers);
57
+ };
58
+ const getQuestionFromIdentifiers = (identifiers) => {
59
+ return {
60
+ answer: getAnswer(identifiers),
61
+ instruction: getInstruction(identifiers),
62
+ keys: getKeys(identifiers),
63
+ answerFormat: "tex",
64
+ identifiers,
65
+ // hint: getHint(identifiers),
66
+ // correction: getCorrection(identifiers)
67
+ };
68
+ };
69
+ export const sqrtProductDerivative = {
70
+ id: "sqrtProductDerivative",
71
+ connector: "=",
72
+ label: "Dérivée de $(ax+b)\\sqrt{x}$",
73
+ isSingleStep: true,
74
+ generator: (nb, opts) => getDistinctQuestions(() => getSqrtProductDerivativeQuestion(opts), nb),
75
+ qcmTimer: 60,
76
+ freeTimer: 60,
77
+ getPropositions,
78
+ isAnswerValid,
79
+ subject: "Mathématiques",
80
+ getInstruction,
81
+ getHint,
82
+ getCorrection,
83
+ getAnswer,
84
+ getQuestionFromIdentifiers,
85
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ affineA: number;
4
+ affineB: number;
5
+ };
6
+ export declare const cosCompositionDerivation: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=cosCompositionDerivation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAmFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
4
+ import { CosNode } from "../../../../../tree/nodes/functions/cosNode.js";
5
+ import { OppositeNode } from "../../../../../tree/nodes/functions/oppositeNode.js";
6
+ import { SinNode } from "../../../../../tree/nodes/functions/sinNode.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 { affineA, affineB } = identifiers;
12
+ const affine = new Affine(affineA, affineB);
13
+ const fct = new CosNode(affine.toTree());
14
+ return `Déterminer la dérivée de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x) = ${fct.toTex()}
18
+ $$`;
19
+ };
20
+ const getAnswer = (identifiers) => {
21
+ const { affineA, affineB } = identifiers;
22
+ const affine = new Affine(affineA, affineB);
23
+ const deriv = new MultiplyNode((-affine.a).toTree(), new SinNode(affine.toTree()));
24
+ return deriv.toTex();
25
+ };
26
+ const getCosCompositionDerivationQuestion = () => {
27
+ const affine = AffineConstructor.random(undefined, { excludes: [0] });
28
+ const identifiers = { affineA: affine.a, affineB: affine.b };
29
+ const question = {
30
+ answer: getAnswer(identifiers),
31
+ instruction: getInstruction(identifiers),
32
+ keys: ["x", "sin", "cos", "tan"],
33
+ answerFormat: "tex",
34
+ identifiers,
35
+ };
36
+ return question;
37
+ };
38
+ const getPropositions = (n, { answer, affineA, affineB }) => {
39
+ const propositions = [];
40
+ addValidProp(propositions, answer);
41
+ const affine = new Affine(affineA, affineB);
42
+ const affineTree = affine.toTree();
43
+ const fct = new CosNode(affineTree);
44
+ const sin = new SinNode(affineTree);
45
+ tryToAddWrongProp(propositions, new MultiplyNode(affineA.toTree(), sin).toTex());
46
+ tryToAddWrongProp(propositions, new MultiplyNode(affineA.toTree(), fct).toTex());
47
+ tryToAddWrongProp(propositions, new MultiplyNode((-affineA).toTree(), fct).toTex());
48
+ tryToAddWrongProp(propositions, sin.toTex());
49
+ tryToAddWrongProp(propositions, new OppositeNode(sin).toTex());
50
+ return shuffleProps(propositions, n);
51
+ };
52
+ const isAnswerValid = (ans, { answer, affineA, affineB }) => {
53
+ try {
54
+ const parsed = parseAlgebraic(ans);
55
+ if (!parsed)
56
+ return false;
57
+ return (parsed
58
+ .simplify({
59
+ towardsDistribute: true,
60
+ forbidFactorize: true,
61
+ })
62
+ .toTex() === answer);
63
+ }
64
+ catch (err) {
65
+ return handleVEAError(err);
66
+ }
67
+ };
68
+ export const cosCompositionDerivation = {
69
+ id: "cosCompositionDerivation",
70
+ connector: "=",
71
+ label: "Dérivée de $\\cos(ax+b)$",
72
+ isSingleStep: true,
73
+ generator: (nb) => getDistinctQuestions(getCosCompositionDerivationQuestion, nb),
74
+ qcmTimer: 60,
75
+ freeTimer: 60,
76
+ getPropositions,
77
+ isAnswerValid,
78
+ subject: "Mathématiques",
79
+ getAnswer,
80
+ getInstruction,
81
+ };
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ affinecoeffs: number[];
4
+ };
5
+ export declare const cosSecondDegreeDerivative: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=cosSecondDegreeDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosSecondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA+HF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { AffineConstructor } from "../../../../../math/polynomials/affine.js";
4
+ import { CosNode } from "../../../../../tree/nodes/functions/cosNode.js";
5
+ import { SinNode } from "../../../../../tree/nodes/functions/sinNode.js";
6
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
7
+ import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
8
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
9
+ import { PowerNode } from "../../../../../tree/nodes/operators/powerNode.js";
10
+ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
11
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
12
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
13
+ const getInstruction = (identifiers) => {
14
+ const { affinecoeffs } = identifiers;
15
+ const affine = AffineConstructor.fromCoeffs(affinecoeffs);
16
+ const func = new CosNode(affine.toTree().simplify({ forbidFactorize: true })).toTex();
17
+ return `Calculez la dérivée seconde de la fonction $f$ définie par :
18
+
19
+ $$
20
+ f(x) = ${func}
21
+ $$`;
22
+ };
23
+ const getAnswer = (identifiers) => {
24
+ const { affinecoeffs } = identifiers;
25
+ const affine = AffineConstructor.fromCoeffs(affinecoeffs);
26
+ const ans = new MultiplyNode(new MultiplyNode(new PowerNode(affinecoeffs[1].toTree(), new NumberNode(2)), new NumberNode(-1)), new CosNode(affine.toTree().simplify({ forbidFactorize: true })))
27
+ .simplify({ forbidFactorize: true })
28
+ .toTex();
29
+ return ans;
30
+ };
31
+ const getCosSecondDegreeDerivativeQuestion = () => {
32
+ const affine = AffineConstructor.random();
33
+ const affinecoeffs = affine.coefficients;
34
+ const identifiers = { affinecoeffs };
35
+ const question = {
36
+ answer: getAnswer(identifiers),
37
+ instruction: getInstruction(identifiers),
38
+ keys: ["x", "sin", "cos", "tan"],
39
+ answerFormat: "tex",
40
+ identifiers,
41
+ };
42
+ return question;
43
+ };
44
+ const getPropositions = (n, { answer, affinecoeffs }) => {
45
+ const propositions = [];
46
+ addValidProp(propositions, answer);
47
+ const affine = new AddNode(new MultiplyNode(new NumberNode(affinecoeffs[1]), new VariableNode("x")), new NumberNode(affinecoeffs[0])).simplify({ forbidFactorize: true });
48
+ const wronganswer1 = new MultiplyNode(new PowerNode(affinecoeffs[1].toTree(), new NumberNode(2)), new CosNode(affine))
49
+ .simplify()
50
+ .toTex();
51
+ const wronganswer2 = new MultiplyNode(new MultiplyNode(new PowerNode(affinecoeffs[1].toTree(), new NumberNode(2)), new NumberNode(-1)), new SinNode(affine))
52
+ .simplify()
53
+ .toTex();
54
+ const wronganswer3 = new MultiplyNode(affinecoeffs[1].toTree(), new SinNode(affine))
55
+ .simplify()
56
+ .toTex();
57
+ const wronganswer4 = new MultiplyNode(affinecoeffs[1].toTree(), new CosNode(affine))
58
+ .simplify()
59
+ .toTex();
60
+ const wronganswer5 = affine.toTex();
61
+ tryToAddWrongProp(propositions, wronganswer1);
62
+ tryToAddWrongProp(propositions, wronganswer2);
63
+ tryToAddWrongProp(propositions, wronganswer3);
64
+ tryToAddWrongProp(propositions, wronganswer4);
65
+ tryToAddWrongProp(propositions, wronganswer5);
66
+ while (propositions.length < n) {
67
+ const random = AffineConstructor.random();
68
+ const randomwronganswer = new MultiplyNode(random.a.toTree(), new SinNode(random.toTree().simplify({ forbidFactorize: true })))
69
+ .simplify()
70
+ .toTex();
71
+ tryToAddWrongProp(propositions, randomwronganswer);
72
+ }
73
+ return shuffleProps(propositions, n);
74
+ };
75
+ const isAnswerValid = (ans, { answer, affinecoeffs }) => {
76
+ try {
77
+ const parsed = parseAlgebraic(ans);
78
+ if (!parsed)
79
+ return false;
80
+ return (parsed
81
+ .simplify({
82
+ towardsDistribute: true,
83
+ forbidFactorize: true,
84
+ })
85
+ .toTex() === answer);
86
+ }
87
+ catch (err) {
88
+ return handleVEAError(err);
89
+ }
90
+ };
91
+ export const cosSecondDegreeDerivative = {
92
+ id: "cosSecondDegreeDerivative",
93
+ label: "Dérivée seconde de $\\cos(u)$",
94
+ isSingleStep: true,
95
+ generator: (nb) => getDistinctQuestions(getCosSecondDegreeDerivativeQuestion, nb),
96
+ qcmTimer: 60,
97
+ freeTimer: 60,
98
+ getPropositions,
99
+ isAnswerValid,
100
+ subject: "Mathématiques",
101
+ getAnswer,
102
+ getInstruction,
103
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./cosCompositionDerivation.js";
2
+ export * from "./sinCompositionDerivation.js";
3
+ export * from "./sinSecondDegreeDerivative.js";
4
+ export * from "./cosSecondDegreeDerivative.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./cosCompositionDerivation.js";
2
+ export * from "./sinCompositionDerivation.js";
3
+ export * from "./sinSecondDegreeDerivative.js";
4
+ export * from "./cosSecondDegreeDerivative.js";
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ affineA: number;
4
+ affineB: number;
5
+ };
6
+ export declare const sinCompositionDerivation: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=sinCompositionDerivation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sinCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
4
+ import { CosNode } from "../../../../../tree/nodes/functions/cosNode.js";
5
+ import { OppositeNode } from "../../../../../tree/nodes/functions/oppositeNode.js";
6
+ import { SinNode } from "../../../../../tree/nodes/functions/sinNode.js";
7
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ const getInstruction = (identifiers) => {
9
+ const { affineA, affineB } = identifiers;
10
+ const affine = new Affine(affineA, affineB);
11
+ const fct = new SinNode(affine.toTree());
12
+ return `Déterminer la dérivée de la fonction $f$ définie sur $\\mathbb{R}$ par :
13
+
14
+ $$
15
+ f(x) = ${fct.toTex()}
16
+ $$`;
17
+ };
18
+ const getAnswer = (identifiers) => {
19
+ const { affineA, affineB } = identifiers;
20
+ const affine = new Affine(affineA, affineB);
21
+ const deriv = new MultiplyNode(affine.a.toTree(), new CosNode(affine.toTree()));
22
+ return deriv.toTex();
23
+ };
24
+ const getSinCompositionDerivationQuestion = () => {
25
+ const affine = AffineConstructor.random(undefined, { excludes: [0] });
26
+ const identifiers = { affineA: affine.a, affineB: affine.b };
27
+ const question = {
28
+ answer: getAnswer(identifiers),
29
+ instruction: getInstruction(identifiers),
30
+ keys: ["x", "sin", "cos", "tan"],
31
+ answerFormat: "tex",
32
+ identifiers,
33
+ };
34
+ return question;
35
+ };
36
+ const getPropositions = (n, { answer, affineA, affineB }) => {
37
+ const propositions = [];
38
+ addValidProp(propositions, answer);
39
+ const affine = new Affine(affineA, affineB);
40
+ const affineTree = affine.toTree();
41
+ const sin = new SinNode(affineTree);
42
+ const cos = new CosNode(affineTree);
43
+ tryToAddWrongProp(propositions, new MultiplyNode(affineA.toTree(), sin).toTex());
44
+ tryToAddWrongProp(propositions, cos.toTex());
45
+ tryToAddWrongProp(propositions, new MultiplyNode((-affineA).toTree(), cos).toTex());
46
+ tryToAddWrongProp(propositions, new OppositeNode(cos).toTex());
47
+ tryToAddWrongProp(propositions, new SinNode(affineA.toTree()).simplify().toTex());
48
+ tryToAddWrongProp(propositions, new CosNode(affineA.toTree()).simplify().toTex());
49
+ return shuffleProps(propositions, n);
50
+ };
51
+ const isAnswerValid = (ans, { answer, affineA, affineB }) => {
52
+ const affine = new Affine(affineA, affineB);
53
+ const deriv = new MultiplyNode(affineA.toTree(), new CosNode(affine.toTree()));
54
+ const texs = deriv.toAllValidTexs();
55
+ return texs.includes(ans);
56
+ };
57
+ export const sinCompositionDerivation = {
58
+ id: "sinCompositionDerivation",
59
+ connector: "=",
60
+ label: "Dérivée de $\\sin(ax+b)$",
61
+ isSingleStep: true,
62
+ generator: (nb) => getDistinctQuestions(getSinCompositionDerivationQuestion, nb),
63
+ qcmTimer: 60,
64
+ freeTimer: 60,
65
+ getPropositions,
66
+ isAnswerValid,
67
+ subject: "Mathématiques",
68
+ getInstruction,
69
+ getAnswer,
70
+ };
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ affinecoeffs: number[];
4
+ };
5
+ export declare const sinSecondDegreeDerivative: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=sinSecondDegreeDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sinSecondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAkIF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { AffineConstructor } from "../../../../../math/polynomials/affine.js";
4
+ import { CosNode } from "../../../../../tree/nodes/functions/cosNode.js";
5
+ import { SinNode } from "../../../../../tree/nodes/functions/sinNode.js";
6
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
7
+ import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
8
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
9
+ import { PowerNode } from "../../../../../tree/nodes/operators/powerNode.js";
10
+ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
11
+ const getAnswer = (identifiers) => {
12
+ const { affinecoeffs } = identifiers;
13
+ const affine = AffineConstructor.fromCoeffs(affinecoeffs);
14
+ const ans = new MultiplyNode(new MultiplyNode(new PowerNode(affinecoeffs[1].toTree(), new NumberNode(2)), new NumberNode(-1)), new SinNode(affine.toTree().simplify({ forbidFactorize: true })))
15
+ .simplify()
16
+ .toTex();
17
+ return ans;
18
+ };
19
+ const getInstruction = (identifiers) => {
20
+ const { affinecoeffs } = identifiers;
21
+ const affine = AffineConstructor.fromCoeffs(affinecoeffs);
22
+ const func = new SinNode(affine.toTree().simplify({ forbidFactorize: true })).toTex();
23
+ return `Calculez la dérivée seconde de la fonction $f$ définie sur $\\mathbb{R}$ par :
24
+
25
+ $$
26
+ f(x) = ${func}
27
+ $$`;
28
+ };
29
+ const getSinSecondDegreeDerivativeQuestion = () => {
30
+ const affine = AffineConstructor.random();
31
+ const affinecoeffs = affine.coefficients;
32
+ const identifiers = { affinecoeffs };
33
+ const question = {
34
+ answer: getAnswer(identifiers),
35
+ instruction: getInstruction(identifiers),
36
+ keys: ["x", "sin", "cos", "tan"],
37
+ answerFormat: "tex",
38
+ identifiers,
39
+ };
40
+ return question;
41
+ };
42
+ const getPropositions = (n, { answer, affinecoeffs }) => {
43
+ const propositions = [];
44
+ addValidProp(propositions, answer);
45
+ const affine = new AddNode(new MultiplyNode(new NumberNode(affinecoeffs[1]), new VariableNode("x")), new NumberNode(affinecoeffs[0])).simplify({ forbidFactorize: true });
46
+ const wronganswer1 = new MultiplyNode(new PowerNode(affinecoeffs[1].toTree(), new NumberNode(2)), new SinNode(affine))
47
+ .simplify()
48
+ .toTex();
49
+ const wronganswer2 = new MultiplyNode(new MultiplyNode(new PowerNode(affinecoeffs[1].toTree(), new NumberNode(2)), new NumberNode(-1)), new CosNode(affine))
50
+ .simplify()
51
+ .toTex();
52
+ const wronganswer3 = new MultiplyNode(affinecoeffs[1].toTree(), new CosNode(affine))
53
+ .simplify()
54
+ .toTex();
55
+ const wronganswer4 = new MultiplyNode(affinecoeffs[1].toTree(), new SinNode(affine))
56
+ .simplify()
57
+ .toTex();
58
+ const wronganswer5 = affine.toTex();
59
+ tryToAddWrongProp(propositions, wronganswer1);
60
+ tryToAddWrongProp(propositions, wronganswer2);
61
+ tryToAddWrongProp(propositions, wronganswer3);
62
+ tryToAddWrongProp(propositions, wronganswer4);
63
+ tryToAddWrongProp(propositions, wronganswer5);
64
+ while (propositions.length < n) {
65
+ const random = AffineConstructor.random();
66
+ const randomwronganswer = new MultiplyNode(random.a.toTree(), new CosNode(random.toTree().simplify({ forbidFactorize: true })))
67
+ .simplify()
68
+ .toTex();
69
+ tryToAddWrongProp(propositions, randomwronganswer);
70
+ }
71
+ return shuffleProps(propositions, n);
72
+ };
73
+ const isAnswerValid = (ans, { answer, affinecoeffs }) => {
74
+ const affine = new AddNode(new MultiplyNode(new NumberNode(affinecoeffs[1]), new VariableNode("x")), new NumberNode(affinecoeffs[0])).simplify({ forbidFactorize: true });
75
+ const validanswer = new MultiplyNode(new MultiplyNode(new PowerNode(new NumberNode(affinecoeffs[1]), new NumberNode(2)), new NumberNode(-1)), new SinNode(affine)).simplify();
76
+ const latexs = validanswer.toAllValidTexs();
77
+ return latexs.includes(ans);
78
+ };
79
+ export const sinSecondDegreeDerivative = {
80
+ id: "sinSecondDegreeDerivative",
81
+ label: "Dérivée seconde de $\\sin(u)$",
82
+ isSingleStep: true,
83
+ generator: (nb) => getDistinctQuestions(getSinSecondDegreeDerivativeQuestion, nb),
84
+ qcmTimer: 60,
85
+ freeTimer: 60,
86
+ getPropositions,
87
+ isAnswerValid,
88
+ subject: "Mathématiques",
89
+ getAnswer,
90
+ getInstruction,
91
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"derivativeNumberCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/derivativeNumberCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"derivativeNumberCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/derivativeNumberCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8DF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
@@ -24,6 +24,9 @@ const getDerivativeNumberCalculQuestion = () => {
24
24
  const x = randint(-9, 10);
25
25
  const trinom = PolynomialConstructor.randomWithOrder(2);
26
26
  const identifiers = { x, coeffs: trinom.coefficients };
27
+ return getQuestionFromIdentifiers(identifiers);
28
+ };
29
+ const getQuestionFromIdentifiers = (identifiers) => {
27
30
  const question = {
28
31
  answer: getAnswer(identifiers),
29
32
  instruction: getInstruction(identifiers),
@@ -61,6 +64,5 @@ export const derivativeNumberCalcul = {
61
64
  getPropositions,
62
65
  isAnswerValid,
63
66
  subject: "Mathématiques",
64
- getInstruction,
65
- getAnswer,
67
+ getQuestionFromIdentifiers,
66
68
  };
@@ -1,4 +1,6 @@
1
1
  export * from "./derivative/index.js";
2
2
  export * from "./derivativeNumberCalcul.js";
3
3
  export * from "./tangent/index.js";
4
+ export * from "./variations/index.js";
5
+ export * from "./convexity/index.js";
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
@@ -1,3 +1,5 @@
1
1
  export * from "./derivative/index.js";
2
2
  export * from "./derivativeNumberCalcul.js";
3
3
  export * from "./tangent/index.js";
4
+ export * from "./variations/index.js";
5
+ export * from "./convexity/index.js";