math-exercises 3.0.57 → 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 (196) 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/multiplicationEquation.d.ts.map +1 -1
  5. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -4
  6. package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts +16 -0
  7. package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -0
  8. package/lib/exercises/math/calculLitteral/factorisation/facto1.js +184 -0
  9. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -1
  10. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  11. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
  12. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts +8 -0
  13. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -0
  14. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +102 -0
  15. package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts +7 -0
  16. package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -0
  17. package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +52 -0
  18. package/lib/exercises/math/derivation/convexity/index.d.ts +4 -0
  19. package/lib/exercises/math/derivation/convexity/index.d.ts.map +1 -0
  20. package/lib/exercises/math/derivation/convexity/index.js +3 -0
  21. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts +7 -0
  22. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -0
  23. package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +134 -0
  24. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts +8 -0
  25. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -0
  26. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +79 -0
  27. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts +8 -0
  28. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -0
  29. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +85 -0
  30. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts +8 -0
  31. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -0
  32. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +86 -0
  33. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts +8 -0
  34. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -0
  35. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +76 -0
  36. package/lib/exercises/math/derivation/derivative/exp/index.d.ts +6 -0
  37. package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -0
  38. package/lib/exercises/math/derivation/derivative/exp/index.js +5 -0
  39. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts +7 -0
  40. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -0
  41. package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +84 -0
  42. package/lib/exercises/math/derivation/derivative/index.d.ts +6 -27
  43. package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
  44. package/lib/exercises/math/derivation/derivative/index.js +6 -27
  45. package/lib/exercises/math/derivation/derivative/ln/index.d.ts +4 -0
  46. package/lib/exercises/math/derivation/derivative/ln/index.d.ts.map +1 -0
  47. package/lib/exercises/math/derivation/derivative/ln/index.js +3 -0
  48. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts +8 -0
  49. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -0
  50. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +81 -0
  51. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts +8 -0
  52. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -0
  53. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +103 -0
  54. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts +8 -0
  55. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -0
  56. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +77 -0
  57. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +10 -0
  58. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -0
  59. package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +71 -0
  60. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +11 -0
  61. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -0
  62. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +88 -0
  63. package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts +8 -0
  64. package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts.map +1 -0
  65. package/lib/exercises/math/derivation/derivative/polynomial/index.js +7 -0
  66. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +10 -0
  67. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -0
  68. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +115 -0
  69. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts +10 -0
  70. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -0
  71. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +80 -0
  72. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts +9 -0
  73. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -0
  74. package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +67 -0
  75. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +10 -0
  76. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -0
  77. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +134 -0
  78. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts +11 -0
  79. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -0
  80. package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +97 -0
  81. package/lib/exercises/math/derivation/derivative/power/index.d.ts +3 -0
  82. package/lib/exercises/math/derivation/derivative/power/index.d.ts.map +1 -0
  83. package/lib/exercises/math/derivation/derivative/power/index.js +2 -0
  84. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts +9 -0
  85. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -0
  86. package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +122 -0
  87. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts +8 -0
  88. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -0
  89. package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +118 -0
  90. package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts +3 -0
  91. package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts.map +1 -0
  92. package/lib/exercises/math/derivation/derivative/sqrt/index.js +3 -0
  93. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts +7 -0
  94. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -0
  95. package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +115 -0
  96. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts +8 -0
  97. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -0
  98. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +77 -0
  99. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts +8 -0
  100. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -0
  101. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +85 -0
  102. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts +8 -0
  103. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -0
  104. package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +81 -0
  105. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts +7 -0
  106. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -0
  107. package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +103 -0
  108. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +5 -0
  109. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -0
  110. package/lib/exercises/math/derivation/derivative/trigo/index.js +4 -0
  111. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts +8 -0
  112. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -0
  113. package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +70 -0
  114. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts +7 -0
  115. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -0
  116. package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +91 -0
  117. package/lib/exercises/math/derivation/derivativeNumberCalcul.d.ts.map +1 -1
  118. package/lib/exercises/math/derivation/derivativeNumberCalcul.js +4 -2
  119. package/lib/exercises/math/derivation/index.d.ts +2 -0
  120. package/lib/exercises/math/derivation/index.d.ts.map +1 -1
  121. package/lib/exercises/math/derivation/index.js +2 -0
  122. package/lib/exercises/math/derivation/variations/index.d.ts +2 -0
  123. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -0
  124. package/lib/exercises/math/derivation/variations/index.js +1 -0
  125. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts +11 -0
  126. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -0
  127. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +168 -0
  128. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
  129. package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +39 -22
  130. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
  131. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +7 -1
  132. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  133. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +38 -15
  134. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
  135. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +29 -8
  136. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts +8 -0
  137. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -0
  138. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +86 -0
  139. package/lib/exercises/math/equaDiff/index.d.ts +1 -1
  140. package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
  141. package/lib/exercises/math/equaDiff/index.js +1 -1
  142. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  143. package/lib/exercises/math/functions/exponential/expEquation.js +3 -0
  144. package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
  145. package/lib/exercises/math/functions/exponential/expFactorization.js +3 -0
  146. package/lib/exercises/math/functions/exponential/expSimplifiying.d.ts.map +1 -1
  147. package/lib/exercises/math/functions/exponential/expSimplifiying.js +83 -45
  148. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts +2 -0
  149. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts.map +1 -0
  150. package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.js +63 -0
  151. package/lib/exercises/math/primitive/klogUPrimitive.js +1 -1
  152. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  153. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
  154. package/lib/exercises/math/probaStat/stats1var/averageList.js +4 -4
  155. package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
  156. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +42 -11
  157. package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -1
  158. package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +8 -20
  159. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
  160. package/lib/exercises/math/probaStat/stats1var/etendueList.js +4 -6
  161. package/lib/exercises/math/probaStat/stats1var/interquartilesList.d.ts.map +1 -1
  162. package/lib/exercises/math/probaStat/stats1var/interquartilesList.js +4 -4
  163. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
  164. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +4 -4
  165. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  166. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -9
  167. package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
  168. package/lib/exercises/math/probaStat/stats1var/median.js +19 -14
  169. package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
  170. package/lib/exercises/math/probaStat/stats1var/medianList.js +3 -0
  171. package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
  172. package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -11
  173. package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
  174. package/lib/exercises/math/probaStat/stats1var/quartilesList.js +18 -14
  175. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.d.ts.map +1 -1
  176. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +4 -4
  177. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
  178. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +4 -4
  179. package/lib/exercises/math/probaStat/stats1var/varianceList.d.ts.map +1 -1
  180. package/lib/exercises/math/probaStat/stats1var/varianceList.js +4 -4
  181. package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
  182. package/lib/exercises/math/probaStat/stats1var/varianceTable.js +4 -4
  183. package/lib/exercises/pc/index.d.ts +5 -5
  184. package/lib/exercises/pc/index.d.ts.map +1 -1
  185. package/lib/exercises/pc/index.js +5 -5
  186. package/lib/index.d.ts +42 -41
  187. package/lib/index.d.ts.map +1 -1
  188. package/lib/playground.d.ts.map +1 -1
  189. package/lib/playground.js +6 -1
  190. package/lib/tree/nodes/functions/logNode.js +2 -4
  191. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  192. package/lib/tree/nodes/operators/fractionNode.js +4 -0
  193. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  194. package/lib/tree/nodes/operators/multiplyNode.js +4 -3
  195. package/lib/tree/parsers/latexParser.js +6 -2
  196. package/package.json +1 -1
@@ -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"}
@@ -0,0 +1,77 @@
1
+ import { addValidProp, 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";
5
+ import { LogNode } from "../../../../../tree/nodes/functions/logNode.js";
6
+ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
7
+ import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
8
+ import { FractionNode } from "../../../../../tree/nodes/operators/fractionNode.js";
9
+ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
10
+ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
11
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
12
+ import { shuffle } from "../../../../../utils/alea/shuffle.js";
13
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
14
+ const getInstruction = (identifiers) => {
15
+ const { a, b } = identifiers;
16
+ const myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new LogNode(new VariableNode("x"))), new NumberNode(b));
17
+ return `Déterminer la dérivée de la fonction $f$ définie par :
18
+
19
+ $$
20
+ f(x) = ${myfunction.toTex()}
21
+ $$`;
22
+ };
23
+ const getAnswer = (identifiers) => {
24
+ const { a, b } = identifiers;
25
+ const derivative = new FractionNode(new NumberNode(a), new VariableNode("x"));
26
+ const answer = derivative.toTex();
27
+ return answer;
28
+ };
29
+ const getLnDerivative = () => {
30
+ const a = randint(-9, 10, [0]);
31
+ const b = randint(-9, 10, [0]);
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
+ tryToAddWrongProp(propositions, new AddNode(new FractionNode(new NumberNode(a), new VariableNode("x")), new NumberNode(b)).toTex());
47
+ tryToAddWrongProp(propositions, a + "");
48
+ tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))).toTex());
49
+ while (propositions.length < n) {
50
+ const randomA = randint(-9, 10, [0]);
51
+ tryToAddWrongProp(propositions, new FractionNode(new NumberNode(randomA), new VariableNode("x")).toTex());
52
+ }
53
+ return shuffle(propositions);
54
+ };
55
+ const isAnswerValid = (ans, { answer, a }) => {
56
+ try {
57
+ const parsed = parseAlgebraic(ans);
58
+ if (!parsed)
59
+ return false;
60
+ return parsed.simplify().toTex() === answer;
61
+ }
62
+ catch (err) {
63
+ return handleVEAError(err);
64
+ }
65
+ };
66
+ export const lnDerivativeTwo = {
67
+ id: "lnDerivativeTwo",
68
+ connector: "=",
69
+ label: "Dérivée de $a \\times \\ln(x) + b$",
70
+ isSingleStep: false,
71
+ generator: (nb) => getDistinctQuestions(getLnDerivative, nb),
72
+ getPropositions,
73
+ isAnswerValid,
74
+ qcmTimer: 60,
75
+ freeTimer: 60,
76
+ subject: "Mathématiques",
77
+ };
@@ -0,0 +1,10 @@
1
+ import { Exercise, QCMGenerator, QuestionGenerator, VEA } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ tex: string;
4
+ };
5
+ export declare const getConstanteDerivative: QuestionGenerator<Identifiers>;
6
+ export declare const getConstanteDerivativePropositions: QCMGenerator<Identifiers>;
7
+ export declare const isConstanteDerivativeAnswerValid: VEA<Identifiers>;
8
+ export declare const constanteDerivative: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=constanteDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constanteDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/polynomial/constanteDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAmBF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,WAAW,CAgBjE,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,YAAY,CAAC,WAAW,CAmBxE,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,GAAG,CAAC,WAAW,CAE7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { NombreConstructor } from "../../../../../math/numbers/nombre.js";
4
+ import { randint } from "../../../../../math/utils/random/randint.js";
5
+ const getHint = ({ tex }) => {
6
+ return `$f$ est une fonction constante égale à $${tex}$`;
7
+ };
8
+ const getCorrection = ({ tex }) => {
9
+ return `La fonction $f$ est une fonction constante égale à $${tex}$. Or, la fonction dérivée d'une fonction constante est nulle. Ainsi, pour tout $x\\in \\mathbb{R}$, $f'(x) = 0$.`;
10
+ };
11
+ const getAnswer = () => "0";
12
+ const getInstruction = (identifiers) => {
13
+ const tex = identifiers.tex;
14
+ return `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par :
15
+
16
+ $$
17
+ f(x) = ${tex}
18
+ $$`;
19
+ };
20
+ export const getConstanteDerivative = () => {
21
+ const c = NombreConstructor.random();
22
+ const tex = c.toTree().toTex();
23
+ const identifiers = { tex };
24
+ const question = {
25
+ instruction: getInstruction(identifiers),
26
+ startStatement: `f'(x)`,
27
+ answer: getAnswer(identifiers),
28
+ keys: ["x"],
29
+ answerFormat: "tex",
30
+ identifiers,
31
+ hint: getHint({ tex }),
32
+ correction: getCorrection({ tex }),
33
+ };
34
+ return question;
35
+ };
36
+ export const getConstanteDerivativePropositions = (n, { answer, tex }) => {
37
+ const propositions = [];
38
+ addValidProp(propositions, answer);
39
+ tryToAddWrongProp(propositions, tex);
40
+ tryToAddWrongProp(propositions, "1");
41
+ const opposite = tex[0] === "-" ? tex.slice(1) : "-" + tex;
42
+ tryToAddWrongProp(propositions, `${opposite}`);
43
+ tryToAddWrongProp(propositions, "x");
44
+ while (propositions.length < n) {
45
+ const wrongAnswer = randint(-9, 10);
46
+ tryToAddWrongProp(propositions, wrongAnswer + "");
47
+ }
48
+ return shuffleProps(propositions, n);
49
+ };
50
+ export const isConstanteDerivativeAnswerValid = (ans, {}) => {
51
+ return ans === "0";
52
+ };
53
+ export const constanteDerivative = {
54
+ id: "constanteDerivative",
55
+ connector: "=",
56
+ label: "Dérivée d'une constante",
57
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "1rePro"],
58
+ sections: ["Dérivation"],
59
+ isSingleStep: false,
60
+ generator: (nb) => getDistinctQuestions(getConstanteDerivative, nb),
61
+ qcmTimer: 60,
62
+ freeTimer: 60,
63
+ getPropositions: getConstanteDerivativePropositions,
64
+ isAnswerValid: isConstanteDerivativeAnswerValid,
65
+ subject: "Mathématiques",
66
+ getHint,
67
+ getCorrection,
68
+ hasHintAndCorrection: true,
69
+ getAnswer,
70
+ getInstruction,
71
+ };
@@ -0,0 +1,11 @@
1
+ import { Exercise, QCMGenerator, QuestionGenerator, VEA } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const getFirstDegreeDerivative: QuestionGenerator<Identifiers>;
7
+ export declare const getFirstDegreeDerivativePropositions: QCMGenerator<Identifiers>;
8
+ export declare const isFirstDegreeDerivativeAnswerValid: VEA<Identifiers>;
9
+ export declare const firstDegreeDerivative: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=firstDegreeDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firstDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6CF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAenE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAkB1E,CAAC;AACF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,CAK/D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
@@ -0,0 +1,88 @@
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 { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
6
+ import { power } from "../../../../../tree/nodes/operators/powerNode.js";
7
+ const getAnswer = (identifiers) => {
8
+ const { a, b } = identifiers;
9
+ return a + "";
10
+ };
11
+ const getHint = (identifiers) => {
12
+ return `Dérive chacun des termes de la somme, puis additionne les dérivées obtenues.
13
+
14
+ On rappelle que la dérivée de la fonction $kx$ est $k$.`;
15
+ };
16
+ const getCorrection = (identifiers) => {
17
+ const { a, b } = identifiers;
18
+ const monoms = [b, a]
19
+ .map((c, i) => multiply(c, power("x", i)).simplify())
20
+ .filter((n) => n.evaluate() !== 0);
21
+ const answer = getAnswer(identifiers);
22
+ return `On dérive chacun des termes de la somme :
23
+
24
+ ${monoms
25
+ .reverse()
26
+ .map((n) => `- $${n.toTex()} \\to ${n.derivative().simplify().toTex()}$`)
27
+ .join(" \n ")}
28
+
29
+ Puis, on additionne ces résultats pour obtenir la dérivée de la fonction $f$ :
30
+
31
+ $$
32
+ f'(x) = ${answer}
33
+ $$`;
34
+ };
35
+ const getInstruction = (identifiers) => {
36
+ const { a, b } = identifiers;
37
+ const polynomial = new Polynomial([b, a]);
38
+ return `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par :
39
+
40
+ $$
41
+ f(x) = ${polynomial.toTex()}
42
+ $$`;
43
+ };
44
+ export const getFirstDegreeDerivative = () => {
45
+ const [a, b] = [randint(-9, 10, [0]), randint(-9, 10)];
46
+ const identifiers = { a, b };
47
+ const question = {
48
+ instruction: getInstruction(identifiers),
49
+ startStatement: `f'(x)`,
50
+ answer: getAnswer(identifiers),
51
+ keys: ["x"],
52
+ answerFormat: "tex",
53
+ identifiers,
54
+ hint: getHint(identifiers),
55
+ correction: getCorrection(identifiers),
56
+ };
57
+ return question;
58
+ };
59
+ export const getFirstDegreeDerivativePropositions = (n, { answer, a, b }) => {
60
+ const propositions = [];
61
+ addValidProp(propositions, answer);
62
+ tryToAddWrongProp(propositions, new Polynomial([0, a]).toTree().toTex());
63
+ tryToAddWrongProp(propositions, "x");
64
+ tryToAddWrongProp(propositions, b + "");
65
+ while (propositions.length < n) {
66
+ const wrongAnswer = randint(-9, 10);
67
+ tryToAddWrongProp(propositions, wrongAnswer + "");
68
+ }
69
+ return shuffleProps(propositions, n);
70
+ };
71
+ export const isFirstDegreeDerivativeAnswerValid = (ans, { answer }) => {
72
+ return ans === answer;
73
+ };
74
+ export const firstDegreeDerivative = {
75
+ id: "firstDegreeDerivative",
76
+ connector: "=",
77
+ label: "Dérivée d'une fonction affine",
78
+ isSingleStep: false,
79
+ generator: (nb) => getDistinctQuestions(getFirstDegreeDerivative, nb),
80
+ qcmTimer: 60,
81
+ freeTimer: 60,
82
+ getPropositions: getFirstDegreeDerivativePropositions,
83
+ isAnswerValid: isFirstDegreeDerivativeAnswerValid,
84
+ subject: "Mathématiques",
85
+ hasHintAndCorrection: true,
86
+ getHint,
87
+ getCorrection,
88
+ };
@@ -0,0 +1,8 @@
1
+ export { secondDegreeDerivative } from "./secondDegreeDerivative.js";
2
+ export { thirdDegreeDerivative } from "./thirdDegreeDerivative.js";
3
+ export { constanteDerivative } from "./constanteDerivative.js";
4
+ export { firstDegreeDerivative } from "./firstDegreeDerivative.js";
5
+ export * from "./usualderivative.js";
6
+ export * from "./secondDerivativeOfTrinom.js";
7
+ export * from "./secondDerivativeOfThirdDegreeFunction.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/polynomial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { secondDegreeDerivative } from "./secondDegreeDerivative.js";
2
+ export { thirdDegreeDerivative } from "./thirdDegreeDerivative.js";
3
+ export { constanteDerivative } from "./constanteDerivative.js";
4
+ export { firstDegreeDerivative } from "./firstDegreeDerivative.js";
5
+ export * from "./usualderivative.js";
6
+ export * from "./secondDerivativeOfTrinom.js";
7
+ export * from "./secondDerivativeOfThirdDegreeFunction.js";
@@ -0,0 +1,10 @@
1
+ import { Exercise, QCMGenerator, QuestionGenerator, VEA } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ coefficients: number[];
4
+ };
5
+ export declare const getSecondDegreeDerivative: QuestionGenerator<Identifiers>;
6
+ export declare const getSecondDegreeDerivativePropositions: QCMGenerator<Identifiers>;
7
+ export declare const isSecondDegreeDerivativeAnswerValid: VEA<Identifiers>;
8
+ export declare const secondDegreeDerivative: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=secondDegreeDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA8CF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAgBpE,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,YAAY,CAC9D,WAAW,CA+BZ,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,GAAG,CAAC,WAAW,CAehE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}