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,375 @@
1
+ import { addValidProp, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { blueLight, orange, red } from "../../../../../geogebra/colors.js";
4
+ import { GeogebraConstructor } from "../../../../../geogebra/geogebraConstructor.js";
5
+ import { randint } from "../../../../../math/utils/random/randint.js";
6
+ import { round } from "../../../../../math/utils/round.js";
7
+ import { exp } from "../../../../../tree/nodes/functions/expNode.js";
8
+ import { NodeConstructor, } from "../../../../../tree/nodes/nodeConstructor.js";
9
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
10
+ import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { power } from "../../../../../tree/nodes/operators/powerNode.js";
12
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
13
+ import { random } from "../../../../../utils/alea/random.js";
14
+ const getCenteredScaledFrame = (coords, scaleFactor) => {
15
+ const [xMin, xMax, yMin, yMax] = coords;
16
+ const xCenter = (xMax + xMin) / 2.0;
17
+ const yCenter = (yMax + yMin) / 2.0;
18
+ return [
19
+ xCenter + (xMin - xCenter) * scaleFactor,
20
+ xCenter + (xMax - xCenter) * scaleFactor,
21
+ yCenter + (yMin - yCenter) * scaleFactor,
22
+ yCenter + (yMax - yCenter) * scaleFactor,
23
+ ];
24
+ };
25
+ const getPropositions = (_, { answer }) => {
26
+ const propositions = [];
27
+ ["Oui", "Non"].forEach((str) => {
28
+ if (str === answer) {
29
+ addValidProp(propositions, str, "raw");
30
+ }
31
+ else {
32
+ tryToAddWrongProp(propositions, str, "raw");
33
+ }
34
+ });
35
+ return propositions;
36
+ };
37
+ const getAnswer = (identifiers) => {
38
+ const { rand } = identifiers;
39
+ const isPlausible = rand < 2;
40
+ return ["Oui", "Non"][isPlausible ? 0 : 1];
41
+ };
42
+ const getInstruction = () => {
43
+ return `La figure ci-dessous montre une portion
44
+ de la courbe représentative d'une fonction $f$ (en rouge)
45
+ et une de ses tangentes (en bleu).
46
+
47
+ En considérant ce qui est représenté de $f$, peut-il s'agir de la fonction exponentielle ?`;
48
+ };
49
+ const getHint = () => {
50
+ return `La fonction exponentielle vérifie pour tout $x$ réel :
51
+
52
+ $$
53
+ \\exp'(x)=\\exp(x) > 0
54
+ $$
55
+
56
+ Sa courbe représentative est toujours au-dessus de ses tangentes.
57
+
58
+ `;
59
+ };
60
+ const getCorrection = (identifiers) => {
61
+ const { rand } = identifiers;
62
+ switch (rand) {
63
+ case 0:
64
+ return `La fonction $f$ représentée est telle que,
65
+
66
+ pour l'abscisse $x_{0}$ où est tracée la tangente :
67
+
68
+ - $f'(x_{0})=f(x_{0})$
69
+
70
+ - $f'(x_{0})>0$
71
+
72
+ - la tangente est en dessous de la courbe.
73
+
74
+ Il peut donc s'agir de la fonction exponentielle.
75
+
76
+ (Et en effet, ici, $f=\\exp$).
77
+
78
+ `;
79
+ case 1:
80
+ return `La fonction $f$ représentée est telle que,
81
+
82
+ pour l'abscisse $x_{0}$ où est tracée la tangente :
83
+
84
+ - $f'(x_{0})=f(x_{0})$
85
+
86
+ - $f'(x_{0})>0$
87
+
88
+ - la tangente est en dessous de la courbe.
89
+
90
+ Il peut donc s'agir de la fonction exponentielle.
91
+
92
+ (En fait, ici, $f$ est une parabole).
93
+
94
+ `;
95
+ case 2:
96
+ return `La fonction $f$ représentée est telle que,
97
+
98
+ pour l'abscisse $x$ où est tracée la tangente :
99
+
100
+ - $f'(x) \\neq f(x)$
101
+
102
+ Il ne peut donc pas s'agir de la fonction exponentielle.
103
+
104
+ (En fait, ici, $f$ est une parabole).
105
+
106
+ `;
107
+ case 3:
108
+ return `La fonction $f$ représentée est telle que,
109
+
110
+ pour l'abscisse $x_{0}$ où est tracée la tangente :
111
+
112
+ - $f'(x_{0})<0$
113
+
114
+ Il ne peut donc pas s'agir de la fonction exponentielle.
115
+
116
+ (En fait, ici, $f$ est une parabole).
117
+
118
+ `;
119
+ case 4:
120
+ case 5:
121
+ case 6:
122
+ return `La fonction $f$ représentée est telle que,
123
+
124
+ pour l'abscisse $x$ où est tracée la tangente :
125
+
126
+ - la tangente est au-dessus de la courbe.
127
+
128
+ Il ne peut donc pas s'agir de la fonction exponentielle.
129
+
130
+ (En fait, ici, $f$ est une parabole).
131
+
132
+ `;
133
+ default:
134
+ throw new Error("Unsupported rand: " + rand);
135
+ }
136
+ };
137
+ const getCorrectionGGBOptions = (identifiers) => {
138
+ const { nodeIdsF, nodeIdsT, coordsFrame } = identifiers;
139
+ const nodeF = NodeConstructor.fromIdentifiers(nodeIdsF);
140
+ const nodeT = NodeConstructor.fromIdentifiers(nodeIdsT);
141
+ const [xMinFrame, xMaxFrame, yMinFrame, yMaxFrame] = coordsFrame;
142
+ const [xMin, xMax, yMin, yMax] = getCenteredScaledFrame(coordsFrame, 5);
143
+ const commands = [
144
+ `Cf = ${nodeF.toMathString()}`,
145
+ `SetColor(Cf, "${red}")`,
146
+ `Ct = ${nodeT.toMathString()}`,
147
+ `SetColor(Ct, "${blueLight}")`,
148
+ //show instruction frame
149
+ `Rframe = Polygon((${xMinFrame},${yMaxFrame}),(${xMaxFrame},${yMaxFrame}),(${xMaxFrame},${yMinFrame}),(${xMinFrame},${yMinFrame}))`,
150
+ `SetColor(Rframe, "${orange}")`,
151
+ ];
152
+ const ggb = new GeogebraConstructor({
153
+ commands,
154
+ hideGrid: true,
155
+ lockedAxesRatio: (xMaxFrame - xMinFrame) / (yMaxFrame - yMinFrame),
156
+ });
157
+ return ggb.getOptions({
158
+ coords: [xMin, xMax, yMin, yMax],
159
+ });
160
+ };
161
+ const getGGBOptions = (identifiers) => {
162
+ const { nodeIdsF, nodeIdsT, coordsFrame, s } = identifiers;
163
+ const nodeF = NodeConstructor.fromIdentifiers(nodeIdsF);
164
+ const nodeT = NodeConstructor.fromIdentifiers(nodeIdsT);
165
+ const [xMin, xMax, yMin, yMax] = coordsFrame;
166
+ const xCenter = (xMin + xMax) / 2.0;
167
+ const yCenter = (yMin + yMax) / 2.0;
168
+ const commands = [
169
+ `Cf = ${nodeF.toMathString()}`,
170
+ `SetColor(Cf, "${red}")`,
171
+ `Ct = ${nodeT.toMathString()}`,
172
+ `SetColor(Ct, "${blueLight}")`,
173
+ //label with slope
174
+ `Lbl = Text("$\\large \\text{pente}\\approx${round(s, 2).frenchify()}$", (${xCenter},${yCenter}), false, true, 0, 0)`,
175
+ `SetFixed(Lbl, true, false)`,
176
+ ];
177
+ const ggb = new GeogebraConstructor({
178
+ commands,
179
+ xAxis: {
180
+ hidden: true,
181
+ },
182
+ hideGrid: true,
183
+ lockedAxesRatio: (xMax - xMin) / (yMax - yMin),
184
+ forbidShiftDragZoom: true,
185
+ });
186
+ return ggb.getOptions({
187
+ coords: [xMin, xMax, yMin, yMax],
188
+ });
189
+ };
190
+ const getIsPlausibleExpFromGraphQuestion = () => {
191
+ let x;
192
+ let nodeF;
193
+ const rand = random([random([0, 1]), random([2, 3, 4, 5, 6])]);
194
+ switch (rand) {
195
+ case 0:
196
+ {
197
+ nodeF = exp("x");
198
+ x = randint(-5, 10);
199
+ }
200
+ break;
201
+ case 1:
202
+ {
203
+ //1: ax^2 + b //plausible (convex, y==y', y' > 0)
204
+ //a!=0, y=y' => ax^2+b=2ax <=> x=1+-sqrt(a(a-b))/a
205
+ const a = randint(10, 50);
206
+ const b = randint(-10, a);
207
+ nodeF = add(multiply(a, power("x", 2)), b);
208
+ const xPlus = 1 + Math.sqrt(a * (a - b)) / a;
209
+ x = xPlus;
210
+ }
211
+ break;
212
+ case 2:
213
+ {
214
+ //2: ax^2 + b //impossible (convex, y!=y', y' > 0)
215
+ const a = randint(10, 50);
216
+ const b = randint(-10, a);
217
+ nodeF = add(multiply(a, power("x", 2)), b);
218
+ const xPlus = 1 + Math.sqrt(a * (a - b)) / a;
219
+ const offset = 30;
220
+ x = xPlus + offset;
221
+ }
222
+ break;
223
+ case 3:
224
+ {
225
+ //3: ax^2 + b //impossible (convex, y==y', y' < 0)
226
+ const a = randint(10, 50);
227
+ const b = randint(-300, -100);
228
+ nodeF = add(multiply(a, power("x", 2)), b);
229
+ const xMinus = 1 - Math.sqrt(a * (a - b)) / a;
230
+ x = xMinus;
231
+ }
232
+ break;
233
+ case 4:
234
+ {
235
+ //4: ax^2 + b //impossible (concave, y==y', y' > 0)
236
+ const a = -randint(10, 50);
237
+ const b = randint(10, -a);
238
+ nodeF = add(multiply(a, power("x", 2)), b);
239
+ const xMinus = 1 + Math.sqrt(a * (a - b)) / a;
240
+ x = xMinus;
241
+ }
242
+ break;
243
+ case 5:
244
+ {
245
+ //5: ax^2 + b //impossible (concave, y!=y', y' > 0)
246
+ const a = -randint(10, 50);
247
+ const b = randint(10, -a);
248
+ nodeF = add(multiply(a, power("x", 2)), b);
249
+ const xMinus = 1 + Math.sqrt(a * (a - b)) / a;
250
+ const offset = -30;
251
+ x = xMinus + offset;
252
+ }
253
+ break;
254
+ case 6:
255
+ {
256
+ //6: ax^2 + b //impossible (concave, y==y', y' < 0)
257
+ const a = -randint(10, 50);
258
+ const b = randint(10, -a);
259
+ nodeF = add(multiply(a, power("x", 2)), b);
260
+ const xPlus = 1 - Math.sqrt(a * (a - b)) / a;
261
+ x = xPlus;
262
+ }
263
+ break;
264
+ default:
265
+ throw new Error("Unsupported rand: " + rand);
266
+ }
267
+ const s = nodeF.derivative().evaluate({ x: x });
268
+ const nodeT = (() => {
269
+ const x0 = x;
270
+ const y0 = nodeF.evaluate({ x: x0 });
271
+ let outNode;
272
+ try {
273
+ //parfois le simplify pète (too many iterations)
274
+ outNode = add(multiply(s, substract("x", x0)), y0).simplify({
275
+ towardsDistribute: true,
276
+ });
277
+ }
278
+ catch (_) {
279
+ outNode = add(multiply(s, substract("x", x0)), y0);
280
+ }
281
+ return outNode;
282
+ })();
283
+ function findX(xMin, xMax, funcCheck, counter, maxCounter) {
284
+ if (counter < maxCounter) {
285
+ const x = (xMin + xMax) / 2.0;
286
+ const chk = funcCheck(x);
287
+ if (chk === 0) {
288
+ return x;
289
+ }
290
+ else {
291
+ if (chk === 1) {
292
+ //too much
293
+ return findX(xMin, x, funcCheck, counter + 1, maxCounter);
294
+ }
295
+ else {
296
+ //not enough
297
+ return findX(x, xMax, funcCheck, counter + 1, maxCounter);
298
+ }
299
+ }
300
+ }
301
+ else {
302
+ return undefined;
303
+ }
304
+ }
305
+ function getPrettyCoordsFrameAroundX(nodeF, x) {
306
+ const x0 = x;
307
+ const y0 = nodeF.evaluate({ x: x0 });
308
+ function funcCheck(isRightSide) {
309
+ return (x) => {
310
+ const yF = nodeF.evaluate({ x });
311
+ const yT = nodeT.evaluate({ x });
312
+ const deltaMin = 0.1;
313
+ const deltaMax = 0.2;
314
+ const delta = Math.abs((yF - yT) / (y0 - yT));
315
+ const factorSide = isRightSide ? 1 : -1;
316
+ if (deltaMin < delta && delta < deltaMax) {
317
+ return 0;
318
+ }
319
+ else {
320
+ if (deltaMax < delta) {
321
+ return factorSide;
322
+ }
323
+ else {
324
+ return -factorSide;
325
+ }
326
+ }
327
+ };
328
+ }
329
+ const xGuessMinus = x0 - 20;
330
+ const xGuessPlus = x0 + 20;
331
+ const xMin = findX(xGuessMinus, x0, funcCheck(false), 0, 100);
332
+ const xMax = findX(x0, xGuessPlus, funcCheck(true), 0, 100);
333
+ const [yMin, yMax] = [xMin, xMax]
334
+ .map((x) => nodeF.evaluate({ x }))
335
+ .toSorted((v1, v2) => v1 - v2);
336
+ return [xMin, xMax, yMin, yMax];
337
+ }
338
+ const coordsFrame = getPrettyCoordsFrameAroundX(nodeF, x);
339
+ const identifiers = {
340
+ nodeIdsF: nodeF.toIdentifiers(),
341
+ nodeIdsT: nodeT.toIdentifiers(),
342
+ x: x,
343
+ s,
344
+ coordsFrame,
345
+ rand,
346
+ };
347
+ return getQuestionFromIdentifiers(identifiers);
348
+ };
349
+ const getQuestionFromIdentifiers = (identifiers) => {
350
+ const question = {
351
+ answer: getAnswer(identifiers),
352
+ instruction: getInstruction(identifiers),
353
+ answerFormat: "tex",
354
+ identifiers,
355
+ hint: getHint(identifiers),
356
+ correction: getCorrection(identifiers),
357
+ correctionGgbOptions: getCorrectionGGBOptions(identifiers),
358
+ ggbOptions: getGGBOptions(identifiers),
359
+ };
360
+ return question;
361
+ };
362
+ export const isPlausibleExpFromGraph = {
363
+ id: "isPlausibleExpFromGraph",
364
+ label: "Reconnaître une courbe vraisemblable de fonction exponentielle",
365
+ isSingleStep: true,
366
+ generator: (nb, opts) => getDistinctQuestions(() => getIsPlausibleExpFromGraphQuestion(opts), nb),
367
+ qcmTimer: 60,
368
+ freeTimer: 60,
369
+ getPropositions,
370
+ subject: "Mathématiques",
371
+ getQuestionFromIdentifiers,
372
+ hasGeogebra: true,
373
+ hasHintAndCorrection: true,
374
+ answerType: "QCU",
375
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"coefficientsIdentification.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/devForm/coefficientsIdentification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA2IF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"coefficientsIdentification.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/devForm/coefficientsIdentification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAqKF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
@@ -3,13 +3,39 @@ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinct
3
3
  import { RationalConstructor } from "../../../../../math/numbers/rationals/rational.js";
4
4
  import { TrinomNode } from "../../../../../tree/nodes/polynomials/trinomNode.js";
5
5
  import { randint } from "../../../../../math/utils/random/randint.js";
6
- import { NodeConstructor, } from "../../../../../tree/nodes/nodeConstructor.js";
6
+ import { NodeConstructor, reifyAlgebraic, } from "../../../../../tree/nodes/nodeConstructor.js";
7
7
  import { isFractionNode } from "../../../../../tree/nodes/operators/fractionNode.js";
8
8
  import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
9
9
  import { square } from "../../../../../tree/nodes/operators/powerNode.js";
10
10
  import { random } from "../../../../../utils/alea/random.js";
11
11
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
12
12
  import { rationalVEA } from "../../../../../exercises/vea/rationalVEA.js";
13
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
14
+ const getHint = () => {
15
+ return `Une fonction polynôme du second degré a pour forme développée :
16
+
17
+ $$
18
+ f(x) = ax^2 +bx + c
19
+ $$`;
20
+ };
21
+ const getCorrection = (identifiers) => {
22
+ const { aIdentifiers, bIdentifiers, cIdentifiers, isAsking } = identifiers;
23
+ const a = reifyAlgebraic(aIdentifiers);
24
+ const b = reifyAlgebraic(bIdentifiers);
25
+ const c = reifyAlgebraic(cIdentifiers);
26
+ const monom1 = multiply(a, "x^2");
27
+ const monom2 = multiply(b, "x");
28
+ return `On a :
29
+
30
+ $$
31
+ f(x) = ${add(monom1, add(monom2, c)).toTex({
32
+ forceTimesSign: true,
33
+ forceNoSimplification: true,
34
+ })}
35
+ $$
36
+
37
+ Le coefficient $${isAsking}$ de $f$ est donc $${getAnswer(identifiers)}$.`;
38
+ };
13
39
  const getPropositions = (n, { answer, aIdentifiers, bIdentifiers, cIdentifiers, isAsking }) => {
14
40
  const propositions = [];
15
41
  addValidProp(propositions, answer);
@@ -112,8 +138,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
112
138
  keys: getKeys(identifiers),
113
139
  answerFormat: "tex",
114
140
  identifiers,
115
- // hint: getHint(identifiers),
116
- // correction: getCorrection(identifiers),
141
+ hint: getHint(identifiers),
142
+ correction: getCorrection(identifiers),
117
143
  };
118
144
  return question;
119
145
  };
@@ -129,4 +155,5 @@ export const coefficientsIdentification = {
129
155
  isAnswerValid,
130
156
  subject: "Mathématiques",
131
157
  getQuestionFromIdentifiers,
158
+ hasHintAndCorrection: true,
132
159
  };
@@ -1 +1 @@
1
- {"version":3,"file":"deltaTrinom.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/deltaTrinom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0DF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
1
+ {"version":3,"file":"deltaTrinom.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/deltaTrinom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyFF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
@@ -2,10 +2,14 @@ import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../../exer
2
2
  import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
5
+ import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
6
+ import { square } from "../../../../../tree/nodes/operators/powerNode.js";
7
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
5
8
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
9
+ import { alignTex } from "../../../../../utils/latex/alignTex.js";
6
10
  const getInstruction = (identifiers) => {
7
11
  const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
8
- return `Soit $f$ la fonction polynôme du second degré définie par
12
+ return `Soit $f$ la fonction polynôme du second degré définie par :
9
13
 
10
14
  $$
11
15
  f(x) = ${trinom.toTree().toTex()}
@@ -13,6 +17,33 @@ $$
13
17
 
14
18
  Calculer le discriminant $\\Delta$ de $f$.`;
15
19
  };
20
+ const getHint = () => {
21
+ return `Si $f$ est une fonction polynôme du second degré définie par :
22
+
23
+ $$
24
+ f(x) = ax^2 + bx + c
25
+ $$
26
+
27
+ alors son discriminant $\\Delta$ vaut :
28
+
29
+ $$
30
+ \\Delta = b^2 - 4ac
31
+ $$`;
32
+ };
33
+ const getCorrection = (identifiers) => {
34
+ const { a, b, c } = identifiers;
35
+ const deltaNode = substract(square(b), multiply(4, multiply(a, c)));
36
+ return `La fonction $f$ est une fonction polynôme du second degré avec $a = ${a}$, $b = ${b}$ et $c = ${c}$.
37
+
38
+ Le discriminant $\\Delta$ vaut donc :
39
+
40
+ ${alignTex([
41
+ ["\\Delta", "=", "b^2 -4ac"],
42
+ ["", "=", deltaNode.toTex()],
43
+ ["", "=", deltaNode.simplify({ forbidAdditions: true }).toTex()],
44
+ ["", "=", deltaNode.simplify().toTex()],
45
+ ])}`;
46
+ };
16
47
  const getAnswer = (identifiers) => {
17
48
  const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
18
49
  const answer = trinom.getDelta() + "";
@@ -25,6 +56,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
25
56
  keys: [],
26
57
  answerFormat: "tex",
27
58
  identifiers,
59
+ hint: getHint(identifiers),
60
+ correction: getCorrection(identifiers),
28
61
  };
29
62
  return question;
30
63
  };
@@ -62,4 +95,5 @@ export const deltaTrinom = {
62
95
  isAnswerValid,
63
96
  subject: "Mathématiques",
64
97
  getQuestionFromIdentifiers,
98
+ hasHintAndCorrection: true,
65
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"paraboleExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CAIpB,CAAC;AAgTF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
1
+ {"version":3,"file":"paraboleExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CAIpB,CAAC;AAgTF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
@@ -274,7 +274,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
274
274
  export const paraboleExpressionReading = {
275
275
  id: "paraboleExpressionReading",
276
276
  connector: "\\iff",
277
- label: "Associer une expression algébrique à une parabole",
277
+ label: "Associer une expression algébrique à une parabole en lisant les racines",
278
278
  isSingleStep: true,
279
279
  generator: (nb, opts) => getDistinctQuestions(() => getParaboleExpressionReadingQuestion(opts), nb),
280
280
  qcmTimer: 60,
@@ -1 +1 @@
1
- {"version":3,"file":"alphaBetaInCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA+EF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAa1D,CAAC"}
1
+ {"version":3,"file":"alphaBetaInCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAqGF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
@@ -6,10 +6,29 @@ import { OppositeNode } from "../../../../../tree/nodes/functions/oppositeNode.j
6
6
  import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
7
7
  import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
8
8
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
9
+ const getHint = () => {
10
+ return `La forme canonique d'une fonction polynôme du second degré est :
11
+
12
+ $$
13
+ f(x) = a(x-\\alpha)^2 + \\beta
14
+ $$
15
+
16
+ où $\\alpha$ est l'abscisse du sommet de la parabole, et $\\beta$ son ordonnée.`;
17
+ };
18
+ const getCorrection = (identifiers) => {
19
+ const { a, alpha, beta } = identifiers;
20
+ return `La forme canonique d'une fonction polynôme du second degré est :
21
+
22
+ $$
23
+ f(x) = a(x-\\alpha)^2 + \\beta
24
+ $$
25
+
26
+ Ici, on a donc $a = ${a}$, $\\alpha = ${alpha}$ et $\\beta = ${beta}$.`;
27
+ };
9
28
  const getInstruction = (identifiers) => {
10
29
  const { param, a, alpha, beta } = identifiers;
11
30
  const trinom = TrinomConstructor.fromAlphaBeta({ a, alpha, beta });
12
- return `Soit $f$ la fonction définie par
31
+ return `Soit $f$ la fonction polynôme du second degré définie par sa forme canonique :
13
32
 
14
33
  $$
15
34
  f(x) = ${trinom.getCanonicalForm().toTex()}
@@ -32,6 +51,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
32
51
  answerFormat: "tex",
33
52
  startStatement: getStartStatement(identifiers),
34
53
  identifiers,
54
+ hint: getHint(identifiers),
55
+ correction: getCorrection(identifiers),
35
56
  };
36
57
  return question;
37
58
  };
@@ -77,4 +98,5 @@ export const alphaBetaInCanonicalForm = {
77
98
  isAnswerValid,
78
99
  subject: "Mathématiques",
79
100
  getQuestionFromIdentifiers,
101
+ hasHintAndCorrection: true,
80
102
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extremumFromCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"extremumFromCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiGF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -4,6 +4,32 @@ import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trino
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
5
5
  import { PointNode } from "../../../../../tree/nodes/geometry/pointNode.js";
6
6
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
7
+ const getHint = () => {
8
+ return `La forme canonique d'une fonction polynôme du second degré est :
9
+
10
+ $$
11
+ f(x) = a(x-\\alpha)^2 + \\beta
12
+ $$
13
+
14
+ où $\\alpha$ est l'abscisse du sommet de la parabole, et $\\beta$ son ordonnée.`;
15
+ };
16
+ const getCorrection = (identifiers) => {
17
+ const { a, b, c } = identifiers;
18
+ const trinom = new Trinom(a, b, c);
19
+ const alpha = trinom.getAlphaNode();
20
+ const beta = trinom.getBetaNode();
21
+ return `La forme canonique d'une fonction polynôme du second degré est :
22
+
23
+ $$
24
+ f(x) = a(x-\\alpha)^2 + \\beta
25
+ $$
26
+
27
+ où $\\alpha$ est l'abscisse du sommet de la parabole, et $\\beta$ son ordonnée.
28
+
29
+ Ici, on a donc $a = ${a}$, $\\alpha = ${alpha.toTex()}$ et $\\beta = ${beta.toTex()}$.
30
+
31
+ Les coordonnées du sommet de la parabole représentant $f$ sont donc $(${alpha.toTex()};${beta.toTex()})$.`;
32
+ };
7
33
  const getInstruction = (identifiers) => {
8
34
  const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
9
35
  return `Soit $f$ la fonction définie par
@@ -26,6 +52,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
26
52
  keys: ["S", "semicolon"],
27
53
  answerFormat: "tex",
28
54
  identifiers,
55
+ hint: getHint(identifiers),
56
+ correction: getCorrection(identifiers),
29
57
  };
30
58
  return question;
31
59
  };
@@ -67,4 +95,5 @@ export const extremumFromCanonicalForm = {
67
95
  isAnswerValid,
68
96
  subject: "Mathématiques",
69
97
  getQuestionFromIdentifiers,
98
+ hasHintAndCorrection: true,
70
99
  };
@@ -0,0 +1,3 @@
1
+ export * from "./varOfAEXPlusB.js";
2
+ export * from "./varOfAEXPlusBOverCEXPlusD.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/variations/exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./varOfAEXPlusB.js";
2
+ export * from "./varOfAEXPlusBOverCEXPlusD.js";
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ intervalAskedIndex: number;
6
+ };
7
+ export declare const varOfAEXPlusB: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=varOfAEXPlusB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"varOfAEXPlusB.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/variations/exp/varOfAEXPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAwFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAiB/C,CAAC"}