math-exercises 3.0.56 → 3.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +2 -0
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.js +46 -36
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +65 -13
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -4
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/facto1.js +184 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +43 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +23 -0
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +23 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +49 -0
- package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +68 -12
- package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/conversion/hoursToDecimal.js +73 -15
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +55 -6
- package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/massConversion.js +72 -16
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +72 -12
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts +8 -0
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +102 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts +7 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +52 -0
- package/lib/exercises/math/derivation/convexity/index.d.ts +4 -0
- package/lib/exercises/math/derivation/convexity/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/index.js +3 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts +7 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +134 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +79 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +85 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +86 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +76 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts +6 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/index.js +5 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +84 -0
- package/lib/exercises/math/derivation/derivative/index.d.ts +6 -27
- package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/index.js +6 -27
- package/lib/exercises/math/derivation/derivative/ln/index.d.ts +4 -0
- package/lib/exercises/math/derivation/derivative/ln/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +81 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +103 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +77 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +71 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +88 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.js +7 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +115 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +80 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +67 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +134 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +97 -0
- package/lib/exercises/math/derivation/derivative/power/index.d.ts +3 -0
- package/lib/exercises/math/derivation/derivative/power/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/index.js +2 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +122 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +118 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts +3 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +115 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +77 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +85 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +81 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +103 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +5 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +70 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +91 -0
- package/lib/exercises/math/derivation/derivativeNumberCalcul.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberCalcul.js +4 -2
- package/lib/exercises/math/derivation/index.d.ts +2 -0
- package/lib/exercises/math/derivation/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/index.js +2 -0
- package/lib/exercises/math/derivation/variations/index.d.ts +2 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts +11 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +168 -0
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +39 -22
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +7 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +38 -15
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +29 -8
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts +8 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +86 -0
- package/lib/exercises/math/equaDiff/index.d.ts +1 -1
- package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/index.js +1 -1
- package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +23 -11
- package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +3 -0
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +3 -0
- package/lib/exercises/math/functions/exponential/expSimplifiying.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expSimplifiying.js +83 -45
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +12 -5
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.js +63 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +68 -29
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +56 -4
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +71 -25
- package/lib/exercises/math/limits/polynomLimit.d.ts +1 -1
- package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +28 -9
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +29 -10
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +59 -16
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +55 -11
- package/lib/exercises/math/powers/index.d.ts +1 -0
- package/lib/exercises/math/powers/index.d.ts.map +1 -1
- package/lib/exercises/math/powers/index.js +1 -0
- package/lib/exercises/math/powers/powersDivision.d.ts +5 -2
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +68 -53
- package/lib/exercises/math/powers/powersMixOperations.d.ts +1 -0
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +88 -17
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts +10 -0
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -0
- package/lib/exercises/math/powers/powersOfTenMixOperations.js +129 -0
- package/lib/exercises/math/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +32 -3
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +1 -0
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +50 -10
- package/lib/exercises/math/primitive/klogUPrimitive.js +1 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +42 -11
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +8 -20
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/etendueList.js +4 -6
- package/lib/exercises/math/probaStat/stats1var/interquartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -9
- package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/median.js +19 -14
- package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianList.js +3 -0
- package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -11
- package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartilesList.js +18 -14
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/varianceList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceTable.js +4 -4
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +40 -2
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +32 -0
- package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +67 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +89 -0
- package/lib/exercises/pc/index.d.ts +5 -5
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +5 -5
- package/lib/index.d.ts +56 -45
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +0 -5
- package/lib/math/geometry/vector.d.ts +1 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +19 -0
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +2 -0
- package/lib/math/systems/generalSystem.d.ts +6 -1
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +137 -0
- package/lib/math/utils/arithmetic/lcm.js +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +4 -34
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts +7 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +17 -9
- package/lib/tree/nodes/functions/logNode.js +2 -4
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +35 -11
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +4 -3
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +5 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +3 -1
- package/lib/tree/parsers/latexParser.js +6 -2
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Decimal, DecimalConstructor, } from "../../../math/numbers/decimals/decimal.js";
|
|
2
2
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
3
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
4
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
3
5
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
4
6
|
import { doWhile } from "../../../utils/doWhile.js";
|
|
7
|
+
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
5
8
|
import { addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
6
9
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
7
10
|
const units = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
@@ -9,19 +12,76 @@ const getVolumeConversion = () => {
|
|
|
9
12
|
const randomUnitIndex = randint(0, 7);
|
|
10
13
|
const randomUnitInstructionIndex = randint(Math.max(0, randomUnitIndex - 2), Math.min(7, randomUnitIndex + 3), [randomUnitIndex]);
|
|
11
14
|
const randomVolume = doWhile(() => DecimalConstructor.random(0, 1000, randint(0, 4)), (x) => x.value === 0);
|
|
12
|
-
const
|
|
15
|
+
const identifiers = {
|
|
16
|
+
randomUnitIndex,
|
|
17
|
+
randomUnitInstructionIndex,
|
|
18
|
+
randomVolume: randomVolume.value,
|
|
19
|
+
};
|
|
20
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
21
|
+
};
|
|
22
|
+
const getInstruction = (identifiers) => {
|
|
23
|
+
const { randomUnitIndex, randomUnitInstructionIndex, randomVolume } = identifiers;
|
|
24
|
+
return `Compléter :
|
|
25
|
+
|
|
26
|
+
$$
|
|
27
|
+
${randomVolume.frenchify()} \\textrm{${units[randomUnitIndex]}}^3 = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}^3
|
|
28
|
+
$$`;
|
|
29
|
+
};
|
|
30
|
+
const getAnswer = (identifiers) => {
|
|
31
|
+
const { randomUnitIndex, randomUnitInstructionIndex, randomVolume } = identifiers;
|
|
32
|
+
const answer = new Decimal(randomVolume)
|
|
33
|
+
.multiplyByPowerOfTen(3 * (randomUnitIndex - randomUnitInstructionIndex))
|
|
34
|
+
.value.frenchify();
|
|
35
|
+
return answer;
|
|
36
|
+
};
|
|
37
|
+
const getHint = (identifiers) => {
|
|
38
|
+
const { randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
39
|
+
const unit = units[randomUnitIndex];
|
|
40
|
+
const target = units[randomUnitInstructionIndex];
|
|
41
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
42
|
+
return `On rappelle que :
|
|
43
|
+
|
|
44
|
+
$$
|
|
45
|
+
1 \\ \\textrm{${unit}}^3 = ${space > 0
|
|
46
|
+
? Math.pow(10, space * 3)
|
|
47
|
+
: frac(1, Math.pow(10, -(space * 3))).toTex()} \\ \\textrm{${target}}^3
|
|
48
|
+
$$`;
|
|
49
|
+
};
|
|
50
|
+
const getCorrection = (identifiers) => {
|
|
51
|
+
const { randomVolume, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
52
|
+
const unit = units[randomUnitIndex];
|
|
53
|
+
const target = units[randomUnitInstructionIndex];
|
|
54
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
55
|
+
const coeff = space > 0
|
|
56
|
+
? Math.pow(10, space * 3).toTree()
|
|
57
|
+
: frac(1, Math.pow(10, -(space * 3)));
|
|
58
|
+
return `On sait que :
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
1 \\ \\textrm{${unit}}^3 = ${coeff.toTex()} \\ \\textrm{${target}}^3
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
Il suffit alors de multiplier $${randomVolume.frenchify()}$ par $${coeff.toTex()}$ :
|
|
65
|
+
|
|
66
|
+
${alignTex([
|
|
67
|
+
[
|
|
68
|
+
`${randomVolume.frenchify()} \\textrm{${unit}}^3 `,
|
|
69
|
+
"=",
|
|
70
|
+
`${multiply(coeff, randomVolume).toTex()}\\ \\textrm{${target}}^3`,
|
|
71
|
+
],
|
|
72
|
+
["", "=", `${getAnswer(identifiers)}\\ \\textrm{${target}}^3`],
|
|
73
|
+
])}
|
|
74
|
+
`;
|
|
75
|
+
};
|
|
76
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
13
77
|
const question = {
|
|
14
|
-
instruction:
|
|
15
|
-
|
|
16
|
-
.replace(".", ",")} \\textrm{${units[randomUnitIndex]}}^3 = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}^3$`,
|
|
17
|
-
answer,
|
|
78
|
+
instruction: getInstruction(identifiers),
|
|
79
|
+
answer: getAnswer(identifiers),
|
|
18
80
|
keys: [],
|
|
19
81
|
answerFormat: "tex",
|
|
20
|
-
identifiers
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
randomVolume: randomVolume.value,
|
|
24
|
-
},
|
|
82
|
+
identifiers,
|
|
83
|
+
hint: getHint(identifiers),
|
|
84
|
+
correction: getCorrection(identifiers),
|
|
25
85
|
};
|
|
26
86
|
return question;
|
|
27
87
|
};
|
|
@@ -45,8 +105,6 @@ export const volumeConversion = {
|
|
|
45
105
|
id: "volumeConversion",
|
|
46
106
|
connector: "=",
|
|
47
107
|
label: "Conversion de volumes",
|
|
48
|
-
levels: ["6ème", "5ème", "CAP", "2ndPro"],
|
|
49
|
-
sections: ["Conversions"],
|
|
50
108
|
isSingleStep: true,
|
|
51
109
|
generator: (nb) => getDistinctQuestions(getVolumeConversion, nb),
|
|
52
110
|
getPropositions,
|
|
@@ -54,4 +112,6 @@ export const volumeConversion = {
|
|
|
54
112
|
qcmTimer: 60,
|
|
55
113
|
freeTimer: 60,
|
|
56
114
|
subject: "Mathématiques",
|
|
115
|
+
getQuestionFromIdentifiers,
|
|
116
|
+
hasHintAndCorrection: true,
|
|
57
117
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
askConvex: boolean;
|
|
4
|
+
quadcoeffs: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const convexityQuadrinomials: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=convexityQuadrinomials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convexityQuadrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/convexity/convexityQuadrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAqIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Polynomial, PolynomialConstructor, } from "../../../../math/polynomials/polynomial.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../tree/nodes/numbers/infiniteNode.js";
|
|
6
|
+
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
7
|
+
import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
|
+
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
|
|
10
|
+
import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
|
|
11
|
+
import { intervalParser } from "../../../../tree/parsers/intervalParser.js";
|
|
12
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
13
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
14
|
+
const getInstruction = (identifiers) => {
|
|
15
|
+
const { askConvex, quadcoeffs } = identifiers;
|
|
16
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
17
|
+
const questionType = askConvex ? "convexe" : "concave";
|
|
18
|
+
return `Soit la fonction $f$ définie par :
|
|
19
|
+
|
|
20
|
+
$$
|
|
21
|
+
f(x) = ${quadrinomial.toTex()}
|
|
22
|
+
$$
|
|
23
|
+
|
|
24
|
+
Sur quelle intervalle $f$ est-elle ${questionType} ?`;
|
|
25
|
+
};
|
|
26
|
+
const getAnswer = (identifiers) => {
|
|
27
|
+
const { askConvex, quadcoeffs } = identifiers;
|
|
28
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
29
|
+
const secondderivative = quadrinomial.derivate().derivate();
|
|
30
|
+
const seconddcoeffs = secondderivative.coefficients;
|
|
31
|
+
const inflexionPoint = new FractionNode(new MultiplyNode(seconddcoeffs[0].toTree(), new NumberNode(-1)), seconddcoeffs[1].toTree()).simplify();
|
|
32
|
+
let interval;
|
|
33
|
+
if (askConvex) {
|
|
34
|
+
interval =
|
|
35
|
+
quadcoeffs[3] > 0
|
|
36
|
+
? new IntervalNode(inflexionPoint, PlusInfinityNode, ClosureType.OO).toTex()
|
|
37
|
+
: new IntervalNode(MinusInfinityNode, inflexionPoint, ClosureType.OO).toTex();
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
interval =
|
|
41
|
+
quadcoeffs[3] <= 0
|
|
42
|
+
? new IntervalNode(inflexionPoint, PlusInfinityNode, ClosureType.OO).toTex()
|
|
43
|
+
: new IntervalNode(MinusInfinityNode, inflexionPoint, ClosureType.OO).toTex();
|
|
44
|
+
}
|
|
45
|
+
return interval;
|
|
46
|
+
};
|
|
47
|
+
const getConvexityQuadrinomialsQuestion = () => {
|
|
48
|
+
const quadrinomial = PolynomialConstructor.randomWithOrder(3);
|
|
49
|
+
const quadcoeffs = quadrinomial.coefficients;
|
|
50
|
+
const askConvex = coinFlip();
|
|
51
|
+
const identifiers = { askConvex, quadcoeffs };
|
|
52
|
+
const question = {
|
|
53
|
+
answer: getAnswer(identifiers),
|
|
54
|
+
instruction: getInstruction(identifiers),
|
|
55
|
+
keys: ["rbracket", "lbracket", "semicolon", "infty", "reals"],
|
|
56
|
+
answerFormat: "tex",
|
|
57
|
+
identifiers,
|
|
58
|
+
};
|
|
59
|
+
return question;
|
|
60
|
+
};
|
|
61
|
+
const getPropositions = (n, { answer, quadcoeffs }) => {
|
|
62
|
+
const propositions = [];
|
|
63
|
+
addValidProp(propositions, answer, "tex");
|
|
64
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
65
|
+
const secondderivative = quadrinomial.derivate().derivate();
|
|
66
|
+
const seconddcoeffs = secondderivative.coefficients;
|
|
67
|
+
const inflexionPoint = new FractionNode(new MultiplyNode(seconddcoeffs[0].toTree(), new NumberNode(-1)), seconddcoeffs[1].toTree()).simplify();
|
|
68
|
+
const wrongInterval1 = new IntervalNode(inflexionPoint, PlusInfinityNode, ClosureType.OO).toTex();
|
|
69
|
+
const wrongInterval2 = new IntervalNode(MinusInfinityNode, inflexionPoint, ClosureType.OO).toTex();
|
|
70
|
+
const wrongInterval3 = new IntervalNode(MinusInfinityNode, PlusInfinityNode, ClosureType.OO).toTex();
|
|
71
|
+
const wrongInterval4 = new IntervalNode(new NumberNode(randint(-1, 2)), PlusInfinityNode, ClosureType.FO).toTex();
|
|
72
|
+
tryToAddWrongProp(propositions, wrongInterval1);
|
|
73
|
+
tryToAddWrongProp(propositions, wrongInterval2);
|
|
74
|
+
tryToAddWrongProp(propositions, wrongInterval3);
|
|
75
|
+
tryToAddWrongProp(propositions, wrongInterval4);
|
|
76
|
+
return shuffleProps(propositions, n);
|
|
77
|
+
};
|
|
78
|
+
const isAnswerValid = (ans, { answer, askConvex, quadcoeffs }) => {
|
|
79
|
+
try {
|
|
80
|
+
const parsed = intervalParser(ans);
|
|
81
|
+
if (!parsed)
|
|
82
|
+
return false;
|
|
83
|
+
return parsed.simplify().toTex() === answer;
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
return handleVEAError(err);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export const convexityQuadrinomials = {
|
|
90
|
+
id: "convexityQuadrinomials",
|
|
91
|
+
label: "Convexité des fonctions polynomiales de degré $3$",
|
|
92
|
+
isSingleStep: true,
|
|
93
|
+
generator: (nb) => getDistinctQuestions(getConvexityQuadrinomialsQuestion, nb),
|
|
94
|
+
qcmTimer: 60,
|
|
95
|
+
freeTimer: 60,
|
|
96
|
+
answerType: "QCU",
|
|
97
|
+
getPropositions,
|
|
98
|
+
isAnswerValid,
|
|
99
|
+
subject: "Mathématiques",
|
|
100
|
+
getAnswer,
|
|
101
|
+
getInstruction,
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convexityTrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/convexity/convexityTrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA0CF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { TrinomConstructor } from "../../../../math/polynomials/trinom.js";
|
|
4
|
+
const getInstruction = (identifiers) => {
|
|
5
|
+
const trinom = TrinomConstructor.fromCoeffs(identifiers.coeffs);
|
|
6
|
+
return `Soit la fonction $f$ définie par :
|
|
7
|
+
|
|
8
|
+
$$
|
|
9
|
+
f(x) = ${trinom.toTex()}
|
|
10
|
+
$$
|
|
11
|
+
|
|
12
|
+
Sur $\\mathbb{R}$, $f$ est :`;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const trinom = TrinomConstructor.fromCoeffs(identifiers.coeffs);
|
|
16
|
+
const isConvex = trinom.a > 0 ? "Convexe" : "Concave";
|
|
17
|
+
return isConvex;
|
|
18
|
+
};
|
|
19
|
+
const getConvexityTrinomialsQuestion = () => {
|
|
20
|
+
const trinom = TrinomConstructor.random();
|
|
21
|
+
const identifiers = { coeffs: trinom.coefficients };
|
|
22
|
+
const question = {
|
|
23
|
+
answer: getAnswer(identifiers),
|
|
24
|
+
instruction: getInstruction(identifiers),
|
|
25
|
+
keys: [],
|
|
26
|
+
answerFormat: "raw",
|
|
27
|
+
identifiers,
|
|
28
|
+
};
|
|
29
|
+
return question;
|
|
30
|
+
};
|
|
31
|
+
const getPropositions = (n, { answer }) => {
|
|
32
|
+
const propositions = [];
|
|
33
|
+
addValidProp(propositions, answer, "raw");
|
|
34
|
+
tryToAddWrongProp(propositions, "Concave", "raw");
|
|
35
|
+
tryToAddWrongProp(propositions, "Convexe", "raw");
|
|
36
|
+
tryToAddWrongProp(propositions, "Ni concave, ni convexe", "raw");
|
|
37
|
+
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
38
|
+
return shuffleProps(propositions, n);
|
|
39
|
+
};
|
|
40
|
+
export const convexityTrinomials = {
|
|
41
|
+
id: "convexityTrinomials",
|
|
42
|
+
label: "Déterminer la convexité d'un trinôme",
|
|
43
|
+
isSingleStep: true,
|
|
44
|
+
generator: (nb) => getDistinctQuestions(getConvexityTrinomialsQuestion, nb),
|
|
45
|
+
qcmTimer: 60,
|
|
46
|
+
freeTimer: 60,
|
|
47
|
+
answerType: "QCU",
|
|
48
|
+
getPropositions,
|
|
49
|
+
subject: "Mathématiques",
|
|
50
|
+
getAnswer,
|
|
51
|
+
getInstruction,
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/convexity/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inflexionPointQuadrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/convexity/inflexionPointQuadrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAsJF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAkB7D,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { rationalVEA } from "../../../../exercises/vea/rationalVEA.js";
|
|
4
|
+
import { Polynomial, PolynomialConstructor, } from "../../../../math/polynomials/polynomial.js";
|
|
5
|
+
import { Trinom } from "../../../../math/polynomials/trinom.js";
|
|
6
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
|
+
import { equationResolutionTex } from "../../../../tree/nodes/equations/equalNode.js";
|
|
8
|
+
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
9
|
+
import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
10
|
+
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
11
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
const getInstruction = ({ quadcoeffs }) => {
|
|
13
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
14
|
+
return `Soit la fonction $f$ définie par :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
f(x) = ${quadrinomial.toTex()}
|
|
18
|
+
$$
|
|
19
|
+
|
|
20
|
+
Calculer l'abscisse de son point d'inflexion.`;
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = ({ quadcoeffs }) => {
|
|
23
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
24
|
+
const secondderivative = quadrinomial.derivate().derivate();
|
|
25
|
+
const seconddcoeffs = secondderivative.coefficients;
|
|
26
|
+
return new FractionNode(new MultiplyNode(seconddcoeffs[0].toTree(), new NumberNode(-1)), seconddcoeffs[1].toTree())
|
|
27
|
+
.simplify()
|
|
28
|
+
.toTex();
|
|
29
|
+
};
|
|
30
|
+
const getInflexionPointQuadrinomialsQuestion = () => {
|
|
31
|
+
let quadrinomial;
|
|
32
|
+
let quadcoeffs;
|
|
33
|
+
do {
|
|
34
|
+
quadrinomial = PolynomialConstructor.randomWithOrder(3);
|
|
35
|
+
quadcoeffs = quadrinomial.coefficients;
|
|
36
|
+
} while (quadcoeffs[1] === 0 || quadcoeffs[2] === 0);
|
|
37
|
+
const identifiers = { quadcoeffs };
|
|
38
|
+
const question = {
|
|
39
|
+
answer: getAnswer(identifiers),
|
|
40
|
+
instruction: getInstruction(identifiers),
|
|
41
|
+
keys: [],
|
|
42
|
+
answerFormat: "tex",
|
|
43
|
+
identifiers,
|
|
44
|
+
hint: getHint(identifiers),
|
|
45
|
+
correction: getCorrection(identifiers),
|
|
46
|
+
};
|
|
47
|
+
return question;
|
|
48
|
+
};
|
|
49
|
+
const getPropositions = (n, { answer, quadcoeffs }) => {
|
|
50
|
+
const propositions = [];
|
|
51
|
+
addValidProp(propositions, answer);
|
|
52
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
53
|
+
const firstdderivative = quadrinomial.derivate();
|
|
54
|
+
const trinomialcoeffs = firstdderivative.coefficients;
|
|
55
|
+
const trinomial = new Trinom(trinomialcoeffs[2], trinomialcoeffs[1], trinomialcoeffs[0]);
|
|
56
|
+
const firstroots = trinomial.getRootsNode();
|
|
57
|
+
const secondderivative = quadrinomial.derivate().derivate();
|
|
58
|
+
const seconddcoeffs = secondderivative.coefficients;
|
|
59
|
+
const wrongAnswer1 = new FractionNode(seconddcoeffs[0].toTree(), seconddcoeffs[1].toTree())
|
|
60
|
+
.simplify()
|
|
61
|
+
.toTex();
|
|
62
|
+
const wrongAnswer2 = new FractionNode(seconddcoeffs[1].toTree(), seconddcoeffs[0].toTree())
|
|
63
|
+
.simplify()
|
|
64
|
+
.toTex();
|
|
65
|
+
tryToAddWrongProp(propositions, wrongAnswer1);
|
|
66
|
+
tryToAddWrongProp(propositions, wrongAnswer2);
|
|
67
|
+
if (firstroots.length != 0) {
|
|
68
|
+
for (let i = 0; i < firstroots.length; i++) {
|
|
69
|
+
tryToAddWrongProp(propositions, firstroots[i].simplify().toTex());
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
while (propositions.length < n) {
|
|
73
|
+
tryToAddWrongProp(propositions, randint(-10, 10).toString());
|
|
74
|
+
}
|
|
75
|
+
return shuffleProps(propositions, n);
|
|
76
|
+
};
|
|
77
|
+
const isAnswerValid = (ans, { answer, quadcoeffs }) => {
|
|
78
|
+
try {
|
|
79
|
+
return rationalVEA(ans, answer);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
return handleVEAError(err);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const getHint = ({ quadcoeffs }) => {
|
|
86
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
87
|
+
return `Pour trouver l'abscisse du point d'inflexion, on doit résoudre l'équation $f''(x) = 0$.`;
|
|
88
|
+
};
|
|
89
|
+
const getCorrection = ({ quadcoeffs }) => {
|
|
90
|
+
const quadrinomial = new Polynomial(quadcoeffs);
|
|
91
|
+
const firstDerivative = quadrinomial.derivate();
|
|
92
|
+
const secondDerivative = firstDerivative.derivate();
|
|
93
|
+
const seconddcoeffs = secondDerivative.coefficients;
|
|
94
|
+
const inflexionPoint = new FractionNode(new MultiplyNode(seconddcoeffs[0].toTree(), new NumberNode(-1)), seconddcoeffs[1].toTree()).simplify();
|
|
95
|
+
return `Le point d'inflexion est l'abscisse où la dérivée seconde s'annule.
|
|
96
|
+
|
|
97
|
+
- La dérivée première est :
|
|
98
|
+
|
|
99
|
+
$$
|
|
100
|
+
f'(x) = ${firstDerivative.toTex()}
|
|
101
|
+
$$
|
|
102
|
+
|
|
103
|
+
- La dérivée seconde est :
|
|
104
|
+
|
|
105
|
+
$$
|
|
106
|
+
f''(x) = ${secondDerivative.toTex()}
|
|
107
|
+
$$
|
|
108
|
+
|
|
109
|
+
- Résolvons $f''(x) = 0$ :
|
|
110
|
+
|
|
111
|
+
$$
|
|
112
|
+
${equationResolutionTex(seconddcoeffs[1].toTree(), seconddcoeffs[0].toTree(), (0).toTree(), (0).toTree())}
|
|
113
|
+
$$
|
|
114
|
+
|
|
115
|
+
L'abscisse du point d'inflexion est donc $${inflexionPoint.toTex()}$.`;
|
|
116
|
+
};
|
|
117
|
+
export const inflexionPointQuadrinomials = {
|
|
118
|
+
id: "inflexionPointQuadrinomials",
|
|
119
|
+
label: "Calcul du point d'inflexion",
|
|
120
|
+
levels: ["TermSpé"],
|
|
121
|
+
isSingleStep: true,
|
|
122
|
+
sections: ["Dérivation"],
|
|
123
|
+
generator: (nb) => getDistinctQuestions(getInflexionPointQuadrinomialsQuestion, nb),
|
|
124
|
+
qcmTimer: 60,
|
|
125
|
+
freeTimer: 60,
|
|
126
|
+
getPropositions,
|
|
127
|
+
isAnswerValid,
|
|
128
|
+
subject: "Mathématiques",
|
|
129
|
+
getInstruction,
|
|
130
|
+
getAnswer,
|
|
131
|
+
getHint,
|
|
132
|
+
getCorrection,
|
|
133
|
+
hasHintAndCorrection: true,
|
|
134
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
affine1Coeffs: number[];
|
|
4
|
+
affine2Coeffs: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const expDerivativeFour: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=expDerivativeFour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expDerivativeFour.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeFour.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAgFF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
|
|
4
|
+
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
5
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
7
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
const { affine1Coeffs, affine2Coeffs } = identifiers;
|
|
10
|
+
const affine1 = new Affine(affine1Coeffs[1], affine1Coeffs[0]);
|
|
11
|
+
const affine2 = new Affine(affine2Coeffs[1], affine2Coeffs[0]);
|
|
12
|
+
const exp = new ExpNode(affine2.toTree());
|
|
13
|
+
const fct = new MultiplyNode(affine1.toTree(), exp);
|
|
14
|
+
return `Déterminer la dérivée de la fonction $f$ définie par :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
f(x) = ${fct.toTex()}
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { affine1Coeffs, affine2Coeffs } = identifiers;
|
|
22
|
+
const affine1 = new Affine(affine1Coeffs[1], affine1Coeffs[0]);
|
|
23
|
+
const affine2 = new Affine(affine2Coeffs[1], affine2Coeffs[0]);
|
|
24
|
+
const exp = new ExpNode(affine2.toTree());
|
|
25
|
+
const deriv = new MultiplyNode(new Affine(affine2.a * affine1.a, affine1.a + affine2.a * affine1.b).toTree(), exp);
|
|
26
|
+
return deriv.simplify().toTex();
|
|
27
|
+
};
|
|
28
|
+
const getExpDerivativeFourQuestion = () => {
|
|
29
|
+
const affine1 = AffineConstructor.random();
|
|
30
|
+
const affine2 = AffineConstructor.random();
|
|
31
|
+
const identifiers = {
|
|
32
|
+
affine1Coeffs: affine1.coefficients,
|
|
33
|
+
affine2Coeffs: affine2.coefficients,
|
|
34
|
+
};
|
|
35
|
+
//ae^cx+d + c(ax+b)e^cx+d = (a+c(ax+b))e^cx+d = (cax + a +cb) e^cx+d
|
|
36
|
+
const question = {
|
|
37
|
+
answer: getAnswer(identifiers),
|
|
38
|
+
instruction: getInstruction(identifiers),
|
|
39
|
+
keys: ["x", "epower", "exp"],
|
|
40
|
+
answerFormat: "tex",
|
|
41
|
+
identifiers,
|
|
42
|
+
};
|
|
43
|
+
return question;
|
|
44
|
+
};
|
|
45
|
+
const getPropositions = (n, { answer }) => {
|
|
46
|
+
const propositions = [];
|
|
47
|
+
addValidProp(propositions, answer);
|
|
48
|
+
while (propositions.length < n) {
|
|
49
|
+
tryToAddWrongProp(propositions, new MultiplyNode(AffineConstructor.random().toTree(), new ExpNode(AffineConstructor.random().toTree())).toTex());
|
|
50
|
+
}
|
|
51
|
+
return shuffleProps(propositions, n);
|
|
52
|
+
};
|
|
53
|
+
const isAnswerValid = (ans, { answer, affine1Coeffs, affine2Coeffs }) => {
|
|
54
|
+
try {
|
|
55
|
+
const parsed = parseAlgebraic(ans);
|
|
56
|
+
if (!parsed)
|
|
57
|
+
return false;
|
|
58
|
+
return parsed.simplify().toTex() === answer;
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
return handleVEAError(err);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export const expDerivativeFour = {
|
|
65
|
+
id: "expDerivativeFour",
|
|
66
|
+
connector: "=",
|
|
67
|
+
label: "Dérivée de $(ax+b)e^{cx+d}$",
|
|
68
|
+
levels: ["1reSpé", "TermSpé", "MathComp"],
|
|
69
|
+
isSingleStep: true,
|
|
70
|
+
sections: ["Dérivation", "Exponentielle"],
|
|
71
|
+
generator: (nb) => getDistinctQuestions(getExpDerivativeFourQuestion, nb),
|
|
72
|
+
qcmTimer: 60,
|
|
73
|
+
freeTimer: 60,
|
|
74
|
+
getPropositions,
|
|
75
|
+
isAnswerValid,
|
|
76
|
+
subject: "Mathématiques",
|
|
77
|
+
getInstruction,
|
|
78
|
+
getAnswer,
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Affine } from "../../../../../math/polynomials/affine.js";
|
|
4
|
+
import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
|
|
5
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
6
|
+
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
7
|
+
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
8
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
10
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const { a, b } = identifiers;
|
|
13
|
+
const affine = new Polynomial([b, a]);
|
|
14
|
+
const myfunction = new ExpNode(affine.toTree());
|
|
15
|
+
return `Déterminer la dérivée de la fonction $f$ définie par :
|
|
16
|
+
|
|
17
|
+
$$
|
|
18
|
+
f(x) = ${myfunction.toTex()}
|
|
19
|
+
$$`;
|
|
20
|
+
};
|
|
21
|
+
const getAnswer = (identifiers) => {
|
|
22
|
+
const { a, b } = identifiers;
|
|
23
|
+
const affine = new Polynomial([b, a]);
|
|
24
|
+
const myfunction = new ExpNode(affine.toTree());
|
|
25
|
+
const derivative = new MultiplyNode(new NumberNode(a), myfunction);
|
|
26
|
+
const answer = derivative.toTex();
|
|
27
|
+
return answer;
|
|
28
|
+
};
|
|
29
|
+
const getExpDerivative = () => {
|
|
30
|
+
const a = randint(-9, 10, [0]);
|
|
31
|
+
const b = randint(-9, 10);
|
|
32
|
+
const identifiers = { a, b };
|
|
33
|
+
const question = {
|
|
34
|
+
instruction: getInstruction(identifiers),
|
|
35
|
+
startStatement: "f'(x)",
|
|
36
|
+
answer: getAnswer(identifiers),
|
|
37
|
+
keys: ["x", "epower", "exp"],
|
|
38
|
+
answerFormat: "tex",
|
|
39
|
+
identifiers,
|
|
40
|
+
};
|
|
41
|
+
return question;
|
|
42
|
+
};
|
|
43
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
44
|
+
const propositions = [];
|
|
45
|
+
addValidProp(propositions, answer);
|
|
46
|
+
const affine = new Affine(a, b);
|
|
47
|
+
const myfunction = new ExpNode(affine.toTree());
|
|
48
|
+
tryToAddWrongProp(propositions, myfunction.toTex());
|
|
49
|
+
tryToAddWrongProp(propositions, new MultiplyNode(affine.toTree(), myfunction).toTex());
|
|
50
|
+
tryToAddWrongProp(propositions, new ExpNode(new NumberNode(a)).toTex());
|
|
51
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(b), myfunction).toTex());
|
|
52
|
+
while (propositions.length < n)
|
|
53
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(randint(-9, 10)), myfunction).toTex());
|
|
54
|
+
return shuffleProps(propositions, n);
|
|
55
|
+
};
|
|
56
|
+
const isAnswerValid = (ans, { answer, a, b }) => {
|
|
57
|
+
try {
|
|
58
|
+
const parsed = parseAlgebraic(ans);
|
|
59
|
+
if (!parsed)
|
|
60
|
+
return false;
|
|
61
|
+
return (parsed
|
|
62
|
+
.simplify({
|
|
63
|
+
towardsDistribute: true,
|
|
64
|
+
forbidFactorize: true,
|
|
65
|
+
})
|
|
66
|
+
.toTex() === answer);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return handleVEAError(err);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export const expDerivativeOne = {
|
|
73
|
+
id: "expDerivativeOne",
|
|
74
|
+
connector: "=",
|
|
75
|
+
label: "Dérivée de $\\exp(ax + b)$",
|
|
76
|
+
isSingleStep: false,
|
|
77
|
+
generator: (nb) => getDistinctQuestions(getExpDerivative, nb),
|
|
78
|
+
qcmTimer: 60,
|
|
79
|
+
freeTimer: 60,
|
|
80
|
+
getPropositions,
|
|
81
|
+
isAnswerValid,
|
|
82
|
+
subject: "Mathématiques",
|
|
83
|
+
getAnswer,
|
|
84
|
+
getInstruction,
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|