math-exercises 3.0.157 → 3.0.158

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/lib/exercises/exercise.d.ts +7 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts +14 -0
  4. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts.map +1 -0
  5. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.js +145 -0
  6. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts +16 -0
  7. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts.map +1 -0
  8. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +444 -0
  9. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts +15 -0
  10. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -0
  11. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +292 -0
  12. package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts +4 -0
  13. package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts.map +1 -0
  14. package/lib/exercises/math/calculLitteral/equation/exp/index.js +3 -0
  15. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts +18 -0
  16. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -0
  17. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +437 -0
  18. package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts +2 -0
  19. package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts.map +1 -0
  20. package/lib/exercises/math/calculLitteral/inequations/exp/index.js +1 -0
  21. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
  22. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +29 -0
  23. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
  24. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +35 -2
  25. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
  26. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +19 -0
  27. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts +10 -0
  28. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -0
  29. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +282 -0
  30. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  31. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +30 -2
  32. package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
  33. package/lib/exercises/math/derivation/derivative/productDerivative.js +68 -1
  34. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  35. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +40 -4
  36. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -1
  37. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +30 -3
  38. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts +12 -0
  39. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.js +127 -0
  41. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts +13 -0
  42. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.js +161 -0
  44. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts +11 -0
  45. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.js +116 -0
  47. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts +8 -0
  48. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.js +142 -0
  50. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +4 -0
  51. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/derivativeNumber/index.js +4 -0
  53. package/lib/exercises/math/derivation/index.d.ts +1 -1
  54. package/lib/exercises/math/derivation/index.js +1 -1
  55. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts +13 -0
  56. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -0
  57. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +278 -0
  58. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts +11 -0
  59. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -0
  60. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +211 -0
  61. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts +9 -0
  62. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts.map +1 -0
  63. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +142 -0
  64. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +5 -0
  65. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -0
  66. package/lib/exercises/math/functions/exponential/algebraic/index.js +4 -0
  67. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts +14 -0
  68. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts.map +1 -0
  69. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +337 -0
  70. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts +11 -0
  71. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -0
  72. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +234 -0
  73. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts +9 -0
  74. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -0
  75. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +190 -0
  76. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts +9 -0
  77. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -0
  78. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +190 -0
  79. package/lib/exercises/math/functions/exponential/definition/index.d.ts +5 -0
  80. package/lib/exercises/math/functions/exponential/definition/index.d.ts.map +1 -0
  81. package/lib/exercises/math/functions/exponential/definition/index.js +4 -0
  82. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts +13 -0
  83. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -0
  84. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +375 -0
  85. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +30 -3
  87. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
  88. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +35 -1
  89. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +1 -1
  91. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.js +23 -1
  93. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
  94. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +29 -0
  95. package/lib/exercises/math/functions/variations/exp/index.d.ts +3 -0
  96. package/lib/exercises/math/functions/variations/exp/index.d.ts.map +1 -0
  97. package/lib/exercises/math/functions/variations/exp/index.js +2 -0
  98. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts +9 -0
  99. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -0
  100. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +101 -0
  101. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts +11 -0
  102. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -0
  103. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +192 -0
  104. package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +2 -2
  105. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  106. package/lib/exercises/math/geometry/thales/thalesCalcul.js +1 -1
  107. package/lib/exercises/math/geometry/vectors/colinearity/determinant.js +1 -1
  108. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +1 -1
  109. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.d.ts.map +1 -1
  110. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +33 -7
  111. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  112. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
  113. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +38 -1
  114. package/lib/exercises/math/probaStat/conditionalProbability.d.ts +4 -1
  115. package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
  116. package/lib/exercises/math/probaStat/conditionalProbability.js +38 -5
  117. package/lib/exercises/math/probaStat/independancy/independancy.d.ts +9 -0
  118. package/lib/exercises/math/probaStat/independancy/independancy.d.ts.map +1 -0
  119. package/lib/exercises/math/probaStat/independancy/independancy.js +114 -0
  120. package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts +9 -0
  121. package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts.map +1 -0
  122. package/lib/exercises/math/probaStat/independancy/independancyFindCap.js +101 -0
  123. package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts +9 -0
  124. package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts.map +1 -0
  125. package/lib/exercises/math/probaStat/independancy/independancyFindCup.js +118 -0
  126. package/lib/exercises/math/probaStat/independancy/index.d.ts +5 -0
  127. package/lib/exercises/math/probaStat/independancy/index.d.ts.map +1 -0
  128. package/lib/exercises/math/probaStat/independancy/index.js +4 -0
  129. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts +10 -0
  130. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts.map +1 -0
  131. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.js +106 -0
  132. package/lib/exercises/math/probaStat/index.d.ts +1 -1
  133. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  134. package/lib/exercises/math/probaStat/index.js +1 -1
  135. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
  136. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
  137. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +7 -0
  138. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -1
  139. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +7 -0
  140. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -1
  141. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +7 -0
  142. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.d.ts.map +1 -1
  143. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.js +7 -0
  144. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts +9 -0
  145. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts.map +1 -0
  146. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.js +118 -0
  147. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -1
  148. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +55 -6
  149. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -1
  150. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +42 -1
  151. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts +4 -1
  152. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
  153. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +57 -7
  154. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  155. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +24 -2
  156. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  157. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +31 -8
  158. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -1
  159. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  160. package/lib/exercises/math/sequences/arithmetic/index.js +1 -1
  161. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
  162. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +11 -1
  163. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.js +5 -5
  164. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
  165. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +3 -1
  166. package/lib/exercises/math/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  167. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +41 -2
  168. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  169. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -2
  170. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
  171. package/lib/exercises/math/sequences/sequenceEvaluation.js +22 -2
  172. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts +9 -0
  173. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts.map +1 -0
  174. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +107 -0
  175. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts +10 -0
  176. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -0
  177. package/lib/exercises/math/trigonometry/circle/associatePoint.js +86 -0
  178. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts +10 -0
  179. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts.map +1 -0
  180. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.js +205 -0
  181. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts +7 -0
  182. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -0
  183. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +121 -0
  184. package/lib/exercises/math/trigonometry/circle/index.d.ts +7 -0
  185. package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -0
  186. package/lib/exercises/math/trigonometry/circle/index.js +7 -0
  187. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts +10 -0
  188. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -0
  189. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +100 -0
  190. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts +8 -0
  191. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -0
  192. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +97 -0
  193. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts +10 -0
  194. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -0
  195. package/lib/exercises/math/trigonometry/circle/remarkableValues.js +112 -0
  196. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts +7 -0
  197. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -0
  198. package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +92 -0
  199. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts +7 -0
  200. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -0
  201. package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +104 -0
  202. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts +7 -0
  203. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts.map +1 -0
  204. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.js +83 -0
  205. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts +8 -0
  206. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -0
  207. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +111 -0
  208. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts +8 -0
  209. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts.map +1 -0
  210. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +101 -0
  211. package/lib/exercises/math/trigonometry/functions/index.d.ts +6 -0
  212. package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -0
  213. package/lib/exercises/math/trigonometry/functions/index.js +6 -0
  214. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts +9 -0
  215. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts.map +1 -0
  216. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.js +151 -0
  217. package/lib/exercises/math/trigonometry/index.d.ts +3 -14
  218. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  219. package/lib/exercises/math/trigonometry/index.js +3 -14
  220. package/lib/exercises/math/trigonometry/triangle/index.d.ts +7 -0
  221. package/lib/exercises/math/trigonometry/triangle/index.d.ts.map +1 -0
  222. package/lib/exercises/math/trigonometry/triangle/index.js +6 -0
  223. package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts +10 -0
  224. package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts.map +1 -0
  225. package/lib/exercises/math/trigonometry/triangle/trigonometry.js +207 -0
  226. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts +10 -0
  227. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts.map +1 -0
  228. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +174 -0
  229. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts +11 -0
  230. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts.map +1 -0
  231. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.js +224 -0
  232. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts +13 -0
  233. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts.map +1 -0
  234. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.js +189 -0
  235. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts +13 -0
  236. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts.map +1 -0
  237. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +290 -0
  238. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts +18 -0
  239. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts.map +1 -0
  240. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.js +386 -0
  241. package/lib/exercises/pc/mathExosInPC.d.ts +2 -2
  242. package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
  243. package/lib/exercises/pc/mathExosInPC.js +2 -2
  244. package/lib/index.d.ts +63 -27
  245. package/lib/index.d.ts.map +1 -1
  246. package/lib/math/geometry/segment.d.ts +1 -1
  247. package/lib/math/geometry/vector.d.ts +2 -1
  248. package/lib/math/geometry/vector.d.ts.map +1 -1
  249. package/lib/math/geometry/vector.js +1 -1
  250. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  251. package/lib/math/numbers/reals/real.js +2 -0
  252. package/lib/playground.d.ts.map +1 -1
  253. package/lib/playground.js +3 -1
  254. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  255. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -1
  257. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  258. package/lib/tree/nodes/functions/sqrtNode.js +17 -6
  259. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  260. package/package.json +1 -1
@@ -0,0 +1,282 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../../math/utils/random/randint.js";
4
+ import { exp, ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
5
+ import { add, AddNode } from "../../../../../tree/nodes/operators/addNode.js";
6
+ import { frac, FractionNode, isFractionNode, } from "../../../../../tree/nodes/operators/fractionNode.js";
7
+ import { multiply, MultiplyNode, } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { power } from "../../../../../tree/nodes/operators/powerNode.js";
9
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
10
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
11
+ const getInstructionNode = (identifiers) => {
12
+ const { a, b, c, d } = identifiers;
13
+ const nodeNum = add(multiply(a, exp("x".toTree())), b);
14
+ const nodeDen = add(multiply(c, exp("x".toTree())), d);
15
+ return frac(nodeNum, nodeDen);
16
+ };
17
+ const getPrettyFractionNode = (nodeFraction) => {
18
+ const nodeNum = nodeFraction.leftChild.simplify({ towardsDistribute: true });
19
+ const nodeDen = nodeFraction.rightChild;
20
+ return frac(nodeNum, nodeDen);
21
+ };
22
+ const getInstruction = (identifiers) => {
23
+ const nodeF = getInstructionNode(identifiers);
24
+ return `Déterminer la dérivée de la fonction $f$ définie par :
25
+
26
+ $$
27
+ f(x) = ${nodeF.toTex()}
28
+ $$`;
29
+ };
30
+ const getAnswerNode = (identifiers) => {
31
+ const nodeRaw = getInstructionNode(identifiers).derivative();
32
+ if (isFractionNode(nodeRaw)) {
33
+ const nodeFraction = nodeRaw;
34
+ return getPrettyFractionNode(nodeFraction);
35
+ }
36
+ else {
37
+ return nodeRaw;
38
+ }
39
+ };
40
+ const getAnswer = (identifiers) => {
41
+ return getAnswerNode(identifiers).toTex();
42
+ };
43
+ const getHint = () => {
44
+ return `Si $u$ et $v$ sont deux fonctions dérivables alors, pour $x$ tel que $v(x)\\neq0$, on a :
45
+
46
+ $$
47
+ (\\frac{u}{v})'(x) = \\frac{u'(x)v(x)-u(x)v'(x)}{{v(x)}^2}
48
+ $$
49
+
50
+ `;
51
+ };
52
+ const getCorrection = (identifiers) => {
53
+ const nodeInstruction = getInstructionNode(identifiers);
54
+ const [nodeU, nodeV] = [
55
+ nodeInstruction.leftChild,
56
+ nodeInstruction.rightChild,
57
+ ];
58
+ const [nodeUPrime, nodeVPrime] = [nodeU, nodeV].map((node) => node.derivative().simplify());
59
+ return `On doit calculer la dérivée d'un quotient.
60
+
61
+ Ici, on a :
62
+
63
+ $$
64
+ u(x) = ${nodeU.toTex()}
65
+ $$
66
+
67
+ $$
68
+ v(x) = ${nodeV.toTex()}
69
+ $$
70
+
71
+ On calcule :
72
+
73
+ $$
74
+ u'(x) = ${nodeUPrime.toTex()}
75
+ $$
76
+
77
+ $$
78
+ v'(x) = ${nodeVPrime.toTex()}
79
+ $$
80
+
81
+ Donc :
82
+
83
+ $$
84
+ (\\frac{u}{v})'(x) = ${frac(substract(multiply(nodeUPrime, nodeV), multiply(nodeU, nodeVPrime)), power(nodeV, 2)).toTex()}
85
+ $$
86
+
87
+ $$
88
+ (\\frac{u}{v})'(x) = ${frac(substract(multiply(nodeUPrime, nodeV).simplify({ towardsDistribute: true }), multiply(nodeU, nodeVPrime).simplify({ towardsDistribute: true })), power(nodeV, 2)).toTex()}
89
+ $$
90
+
91
+ $$
92
+ f'(x) = ${getAnswer(identifiers)}
93
+ $$
94
+
95
+ `;
96
+ };
97
+ const getPropositions = (n, { answer, ...identifiers }) => {
98
+ const propositions = [];
99
+ addValidProp(propositions, answer);
100
+ const { a, b, c, d } = identifiers;
101
+ //student: (u/v)' = u'/v'
102
+ {
103
+ tryToAddWrongProp(propositions, frac(a, c).simplify({ decimalToFractions: true }).toTex());
104
+ }
105
+ //student: (u/v)' = (u'v+uv')/v²
106
+ {
107
+ class WrongFractionNode extends FractionNode {
108
+ derivative(varName) {
109
+ const numNode = add(multiply(this.leftChild.derivative(varName), this.rightChild), multiply(this.leftChild, this.rightChild.derivative(varName)));
110
+ const denNode = power(this.rightChild, 2);
111
+ return frac(numNode, denNode);
112
+ }
113
+ }
114
+ const wrongInstructionNode = (() => {
115
+ const nodeNum = add(multiply(a, exp("x".toTree())), b);
116
+ const nodeDen = add(multiply(c, exp("x".toTree())), d);
117
+ return new WrongFractionNode(nodeNum, nodeDen);
118
+ })();
119
+ const nodeRaw = wrongInstructionNode.derivative();
120
+ let nodeWrong;
121
+ if (isFractionNode(nodeRaw)) {
122
+ nodeWrong = getPrettyFractionNode(nodeRaw);
123
+ }
124
+ else {
125
+ nodeWrong = nodeRaw;
126
+ }
127
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
128
+ }
129
+ //student: (u/v)' = -u'/v²
130
+ {
131
+ class WrongFractionNode extends FractionNode {
132
+ derivative(varName) {
133
+ const numNode = multiply(-1, this.leftChild).derivative(varName);
134
+ const denNode = power(this.rightChild, 2);
135
+ return frac(numNode, denNode);
136
+ }
137
+ }
138
+ const wrongInstructionNode = (() => {
139
+ const nodeNum = add(multiply(a, exp("x".toTree())), b);
140
+ const nodeDen = add(multiply(c, exp("x".toTree())), d);
141
+ return new WrongFractionNode(nodeNum, nodeDen);
142
+ })();
143
+ const nodeRaw = wrongInstructionNode.derivative();
144
+ let nodeWrong;
145
+ if (isFractionNode(nodeRaw)) {
146
+ nodeWrong = getPrettyFractionNode(nodeRaw);
147
+ }
148
+ else {
149
+ nodeWrong = nodeRaw;
150
+ }
151
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
152
+ }
153
+ //student: exp(x)' = x.exp(x)
154
+ {
155
+ class MyAddNode extends AddNode {
156
+ simplify(opts, log) {
157
+ if (this.leftChild.evaluate() === 0 ||
158
+ this.rightChild.evaluate() === 0) {
159
+ return (0).toTree();
160
+ }
161
+ else {
162
+ return super.simplify(opts, log);
163
+ }
164
+ }
165
+ }
166
+ class MyMultiplyNode extends MultiplyNode {
167
+ derivative(varName) {
168
+ return new MyAddNode(new MyMultiplyNode(this.leftChild.derivative(varName).simplify(), this.rightChild), new MyMultiplyNode(this.leftChild, this.rightChild.derivative(varName).simplify())).simplify();
169
+ }
170
+ simplify(opts, log) {
171
+ if (this.leftChild.evaluate() === 0 ||
172
+ this.rightChild.evaluate() === 0) {
173
+ return (0).toTree();
174
+ }
175
+ else {
176
+ return super.simplify(opts, log);
177
+ }
178
+ }
179
+ }
180
+ class WrongExpNode extends ExpNode {
181
+ derivative(varName = "x") {
182
+ const derivateSuper = new MyMultiplyNode(this.child.derivative(varName), exp(this.child));
183
+ return new MyMultiplyNode(varName.toTree(), derivateSuper);
184
+ }
185
+ }
186
+ const wrongInstructionNode = (() => {
187
+ const nodeNum = add(new MyMultiplyNode(a.toTree(), new WrongExpNode("x".toTree())), b);
188
+ const nodeDen = add(new MyMultiplyNode(c.toTree(), new WrongExpNode("x".toTree())), d);
189
+ return frac(nodeNum, nodeDen);
190
+ })();
191
+ const nodeRaw = wrongInstructionNode.derivative();
192
+ let nodeWrong;
193
+ if (isFractionNode(nodeRaw)) {
194
+ const nodeFraction = nodeRaw;
195
+ const nodeNum = nodeFraction.leftChild.simplify({});
196
+ const nodeDen = nodeFraction.rightChild;
197
+ nodeWrong = frac(nodeNum, nodeDen);
198
+ }
199
+ else {
200
+ nodeWrong = nodeRaw;
201
+ }
202
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
203
+ }
204
+ return shuffleProps(propositions, n);
205
+ };
206
+ const isAnswerValid = (ans, { answer }) => {
207
+ const nodeAns = parseAlgebraic(ans);
208
+ const nodeAnswer = parseAlgebraic(answer);
209
+ return [0, 1, 2, 10].every((x) => {
210
+ return (substract(nodeAns.evaluate({ x }), nodeAnswer.evaluate({ x })).evaluate() === 0);
211
+ });
212
+ };
213
+ const getExpOverExpDerivativeQuestion = () => {
214
+ function createRandomIdentifiers() {
215
+ const a = randint(-9, 10, [0]);
216
+ const b = randint(-9, 10, [0]);
217
+ const c = randint(9, 10, [0]);
218
+ const d = randint(-9, 10, [c, -c, 0]);
219
+ const identifiers = { a, b, c, d };
220
+ return identifiers;
221
+ }
222
+ let identifiers;
223
+ let counter = -1;
224
+ let isValid = false;
225
+ while (!isValid && counter < 100) {
226
+ counter++;
227
+ const identifiersCandidate = createRandomIdentifiers();
228
+ try {
229
+ const nodeAnswer = getAnswerNode(identifiersCandidate);
230
+ if (nodeAnswer && isFractionNode(nodeAnswer)) {
231
+ const nodeFraction = nodeAnswer;
232
+ const isZero = nodeFraction.leftChild.evaluate() === 0;
233
+ isValid = !isZero;
234
+ if (isValid) {
235
+ identifiers = identifiersCandidate;
236
+ }
237
+ }
238
+ }
239
+ catch (_) {
240
+ (() => { })();
241
+ }
242
+ }
243
+ if (!isValid) {
244
+ const identifiersDefault = {
245
+ a: 1,
246
+ b: 2,
247
+ c: 2,
248
+ d: 3,
249
+ };
250
+ identifiers = identifiersDefault;
251
+ }
252
+ return getQuestionFromIdentifiers(identifiers);
253
+ };
254
+ const getQuestionFromIdentifiers = (identifiers) => {
255
+ const question = {
256
+ instruction: getInstruction(identifiers),
257
+ startStatement: "f'(x)",
258
+ answer: getAnswer(identifiers),
259
+ keys: ["x", "epower"],
260
+ answerFormat: "tex",
261
+ identifiers,
262
+ hint: getHint(identifiers),
263
+ correction: getCorrection(identifiers),
264
+ };
265
+ return question;
266
+ };
267
+ export const expOverExpDerivative = {
268
+ id: "expOverExpDerivative",
269
+ connector: "=",
270
+ label: "Dérivée de $\\frac{a e^x + b}{c e^x + d}$",
271
+ isSingleStep: false,
272
+ generator: (nb) => getDistinctQuestions(getExpOverExpDerivativeQuestion, nb),
273
+ getPropositions,
274
+ qcmTimer: 60,
275
+ freeTimer: 60,
276
+ isAnswerValid,
277
+ subject: "Mathématiques",
278
+ getAnswer,
279
+ getInstruction,
280
+ getQuestionFromIdentifiers,
281
+ hasHintAndCorrection: true,
282
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+DF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyFF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -3,6 +3,31 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
5
5
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
6
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
7
+ const getHint = () => {
8
+ return `On rappelle que :
9
+
10
+ $$
11
+ \\left(\\frac{1}{x}\\right)' = -\\frac{1}{x^2}
12
+ $$`;
13
+ };
14
+ const getCorrection = (identifiers) => {
15
+ const { a } = identifiers;
16
+ return `On a :
17
+
18
+ $$
19
+ f(x) = ${a}\\times \\frac{1}{x}
20
+ $$
21
+
22
+ donc
23
+
24
+ ${alignTex([
25
+ ["f'(x)", "=", `${a}\\times \\left(\\frac{1}{x}\\right)'`],
26
+ ["", "=", `${a}\\times \\left(-\\frac{1}{x^2}\\right)`],
27
+ ["", "=", getAnswer(identifiers)],
28
+ ])}
29
+ `;
30
+ };
6
31
  const getInstruction = (identifiers) => {
7
32
  const { a } = identifiers;
8
33
  return `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par :
@@ -17,7 +42,7 @@ const getAnswer = (identifiers) => {
17
42
  return answer;
18
43
  };
19
44
  const getInverseFunctionDerivative = () => {
20
- const a = randint(-19, 20, [0]);
45
+ const a = randint(-19, 20, [0, 1]);
21
46
  const identifiers = { a };
22
47
  return getQuestionFromIdentifiers(identifiers);
23
48
  };
@@ -29,6 +54,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
29
54
  keys: ["x"],
30
55
  answerFormat: "tex",
31
56
  identifiers,
57
+ hint: getHint(identifiers),
58
+ correction: getCorrection(identifiers),
32
59
  };
33
60
  return question;
34
61
  };
@@ -59,7 +86,7 @@ const isAnswerValid = (ans, { answer }) => {
59
86
  export const inverseFunctionDerivative = {
60
87
  id: "inverseFunctionDerivative",
61
88
  connector: "=",
62
- label: "Dérivée d'une fonction inverse",
89
+ label: "Dérivée d'une fonction inverse du type $f(x) = \\frac{k}{x}$",
63
90
  isSingleStep: false,
64
91
  generator: (nb) => getDistinctQuestions(getInverseFunctionDerivative, nb),
65
92
  qcmTimer: 60,
@@ -70,4 +97,5 @@ export const inverseFunctionDerivative = {
70
97
  getAnswer,
71
98
  getInstruction,
72
99
  getQuestionFromIdentifiers,
100
+ hasHintAndCorrection: true,
73
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"productDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/productDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAuFF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
1
+ {"version":3,"file":"productDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/productDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA2JF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -1,9 +1,73 @@
1
1
  import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Polynomial, PolynomialConstructor, } from "../../../../math/polynomials/polynomial.js";
4
- import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
4
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
5
+ import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js";
5
6
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
6
7
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
8
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
9
+ const getHint = () => {
10
+ return `La fonction $f$ est un produit de la forme :
11
+
12
+ $$
13
+ f(x) = u(x)\\times v(x)
14
+ $$
15
+
16
+ On peut alors utiliser la formule de la dérivée d'un produit :
17
+
18
+ $$
19
+ (uv)' = u'v+uv'
20
+ $$`;
21
+ };
22
+ const getCorrection = (identifiers) => {
23
+ const { poly1Coeffs, poly2Coeffs } = identifiers;
24
+ const u = new Polynomial(poly1Coeffs);
25
+ const uTree = u.toTree();
26
+ const uprime = u.derivate();
27
+ const uprimeTree = uprime.toTree();
28
+ const v = new Polynomial(poly2Coeffs);
29
+ const vTree = v.toTree();
30
+ const vprime = v.derivate();
31
+ const vprimeTree = vprime.toTree();
32
+ return `La fonction $f$ est un produit de la forme $u(x)\\times v(x)$, avec :
33
+
34
+ $$
35
+ u(x) = ${uTree.toTex()}
36
+ $$
37
+
38
+ et
39
+
40
+ $$
41
+ v(x) = ${vTree.toTex()}
42
+ $$
43
+
44
+ On a donc $u'(x) = ${uprimeTree.toTex()}$ et $v'(x) = ${vprimeTree.toTex()}$.
45
+
46
+ La fonction dérivée de $f$ est donc :
47
+
48
+ ${alignTex([
49
+ ["f'(x)", "=", "u'v+uv'"],
50
+ [
51
+ "",
52
+ "=",
53
+ add(multiply(uprimeTree, vTree), multiply(uTree, vprimeTree)).toTex(),
54
+ ],
55
+ [
56
+ "",
57
+ "=",
58
+ add(multiply(uprimeTree, vTree).simplify({
59
+ towardsDistribute: true,
60
+ forbidFactorize: true,
61
+ }), multiply(uTree, vprimeTree).simplify({
62
+ towardsDistribute: true,
63
+ forbidFactorize: true,
64
+ })).toTex(),
65
+ ],
66
+ ["", "=", getAnswer(identifiers)],
67
+ ])}
68
+
69
+ `;
70
+ };
7
71
  const getInstruction = (identifiers) => {
8
72
  const { poly1Coeffs, poly2Coeffs } = identifiers;
9
73
  const poly1 = new Polynomial(poly1Coeffs);
@@ -37,6 +101,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
37
101
  keys: ["x", "xsquare", "xcube"],
38
102
  answerFormat: "tex",
39
103
  identifiers,
104
+ hint: getHint(identifiers),
105
+ correction: getCorrection(identifiers),
40
106
  };
41
107
  return question;
42
108
  };
@@ -83,4 +149,5 @@ export const productDerivative = {
83
149
  getAnswer,
84
150
  getInstruction,
85
151
  getQuestionFromIdentifiers,
152
+ hasHintAndCorrection: true,
86
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA6GF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
1
+ {"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAsJF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
@@ -1,10 +1,43 @@
1
1
  import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Polynomial, PolynomialConstructor, } from "../../../../math/polynomials/polynomial.js";
4
- import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
5
- import { SquareNode } from "../../../../tree/nodes/operators/powerNode.js";
4
+ import { frac, FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
5
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
6
+ import { square, SquareNode } from "../../../../tree/nodes/operators/powerNode.js";
7
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
6
8
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
7
9
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
10
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
11
+ const getHint = () => {
12
+ return `La fonction $f$ est un quotient. Utilise donc la formule de dérivation d'un quotient :
13
+
14
+ $$
15
+ \\left(\\frac{u}{v}\\right)' = \\frac{u'v - uv'}{v^2}
16
+ $$`;
17
+ };
18
+ const getCorrection = (identifiers) => {
19
+ const poly1 = new Polynomial(identifiers.poly1Coeffs);
20
+ const poly1Tree = poly1.toTree();
21
+ const poly1Prime = poly1.derivate().toTree();
22
+ const poly2 = new Polynomial(identifiers.poly2Coeffs);
23
+ const poly2Tree = poly2.toTree();
24
+ const poly2Prime = poly2.derivate().toTree();
25
+ return `La fonction $f$ est un quotient de la forme $\\frac{u}{v}$, avec $u(x) = ${poly1Tree.toTex()}$ et $v(x) = ${poly2Tree.toTex()}$.
26
+
27
+ On a donc $u'(x) = ${poly1Prime.toTex()}$ et $v'(x) = ${poly2Prime.toTex()}$.
28
+
29
+ On utilise donc la formule de la dérivée d'un quotient :
30
+
31
+ ${alignTex([
32
+ ["f'(x)", "=", `\\frac{u'v - uv'}{v^2}`],
33
+ [
34
+ "",
35
+ "=",
36
+ frac(substract(multiply(poly1Prime, poly2Tree), multiply(poly1Tree, poly2Prime)), square(poly2Tree)).toTex(),
37
+ ],
38
+ ["", "=", getAnswer(identifiers)],
39
+ ])}`;
40
+ };
8
41
  const getInstruction = (identifiers) => {
9
42
  const poly1 = new Polynomial(identifiers.poly1Coeffs);
10
43
  const poly2 = new Polynomial(identifiers.poly2Coeffs);
@@ -14,7 +47,7 @@ $$
14
47
  f(x) = ${new FractionNode(poly1.toTree(), poly2.toTree()).toTex()}
15
48
  $$`;
16
49
  };
17
- const getAnwer = (identifiers) => {
50
+ const getAnswer = (identifiers) => {
18
51
  const poly1 = new Polynomial(identifiers.poly1Coeffs);
19
52
  const poly2 = new Polynomial(identifiers.poly2Coeffs);
20
53
  const answerNum = poly1
@@ -49,11 +82,13 @@ const getProductDerivativeQuestion = () => {
49
82
  };
50
83
  const getQuestionFromIdentifiers = (identifiers) => {
51
84
  const question = {
52
- answer: getAnwer(identifiers),
85
+ answer: getAnswer(identifiers),
53
86
  instruction: getInstruction(identifiers),
54
87
  keys: ["x", "xsquare", "xcube"],
55
88
  answerFormat: "tex",
56
89
  identifiers,
90
+ hint: getHint(identifiers),
91
+ correction: getCorrection(identifiers),
57
92
  };
58
93
  return question;
59
94
  };
@@ -103,4 +138,5 @@ export const quotientDerivative = {
103
138
  isAnswerValid,
104
139
  subject: "Mathématiques",
105
140
  getQuestionFromIdentifiers,
141
+ hasHintAndCorrection: true,
106
142
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sqrtCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA0FF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
1
+ {"version":3,"file":"sqrtCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAuHF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
@@ -2,11 +2,35 @@ import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../..
2
2
  import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
4
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";
5
+ import { sqrt, SqrtNode } from "../../../../../tree/nodes/functions/sqrtNode.js";
6
+ import { frac, FractionNode } from "../../../../../tree/nodes/operators/fractionNode.js";
7
+ import { multiply, MultiplyNode, } from "../../../../../tree/nodes/operators/multiplyNode.js";
8
8
  import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
9
9
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
10
+ const getHint = () => {
11
+ return `Utilise la formule de dérivation suivante :
12
+
13
+ $$
14
+ \\left(\\sqrt{u}\\right)' = \\frac{u'}{2 \\times \\sqrt{u}}
15
+ $$`;
16
+ };
17
+ const getCorrection = (identifiers) => {
18
+ const { affineA, affineB } = identifiers;
19
+ const affine = new Affine(affineA, affineB);
20
+ return `On utilise la formule de dérivation suivante :
21
+
22
+ $$
23
+ \\left(\\sqrt{u}\\right)' = \\frac{u'}{2 \\times \\sqrt{u}}
24
+ $$
25
+
26
+ Ici, $u(x) = ${affine.toTree().toTex()}$, donc $u'(x) = ${affineA}$.
27
+
28
+ Ainsi,
29
+
30
+ $$
31
+ f'(x) = ${frac(affineA, multiply(2, sqrt(affine.toTree()))).toSimplificationTex()}
32
+ $$`;
33
+ };
10
34
  const getInstruction = (identifiers) => {
11
35
  const { affineA, affineB } = identifiers;
12
36
  const affine = new Affine(affineA, affineB);
@@ -36,6 +60,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
36
60
  keys: ["x"],
37
61
  answerFormat: "tex",
38
62
  identifiers,
63
+ hint: getHint(identifiers),
64
+ correction: getCorrection(identifiers),
39
65
  };
40
66
  return question;
41
67
  };
@@ -78,4 +104,5 @@ export const sqrtCompositionDerivation = {
78
104
  getAnswer,
79
105
  getInstruction,
80
106
  getQuestionFromIdentifiers,
107
+ hasHintAndCorrection: true,
81
108
  };
@@ -0,0 +1,12 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ aIds: NodeIdentifiers;
5
+ fxIds: NodeIdentifiers;
6
+ };
7
+ type Options = {
8
+ functionType: string[];
9
+ };
10
+ export declare const averageRateOfChangeAlgebraicExpression: Exercise<Identifiers, Options>;
11
+ export {};
12
+ //# sourceMappingURL=averageRateOfChangeAlgebraicExpression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"averageRateOfChangeAlgebraicExpression.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAyEF,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAuCF,eAAO,MAAM,sCAAsC,EAAE,QAAQ,CAC3D,WAAW,EACX,OAAO,CAyBR,CAAC"}