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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
|
|
4
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
|
+
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
6
|
+
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
7
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.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 myfunction = new MultiplyNode(new Polynomial([b, a]).toTree(), new ExpNode(new VariableNode("x")));
|
|
14
|
+
return `Déterminer la dérivée de la fonction $f$ définie par :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
f(x) = ${myfunction.toTex()}
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getAnswerNode = (identifiers) => {
|
|
21
|
+
const { a, b } = identifiers;
|
|
22
|
+
const derivative = new MultiplyNode(new Polynomial([b + a, a]).toTree(), new ExpNode(new VariableNode("x")));
|
|
23
|
+
return derivative;
|
|
24
|
+
};
|
|
25
|
+
const getAnswer = (identifiers) => {
|
|
26
|
+
return getAnswerNode(identifiers).simplify().toTex();
|
|
27
|
+
};
|
|
28
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
29
|
+
const question = {
|
|
30
|
+
instruction: getInstruction(identifiers),
|
|
31
|
+
startStatement: "f'(x)",
|
|
32
|
+
answer: getAnswer(identifiers),
|
|
33
|
+
keys: ["x", "epower", "exp"],
|
|
34
|
+
answerFormat: "tex",
|
|
35
|
+
identifiers,
|
|
36
|
+
};
|
|
37
|
+
return question;
|
|
38
|
+
};
|
|
39
|
+
const getExpDerivativeThree = () => {
|
|
40
|
+
const a = randint(-9, 10, [0]);
|
|
41
|
+
const b = randint(-9, 10);
|
|
42
|
+
const identifiers = { a, b };
|
|
43
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
44
|
+
};
|
|
45
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
46
|
+
const propositions = [];
|
|
47
|
+
addValidProp(propositions, answer);
|
|
48
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))).toTex());
|
|
49
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new Polynomial([b + a, -a]).toTree(), new ExpNode(new VariableNode("x"))).toTex());
|
|
50
|
+
tryToAddWrongProp(propositions, a + "");
|
|
51
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new MultiplyNode(new NumberNode(a), new VariableNode("x")), new ExpNode(new VariableNode("x"))).toTex());
|
|
52
|
+
return shuffleProps(propositions, n);
|
|
53
|
+
};
|
|
54
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
55
|
+
try {
|
|
56
|
+
const parsed = parseAlgebraic(ans);
|
|
57
|
+
const node = getAnswerNode(identifiers);
|
|
58
|
+
return (parsed
|
|
59
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
60
|
+
.toTex() ===
|
|
61
|
+
node
|
|
62
|
+
.simplify({
|
|
63
|
+
towardsDistribute: true,
|
|
64
|
+
forbidFactorize: true,
|
|
65
|
+
})
|
|
66
|
+
.toTex());
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return handleVEAError(err);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export const expDerivativeThree = {
|
|
73
|
+
id: "expDerivativeThree",
|
|
74
|
+
connector: "=",
|
|
75
|
+
label: "Dérivée de $(ax+b) \\times \\exp(x)$",
|
|
76
|
+
isSingleStep: false,
|
|
77
|
+
generator: (nb) => getDistinctQuestions(getExpDerivativeThree, nb),
|
|
78
|
+
getPropositions,
|
|
79
|
+
qcmTimer: 60,
|
|
80
|
+
freeTimer: 60,
|
|
81
|
+
isAnswerValid,
|
|
82
|
+
subject: "Mathématiques",
|
|
83
|
+
getInstruction,
|
|
84
|
+
getAnswer,
|
|
85
|
+
getQuestionFromIdentifiers,
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeTwo.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;AA4EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
4
|
+
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js"; // Importer le nœud d'exponentielle
|
|
5
|
+
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
6
|
+
import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.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 myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))), new NumberNode(b));
|
|
14
|
+
return `Déterminer la dérivée de la fonction $f$ définie par :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
f(x) = ${myfunction.toTex()}
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { a, b } = identifiers;
|
|
22
|
+
const derivative = new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x")));
|
|
23
|
+
const answer = derivative.toTex();
|
|
24
|
+
return answer;
|
|
25
|
+
};
|
|
26
|
+
const getExpDerivative = () => {
|
|
27
|
+
const a = randint(-9, 10, [0]);
|
|
28
|
+
const b = randint(-9, 10);
|
|
29
|
+
const identifiers = { a, b };
|
|
30
|
+
const question = {
|
|
31
|
+
instruction: getInstruction(identifiers),
|
|
32
|
+
startStatement: "f'(x)",
|
|
33
|
+
answer: getAnswer(identifiers),
|
|
34
|
+
keys: ["x", "epower", "exp"],
|
|
35
|
+
answerFormat: "tex",
|
|
36
|
+
identifiers,
|
|
37
|
+
};
|
|
38
|
+
return question;
|
|
39
|
+
};
|
|
40
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
41
|
+
const propositions = [];
|
|
42
|
+
addValidProp(propositions, answer);
|
|
43
|
+
const myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))), new NumberNode(b));
|
|
44
|
+
tryToAddWrongProp(propositions, myfunction.toTex());
|
|
45
|
+
tryToAddWrongProp(propositions, a + "");
|
|
46
|
+
while (propositions.length < n) {
|
|
47
|
+
const randomA = randint(-9, 10, [0]);
|
|
48
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(randomA), new ExpNode(new VariableNode("x"))).toTex());
|
|
49
|
+
}
|
|
50
|
+
return shuffleProps(propositions, n);
|
|
51
|
+
};
|
|
52
|
+
const isAnswerValid = (ans, { a, answer }) => {
|
|
53
|
+
try {
|
|
54
|
+
const parsed = parseAlgebraic(ans);
|
|
55
|
+
if (!parsed)
|
|
56
|
+
return false;
|
|
57
|
+
return parsed.simplify().toTex() === answer;
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
return handleVEAError(err);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export const expDerivativeTwo = {
|
|
64
|
+
id: "expDerivativeTwo",
|
|
65
|
+
connector: "=",
|
|
66
|
+
label: "Dérivée de $a \\times \\exp(x) + b$",
|
|
67
|
+
isSingleStep: false,
|
|
68
|
+
generator: (nb) => getDistinctQuestions(getExpDerivative, nb),
|
|
69
|
+
getPropositions,
|
|
70
|
+
qcmTimer: 60,
|
|
71
|
+
freeTimer: 60,
|
|
72
|
+
isAnswerValid,
|
|
73
|
+
subject: "Mathématiques",
|
|
74
|
+
getAnswer,
|
|
75
|
+
getInstruction,
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secondDerivativeOfExpoFunction.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAgFF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 { expUDerivate } from "../../../../../math/utils/functions/expUDerivate.js";
|
|
5
|
+
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
6
|
+
import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
9
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { coeffs } = identifiers;
|
|
12
|
+
const polynom = new Polynomial(coeffs);
|
|
13
|
+
const funct = new ExpNode(polynom.toTree());
|
|
14
|
+
return `Déterminer la fonction dérivée seconde $f''$ de la fonction $f$ définie par :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
f(x)=${funct.toTex()}
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { coeffs } = identifiers;
|
|
22
|
+
const polynom = new Polynomial(coeffs);
|
|
23
|
+
const funct = new ExpNode(polynom.toTree());
|
|
24
|
+
const uDerivated = polynom.derivate().toTree();
|
|
25
|
+
const uSecondDerivated = polynom.secondDerivate();
|
|
26
|
+
return new AddNode(new MultiplyNode(uSecondDerivated.toTree(), funct).simplify(), new MultiplyNode(uDerivated, expUDerivate(funct, polynom)).simplify())
|
|
27
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
28
|
+
.toTex();
|
|
29
|
+
};
|
|
30
|
+
const getSecondDerivativeOfExpoFunctionQuestion = () => {
|
|
31
|
+
const polynom = PolynomialConstructor.randomWithOrder(1, "x");
|
|
32
|
+
const identifiers = { coeffs: polynom.coefficients };
|
|
33
|
+
const question = {
|
|
34
|
+
answer: getAnswer(identifiers),
|
|
35
|
+
instruction: getInstruction(identifiers),
|
|
36
|
+
keys: ["epower", "x", "lnBrackets"],
|
|
37
|
+
answerFormat: "tex",
|
|
38
|
+
identifiers,
|
|
39
|
+
};
|
|
40
|
+
return question;
|
|
41
|
+
};
|
|
42
|
+
const getPropositions = (n, { answer, coeffs }) => {
|
|
43
|
+
const propositions = [];
|
|
44
|
+
addValidProp(propositions, answer);
|
|
45
|
+
generateProposition(coeffs).forEach((value) => tryToAddWrongProp(propositions, value.toTex()));
|
|
46
|
+
while (propositions.length < n) {
|
|
47
|
+
tryToAddWrongProp(propositions, new ExpNode(PolynomialConstructor.random(2).toTree()).toTex());
|
|
48
|
+
}
|
|
49
|
+
return shuffleProps(propositions, n);
|
|
50
|
+
};
|
|
51
|
+
const isAnswerValid = (ans, { answer, coeffs }) => {
|
|
52
|
+
try {
|
|
53
|
+
const parsed = parseAlgebraic(ans);
|
|
54
|
+
if (!parsed)
|
|
55
|
+
return false;
|
|
56
|
+
return (parsed
|
|
57
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
58
|
+
.toTex() === answer);
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
return handleVEAError(err);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const generateProposition = (coeffs) => {
|
|
65
|
+
const u = new Polynomial(coeffs, "x");
|
|
66
|
+
const e = new ExpNode(u.toTree());
|
|
67
|
+
const firstPropostion = expUDerivate(e, u);
|
|
68
|
+
const secondProposition = new MultiplyNode(u.toTree(), firstPropostion);
|
|
69
|
+
const thirdProposition = new ExpNode(u.derivate().toTree());
|
|
70
|
+
return [firstPropostion, secondProposition, thirdProposition];
|
|
71
|
+
};
|
|
72
|
+
export const secondDerivativeOfExpoFunction = {
|
|
73
|
+
id: "secondDerivativeOfExpoFunction",
|
|
74
|
+
label: "Dérivée seconde d'une fonction de type $\\exp(u)$",
|
|
75
|
+
levels: ["TermSpé"],
|
|
76
|
+
isSingleStep: true,
|
|
77
|
+
sections: ["Dérivation"],
|
|
78
|
+
generator: (nb) => getDistinctQuestions(getSecondDerivativeOfExpoFunctionQuestion, nb),
|
|
79
|
+
qcmTimer: 60,
|
|
80
|
+
freeTimer: 60,
|
|
81
|
+
getPropositions,
|
|
82
|
+
isAnswerValid,
|
|
83
|
+
subject: "Mathématiques",
|
|
84
|
+
};
|
|
@@ -1,31 +1,10 @@
|
|
|
1
|
-
export { constanteDerivative } from "./constanteDerivative.js";
|
|
2
|
-
export * from "./expDerivativeOne.js";
|
|
3
|
-
export * from "./expDerivativeThree.js";
|
|
4
|
-
export * from "./expDerivativeTwo.js";
|
|
5
|
-
export * from "./expDerivativeFour.js";
|
|
6
|
-
export { firstDegreeDerivative } from "./firstDegreeDerivative.js";
|
|
7
1
|
export * from "./inverseFunctionDerivative.js";
|
|
8
|
-
export * from "./lnDerivativeOne.js";
|
|
9
|
-
export * from "./lnDerivativeThree.js";
|
|
10
|
-
export * from "./lnDerivativeTwo.js";
|
|
11
|
-
export * from "./powerFunctionDerivative.js";
|
|
12
2
|
export * from "./quotientDerivative.js";
|
|
13
3
|
export * from "./productDerivative.js";
|
|
14
|
-
export * from "./
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./cosCompositionDerivation.js";
|
|
21
|
-
export * from "./sinCompositionDerivation.js";
|
|
22
|
-
export * from "./powerCompositionDerivation.js";
|
|
23
|
-
export * from "./sinSecondDegreeDerivative.js";
|
|
24
|
-
export * from "./cosSecondDegreeDerivative.js";
|
|
25
|
-
export * from "./convexityTrinomials.js";
|
|
26
|
-
export * from "./convexityQuadrinomials.js";
|
|
27
|
-
export * from "./inflexionPointQuadrinomials.js";
|
|
28
|
-
export * from "./secondDerivativeOfTrinom.js";
|
|
29
|
-
export * from "./secondDerivativeOfThirdDegreeFunction.js";
|
|
30
|
-
export * from "./secondDerivativeOfExpoFunction.js";
|
|
4
|
+
export * from "./exp/index.js";
|
|
5
|
+
export * from "./ln/index.js";
|
|
6
|
+
export * from "./polynomial/index.js";
|
|
7
|
+
export * from "./trigo/index.js";
|
|
8
|
+
export * from "./power/index.js";
|
|
9
|
+
export * from "./sqrt/index.js";
|
|
31
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,30 +1,9 @@
|
|
|
1
|
-
export { constanteDerivative } from "./constanteDerivative.js";
|
|
2
|
-
export * from "./expDerivativeOne.js";
|
|
3
|
-
export * from "./expDerivativeThree.js";
|
|
4
|
-
export * from "./expDerivativeTwo.js";
|
|
5
|
-
export * from "./expDerivativeFour.js";
|
|
6
|
-
export { firstDegreeDerivative } from "./firstDegreeDerivative.js";
|
|
7
1
|
export * from "./inverseFunctionDerivative.js";
|
|
8
|
-
export * from "./lnDerivativeOne.js";
|
|
9
|
-
export * from "./lnDerivativeThree.js";
|
|
10
|
-
export * from "./lnDerivativeTwo.js";
|
|
11
|
-
export * from "./powerFunctionDerivative.js";
|
|
12
2
|
export * from "./quotientDerivative.js";
|
|
13
3
|
export * from "./productDerivative.js";
|
|
14
|
-
export * from "./
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./cosCompositionDerivation.js";
|
|
21
|
-
export * from "./sinCompositionDerivation.js";
|
|
22
|
-
export * from "./powerCompositionDerivation.js";
|
|
23
|
-
export * from "./sinSecondDegreeDerivative.js";
|
|
24
|
-
export * from "./cosSecondDegreeDerivative.js";
|
|
25
|
-
export * from "./convexityTrinomials.js";
|
|
26
|
-
export * from "./convexityQuadrinomials.js";
|
|
27
|
-
export * from "./inflexionPointQuadrinomials.js";
|
|
28
|
-
export * from "./secondDerivativeOfTrinom.js";
|
|
29
|
-
export * from "./secondDerivativeOfThirdDegreeFunction.js";
|
|
30
|
-
export * from "./secondDerivativeOfExpoFunction.js";
|
|
4
|
+
export * from "./exp/index.js";
|
|
5
|
+
export * from "./ln/index.js";
|
|
6
|
+
export * from "./polynomial/index.js";
|
|
7
|
+
export * from "./trigo/index.js";
|
|
8
|
+
export * from "./power/index.js";
|
|
9
|
+
export * from "./sqrt/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/lnDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
|
|
4
|
+
import { RationalFrac } from "../../../../../math/polynomials/rationalFrac.js";
|
|
5
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
6
|
+
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
7
|
+
import { LogNode } from "../../../../../tree/nodes/functions/logNode.js";
|
|
8
|
+
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
9
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { a, b } = identifiers;
|
|
12
|
+
const polynom = new Polynomial([b, a]);
|
|
13
|
+
const logTree = new LogNode(polynom.toTree());
|
|
14
|
+
return `Déterminer la dérivée de la fonction $f$ définie par :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
f(x) = ${logTree.toTex()}
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { a, b } = identifiers;
|
|
22
|
+
const polynom = new Polynomial([b, a]);
|
|
23
|
+
const answer = new RationalFrac(new Polynomial([a]), polynom)
|
|
24
|
+
.simplify()
|
|
25
|
+
.toTree()
|
|
26
|
+
.toTex();
|
|
27
|
+
return answer;
|
|
28
|
+
};
|
|
29
|
+
const getLnDerivative = () => {
|
|
30
|
+
const a = randint(-9, 10, [0]);
|
|
31
|
+
const b = randint(-9, 10);
|
|
32
|
+
const identifiers = { a, b };
|
|
33
|
+
const question = {
|
|
34
|
+
instruction: getInstruction(identifiers),
|
|
35
|
+
startStatement: "f'(x)",
|
|
36
|
+
answer: getAnswer(identifiers),
|
|
37
|
+
keys: ["x", "lnBrackets", "epower"],
|
|
38
|
+
answerFormat: "tex",
|
|
39
|
+
identifiers,
|
|
40
|
+
};
|
|
41
|
+
return question;
|
|
42
|
+
};
|
|
43
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
44
|
+
const propositions = [];
|
|
45
|
+
addValidProp(propositions, answer);
|
|
46
|
+
const polynom = new Polynomial([b, a]);
|
|
47
|
+
const logTree = new LogNode(polynom.toTree());
|
|
48
|
+
tryToAddWrongProp(propositions, new MultiplyNode(new NumberNode(a), logTree).toTex());
|
|
49
|
+
tryToAddWrongProp(propositions, a + "");
|
|
50
|
+
tryToAddWrongProp(propositions, new ExpNode(polynom.toTree()).toTex());
|
|
51
|
+
tryToAddWrongProp(propositions, polynom.toTree().toTex());
|
|
52
|
+
tryToAddWrongProp(propositions, `\\frac{${a}}{${logTree.toTex()}}`);
|
|
53
|
+
tryToAddWrongProp(propositions, `\\frac{1}{${polynom.toTree().toTex()}}`);
|
|
54
|
+
return shuffleProps(propositions, n);
|
|
55
|
+
};
|
|
56
|
+
const isAnswerValid = (ans, { a, b }) => {
|
|
57
|
+
const frac = new RationalFrac(new Polynomial([a]), new Polynomial([b, a]));
|
|
58
|
+
const nonSimplified = frac.toTree();
|
|
59
|
+
const simplified = frac.simplify().toTree();
|
|
60
|
+
const texs = [
|
|
61
|
+
...simplified.toAllValidTexs(),
|
|
62
|
+
...nonSimplified.toAllValidTexs(),
|
|
63
|
+
];
|
|
64
|
+
return texs.includes(ans);
|
|
65
|
+
};
|
|
66
|
+
export const lnDerivativeOne = {
|
|
67
|
+
id: "lnDerivativeOne",
|
|
68
|
+
connector: "=",
|
|
69
|
+
label: "Dérivée de $\\ln(ax + b)$",
|
|
70
|
+
levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermSpé"],
|
|
71
|
+
sections: ["Dérivation", "Logarithme népérien"],
|
|
72
|
+
isSingleStep: false,
|
|
73
|
+
generator: (nb) => getDistinctQuestions(getLnDerivative, nb),
|
|
74
|
+
qcmTimer: 60,
|
|
75
|
+
freeTimer: 60,
|
|
76
|
+
getPropositions,
|
|
77
|
+
isAnswerValid,
|
|
78
|
+
subject: "Mathématiques",
|
|
79
|
+
getAnswer,
|
|
80
|
+
getInstruction,
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8GF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Affine } from "../../../../../math/polynomials/affine.js";
|
|
4
|
+
import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
|
|
5
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
6
|
+
import { LogNode } from "../../../../../tree/nodes/functions/logNode.js";
|
|
7
|
+
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
8
|
+
import { AddNode } from "../../../../../tree/nodes/operators/addNode.js";
|
|
9
|
+
import { FractionNode } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
10
|
+
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
11
|
+
import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
|
|
12
|
+
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
13
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
14
|
+
const getInstruction = (identifiers) => {
|
|
15
|
+
const { a, b } = identifiers;
|
|
16
|
+
const affine = new Polynomial([b, a]).toTree();
|
|
17
|
+
const myfunction = new MultiplyNode(affine, new LogNode(new VariableNode("x")));
|
|
18
|
+
return `Déterminer la dérivée de la fonction :
|
|
19
|
+
|
|
20
|
+
$$
|
|
21
|
+
f(x) = ${myfunction.toTex()}
|
|
22
|
+
$$`;
|
|
23
|
+
};
|
|
24
|
+
const getAnswer = (identifiers) => {
|
|
25
|
+
const { a, b } = identifiers;
|
|
26
|
+
const affine = new Polynomial([b, a]).toTree();
|
|
27
|
+
const derivative = new AddNode(new MultiplyNode(new NumberNode(a), new LogNode(new VariableNode("x"))), new FractionNode(affine, new VariableNode("x")));
|
|
28
|
+
return derivative
|
|
29
|
+
.simplify({
|
|
30
|
+
forbidFactorize: true,
|
|
31
|
+
forceDistributeFractions: true,
|
|
32
|
+
towardsDistribute: true,
|
|
33
|
+
})
|
|
34
|
+
.toTex();
|
|
35
|
+
};
|
|
36
|
+
const getKeys = (identifiers) => {
|
|
37
|
+
return ["x", "lnBrackets", "epower"];
|
|
38
|
+
};
|
|
39
|
+
const getLnDerivative = () => {
|
|
40
|
+
const a = randint(-9, 10, [0]);
|
|
41
|
+
const b = randint(-9, 10);
|
|
42
|
+
const identifiers = { a, b };
|
|
43
|
+
const question = {
|
|
44
|
+
instruction: getInstruction(identifiers),
|
|
45
|
+
startStatement: "f'(x)",
|
|
46
|
+
answer: getAnswer(identifiers),
|
|
47
|
+
keys: getKeys(identifiers),
|
|
48
|
+
answerFormat: "tex",
|
|
49
|
+
identifiers,
|
|
50
|
+
};
|
|
51
|
+
return question;
|
|
52
|
+
};
|
|
53
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
54
|
+
const propositions = [];
|
|
55
|
+
addValidProp(propositions, answer);
|
|
56
|
+
const affine = new Affine(a, b).toTree();
|
|
57
|
+
tryToAddWrongProp(propositions, new FractionNode(new NumberNode(a), new VariableNode("x")).toTex());
|
|
58
|
+
tryToAddWrongProp(propositions, new FractionNode(affine, new VariableNode("x")).toTex());
|
|
59
|
+
if (a === 1)
|
|
60
|
+
tryToAddWrongProp(propositions, "\\ln\\left(x\\right)");
|
|
61
|
+
else
|
|
62
|
+
tryToAddWrongProp(propositions, `${a}\\ln\\left(x\\right)`);
|
|
63
|
+
while (propositions.length < n) {
|
|
64
|
+
const randomA = randint(-9, 10, [0]);
|
|
65
|
+
const randomB = randint(-9, 10);
|
|
66
|
+
tryToAddWrongProp(propositions, new AddNode(new MultiplyNode(new NumberNode(randomA), new LogNode(new VariableNode("x"))), new FractionNode(new Polynomial([randomB, randomA]).toTree(), new VariableNode("x"))).toTex());
|
|
67
|
+
}
|
|
68
|
+
return shuffleProps(propositions, n);
|
|
69
|
+
};
|
|
70
|
+
const isAnswerValid = (ans, { a, b, answer }) => {
|
|
71
|
+
try {
|
|
72
|
+
const parsed = parseAlgebraic(ans);
|
|
73
|
+
if (!parsed)
|
|
74
|
+
return false;
|
|
75
|
+
return (parsed
|
|
76
|
+
.simplify({
|
|
77
|
+
forbidFactorize: true,
|
|
78
|
+
forceDistributeFractions: true,
|
|
79
|
+
towardsDistribute: true,
|
|
80
|
+
})
|
|
81
|
+
.toTex() === answer);
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
return handleVEAError(err);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export const lnDerivativeThree = {
|
|
88
|
+
id: "lnDerivativeThree",
|
|
89
|
+
connector: "=",
|
|
90
|
+
label: "Dérivée de $\\ln(x) \\times (ax+b)$",
|
|
91
|
+
levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermSpé"],
|
|
92
|
+
sections: ["Dérivation", "Logarithme népérien"],
|
|
93
|
+
isSingleStep: false,
|
|
94
|
+
generator: (nb) => getDistinctQuestions(getLnDerivative, nb),
|
|
95
|
+
qcmTimer: 60,
|
|
96
|
+
freeTimer: 60,
|
|
97
|
+
getPropositions,
|
|
98
|
+
isAnswerValid,
|
|
99
|
+
subject: "Mathématiques",
|
|
100
|
+
getKeys,
|
|
101
|
+
getAnswer,
|
|
102
|
+
getInstruction,
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lnDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/ln/lnDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAWjD,CAAC"}
|