math-exercises 3.0.177 → 3.0.179
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/derivation/derivative/derivativeEquationSolving1.d.ts +14 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.js +283 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts +15 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.js +296 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +3 -3
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts +14 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +346 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts +15 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +435 -0
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts +13 -0
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +326 -0
- package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts +14 -0
- package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.js +181 -0
- package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts +10 -0
- package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.js +272 -0
- package/lib/exercises/math/derivation/problems/index.d.ts +5 -0
- package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/index.js +4 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts +8 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +171 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts +15 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +328 -0
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts +13 -0
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +275 -0
- package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts +8 -0
- package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.js +137 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +478 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.js +499 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.js +240 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts +12 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.js +436 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts +12 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.js +219 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts +13 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +273 -0
- package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts +18 -0
- package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.js +295 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts +13 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +388 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts +9 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.js +308 -0
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts +14 -0
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +439 -0
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts +14 -0
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +547 -0
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts +15 -0
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.js +537 -0
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts +15 -0
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.js +639 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts +14 -0
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +530 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts +10 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +451 -0
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts +11 -0
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +514 -0
- package/lib/exercises/math/functions/composition/index.d.ts +0 -1
- package/lib/exercises/math/functions/composition/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/composition/index.js +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +0 -1
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/index.js +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +226 -0
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +32 -17
- package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts +13 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.js +195 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts +9 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.js +220 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts +15 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbability.js +332 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts +8 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.js +222 -0
- package/lib/exercises/math/probaStat/conditional/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/conditional/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/index.js +4 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -2
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -2
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts +1 -0
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +26 -199
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +6 -2
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +6 -5
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.js +4 -27
- package/lib/exercises/math/probaStat/twoEventsSituations.d.ts +29 -0
- package/lib/exercises/math/probaStat/twoEventsSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/twoEventsSituations.js +145 -0
- package/lib/exercises/math/python/index.d.ts +1 -0
- package/lib/exercises/math/python/index.d.ts.map +1 -1
- package/lib/exercises/math/python/index.js +1 -0
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts +4 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.js +47 -7
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +2 -2
- package/lib/exercises/math/sequences/geometric/index.d.ts +3 -2
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +6 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts +0 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.js +1 -1
- package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
- package/lib/exercises/math/sequences/index.d.ts +1 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +1 -0
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts +5 -1
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.js +89 -9
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -1
- package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/associatePoint.js +55 -6
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +5 -6
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +1 -3
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
- package/lib/exercises/pc/snellDescartes.js +2 -2
- package/lib/exercises/vea/polynomialVEA.d.ts +2 -0
- package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -0
- package/lib/exercises/vea/polynomialVEA.js +17 -0
- package/lib/exercises/vea/valueTableVEA.d.ts +8 -0
- package/lib/exercises/vea/valueTableVEA.d.ts.map +1 -0
- package/lib/exercises/vea/valueTableVEA.js +12 -0
- package/lib/index.d.ts +152 -41
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +9 -6
- package/lib/math/polynomials/affine.d.ts +1 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +5 -0
- package/lib/math/utils/arithmetic/primeFactors.js +1 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +18 -1
- package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts +19 -0
- package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts.map +1 -0
- package/lib/math/utils/polynomial/polynomialInterpolationUtils.js +53 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts +37 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -0
- package/lib/math/utils/polynomial/polynomialUtils.js +223 -0
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +434 -333
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
- package/lib/prototypesEnhancement.d.ts +1 -0
- package/lib/prototypesEnhancement.d.ts.map +1 -1
- package/lib/prototypesEnhancement.js +3 -0
- package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
- package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +6 -3
- package/lib/tree/nodes/geometry/degree.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +1 -1
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +2 -1
- package/lib/tree/parsers/degreeParser.js +2 -2
- package/lib/tree/utilities/nodeUtils.d.ts +6 -0
- package/lib/tree/utilities/nodeUtils.d.ts.map +1 -0
- package/lib/tree/utilities/nodeUtils.js +24 -0
- package/lib/utils/strings/prependArticle.d.ts +2 -0
- package/lib/utils/strings/prependArticle.d.ts.map +1 -0
- package/lib/utils/strings/prependArticle.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { toolBarConstructor } from "../../../../exercises/utils/geogebra/toolBarConstructor.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { blueMain, greenMain, orange, pinkMain, } from "../../../../geogebra/colors.js";
|
|
4
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
5
|
+
import { GeogebraParser } from "../../../../geogebra/parsers/geogebraParser.js";
|
|
6
|
+
import { Point } from "../../../../math/geometry/point.js";
|
|
7
|
+
import { createArrNodeCoeffCubic, PointOfFunction, PointOfFunctionConstructor, } from "../../../../math/utils/polynomial/polynomialInterpolationUtils.js";
|
|
8
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
9
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
10
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
11
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
12
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
13
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
14
|
+
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
15
|
+
import { joinanded } from "../../../../utils/strings/joinanded.js";
|
|
16
|
+
//create spline: seam cubics together
|
|
17
|
+
function createNodeFCubic(arrNodesCoeff) {
|
|
18
|
+
const [d, c, b, a] = arrNodesCoeff.map((node) => node.evaluate());
|
|
19
|
+
const nodeX = "x".toTree();
|
|
20
|
+
const nodeCubic = [d, c, b, a].reduce((acc, coeff, i) => {
|
|
21
|
+
return add(acc, multiply(coeff, power(nodeX, i)));
|
|
22
|
+
}, (0).toTree());
|
|
23
|
+
return nodeCubic;
|
|
24
|
+
}
|
|
25
|
+
function createCubicSpline(arrArrPOF) {
|
|
26
|
+
const arrChunk = arrArrPOF.map(([pof1, pof2]) => {
|
|
27
|
+
const nodeXStart = pof1.nodeAbscissa;
|
|
28
|
+
const nodeXEnd = pof2.nodeAbscissa;
|
|
29
|
+
const nodeFCubic = createNodeFCubic(createArrNodeCoeffCubic(pof1, pof2));
|
|
30
|
+
const chunk = {
|
|
31
|
+
nodeFCubic,
|
|
32
|
+
nodeXStart,
|
|
33
|
+
nodeXEnd,
|
|
34
|
+
};
|
|
35
|
+
return chunk;
|
|
36
|
+
});
|
|
37
|
+
const cubicSpline = new CubicSpline(arrChunk);
|
|
38
|
+
return cubicSpline;
|
|
39
|
+
}
|
|
40
|
+
class CubicSpline {
|
|
41
|
+
chunks;
|
|
42
|
+
constructor(chunks) {
|
|
43
|
+
this.chunks = chunks;
|
|
44
|
+
}
|
|
45
|
+
toIdentifiers() {
|
|
46
|
+
const arrChunkIds = this.chunks.map((chunk) => {
|
|
47
|
+
const chunkIds = {
|
|
48
|
+
nodeIdsFCubic: chunk.nodeFCubic.toIdentifiers(),
|
|
49
|
+
nodeIdsXStart: chunk.nodeXStart.toIdentifiers(),
|
|
50
|
+
nodeIdsXEnd: chunk.nodeXEnd.toIdentifiers(),
|
|
51
|
+
};
|
|
52
|
+
return chunkIds;
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
chunkIds: arrChunkIds,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
class CubicSplineConstructor {
|
|
60
|
+
static fromIdentifiers(cubicSplineIds) {
|
|
61
|
+
const arrChunk = cubicSplineIds.chunkIds.map((chunkIds) => {
|
|
62
|
+
const chunk = {
|
|
63
|
+
nodeFCubic: NodeConstructor.fromIdentifiers(chunkIds.nodeIdsFCubic),
|
|
64
|
+
nodeXStart: NodeConstructor.fromIdentifiers(chunkIds.nodeIdsXStart),
|
|
65
|
+
nodeXEnd: NodeConstructor.fromIdentifiers(chunkIds.nodeIdsXEnd),
|
|
66
|
+
};
|
|
67
|
+
return chunk;
|
|
68
|
+
});
|
|
69
|
+
return new CubicSpline(arrChunk);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const getSolutionPoints = (identifiers) => {
|
|
73
|
+
const { pofIds } = identifiers;
|
|
74
|
+
const arrPOF = pofIds.map((pofIds) => PointOfFunctionConstructor.fromIdentifiers(pofIds));
|
|
75
|
+
return arrPOF.map((pof, i) => {
|
|
76
|
+
const { nodeAbscissa, nodeDerivative } = pof;
|
|
77
|
+
return new Point(`S${i}`, nodeAbscissa, nodeDerivative);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const getInstruction = () => {
|
|
81
|
+
return `La courbe représentative d'une fonction $f$ (notée $C_f$) est tracée ci-dessous.
|
|
82
|
+
|
|
83
|
+
Les tangentes à $C_f$ en différents points sont également tracées.
|
|
84
|
+
|
|
85
|
+
Pour chaque tangente tracée, placer sur le même graphique, le point appartenant à la courbe représentative de $f'$.
|
|
86
|
+
`;
|
|
87
|
+
};
|
|
88
|
+
const getGGBAnswer = (identifiers) => {
|
|
89
|
+
const solutionPoints = getSolutionPoints(identifiers);
|
|
90
|
+
return [
|
|
91
|
+
...solutionPoints.flatMap((point) => point.toGGBCommand({ color: `${greenMain}`, showLabel: false })),
|
|
92
|
+
];
|
|
93
|
+
};
|
|
94
|
+
const getHint = () => {
|
|
95
|
+
return `Place chaque point de coordonnées $(x;f'(x))$.`;
|
|
96
|
+
};
|
|
97
|
+
const getCorrection = (identifiers) => {
|
|
98
|
+
const solutionPoints = getSolutionPoints(identifiers);
|
|
99
|
+
return `On place chaque point de coordonnées $(x;f'(x))$.
|
|
100
|
+
|
|
101
|
+
On place donc les points de coordonnées ${joinanded(solutionPoints.map((p) => `$(${p.x.toTex()};${p.y.simplify().toTex()})$`), ", ", " et ")} (ci-dessous en vert).
|
|
102
|
+
|
|
103
|
+
On a également représenté ci-dessous la courbe représentative de la fonction dérivée (en rose foncé) pour avoir une vue globale.`;
|
|
104
|
+
};
|
|
105
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
106
|
+
const { cubicSplineIds, pofIds } = identifiers;
|
|
107
|
+
const cubicSpline = CubicSplineConstructor.fromIdentifiers(cubicSplineIds);
|
|
108
|
+
const arrPOF = pofIds.map((pofIds) => PointOfFunctionConstructor.fromIdentifiers(pofIds));
|
|
109
|
+
const ggb = new GeogebraConstructor({
|
|
110
|
+
commands: [
|
|
111
|
+
//function (chunks)
|
|
112
|
+
...cubicSpline.chunks.flatMap((chunk, i, arr) => {
|
|
113
|
+
const isFirst = i === 0;
|
|
114
|
+
const isLast = i === arr.length - 1;
|
|
115
|
+
const xStart = isFirst ? -20 : chunk.nodeXStart.evaluate();
|
|
116
|
+
const xEnd = isLast ? +20 : chunk.nodeXEnd.evaluate();
|
|
117
|
+
return [
|
|
118
|
+
`f${i}(x) = Function(${chunk.nodeFCubic.toMathString()}, ${xStart}, ${xEnd})`,
|
|
119
|
+
`SetColor(f${i}, "${blueMain}")`,
|
|
120
|
+
];
|
|
121
|
+
}),
|
|
122
|
+
//points with tangents
|
|
123
|
+
...arrPOF.flatMap((pof, i) => {
|
|
124
|
+
const a = pof.nodeAbscissa.evaluate();
|
|
125
|
+
const u = pof.nodeValue.evaluate();
|
|
126
|
+
const v = pof.nodeDerivative.evaluate();
|
|
127
|
+
return [
|
|
128
|
+
`t${i}(x) = Function(${u} + ${v}(x-${a}), ${a} - 2, ${a} + 2)`,
|
|
129
|
+
`SetColor(t${i}, "${orange}")`,
|
|
130
|
+
`P${i} = Point({${a}, ${u}})`,
|
|
131
|
+
`SetFixed(P${i}, false, false)`,
|
|
132
|
+
`SetColor(P${i}, "${orange}")`,
|
|
133
|
+
];
|
|
134
|
+
}),
|
|
135
|
+
//derivative (chunks)
|
|
136
|
+
...cubicSpline.chunks.flatMap((chunk, i, arr) => {
|
|
137
|
+
const isFirst = i === 0;
|
|
138
|
+
const isLast = i === arr.length - 1;
|
|
139
|
+
const xStart = isFirst ? -20 : chunk.nodeXStart.evaluate();
|
|
140
|
+
const xEnd = isLast ? +20 : chunk.nodeXEnd.evaluate();
|
|
141
|
+
return [
|
|
142
|
+
`d${i}(x) = Function(${chunk.nodeFCubic
|
|
143
|
+
.derivative()
|
|
144
|
+
.toMathString()}, ${xStart}, ${xEnd})`,
|
|
145
|
+
`SetColor(d${i}, "${pinkMain}")`,
|
|
146
|
+
];
|
|
147
|
+
}),
|
|
148
|
+
//derivative (points)
|
|
149
|
+
...arrPOF.flatMap((pof, i) => {
|
|
150
|
+
const a = pof.nodeAbscissa.evaluate();
|
|
151
|
+
const v = pof.nodeDerivative.evaluate();
|
|
152
|
+
return [
|
|
153
|
+
`D${i} = Point({${a}, ${v}})`,
|
|
154
|
+
`SetFixed(D${i}, true, false)`,
|
|
155
|
+
`SetColor(D${i}, "${greenMain}")`,
|
|
156
|
+
];
|
|
157
|
+
}),
|
|
158
|
+
],
|
|
159
|
+
});
|
|
160
|
+
return ggb.getOptions({
|
|
161
|
+
coords: ggb.getCoordsForPoints([
|
|
162
|
+
...arrPOF.map((pof, i) => new Point(`P${i}`, pof.nodeAbscissa, pof.nodeValue)),
|
|
163
|
+
...getSolutionPoints(identifiers),
|
|
164
|
+
]),
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
168
|
+
const { cubicSplineIds, pofIds } = identifiers;
|
|
169
|
+
const cubicSpline = CubicSplineConstructor.fromIdentifiers(cubicSplineIds);
|
|
170
|
+
const arrPOF = pofIds.map((pofIds) => PointOfFunctionConstructor.fromIdentifiers(pofIds));
|
|
171
|
+
const ggb = new GeogebraConstructor({
|
|
172
|
+
commands: [
|
|
173
|
+
//function (chunks)
|
|
174
|
+
...cubicSpline.chunks.flatMap((chunk, i, arr) => {
|
|
175
|
+
const isFirst = i === 0;
|
|
176
|
+
const isLast = i === arr.length - 1;
|
|
177
|
+
const xStart = isFirst ? -20 : chunk.nodeXStart.evaluate();
|
|
178
|
+
const xEnd = isLast ? +20 : chunk.nodeXEnd.evaluate();
|
|
179
|
+
return [
|
|
180
|
+
`f${i}(x) = Function(${chunk.nodeFCubic.toMathString()}, ${xStart}, ${xEnd})`,
|
|
181
|
+
`SetColor(f${i}, "${blueMain}")`,
|
|
182
|
+
];
|
|
183
|
+
}),
|
|
184
|
+
//points with tangents
|
|
185
|
+
...arrPOF.flatMap((pof, i) => {
|
|
186
|
+
const a = pof.nodeAbscissa.evaluate();
|
|
187
|
+
const u = pof.nodeValue.evaluate();
|
|
188
|
+
const v = pof.nodeDerivative.evaluate();
|
|
189
|
+
return [
|
|
190
|
+
`t${i}(x) = Function(${u} + ${v}(x-${a}), ${a} - 2, ${a} + 2)`,
|
|
191
|
+
`SetColor(t${i}, "${orange}")`,
|
|
192
|
+
`P${i} = Point({${a}, ${u}})`,
|
|
193
|
+
`SetFixed(P${i}, true, false)`,
|
|
194
|
+
`SetColor(P${i}, "${orange}")`,
|
|
195
|
+
];
|
|
196
|
+
}),
|
|
197
|
+
],
|
|
198
|
+
customToolBar: toolBarConstructor({
|
|
199
|
+
point: true,
|
|
200
|
+
}),
|
|
201
|
+
});
|
|
202
|
+
return ggb.getOptions({
|
|
203
|
+
coords: ggb.getCoordsForPoints([
|
|
204
|
+
...arrPOF.map((pof, i) => new Point(`P${i}`, pof.nodeAbscissa, pof.nodeValue)),
|
|
205
|
+
...getSolutionPoints(identifiers),
|
|
206
|
+
]),
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
210
|
+
const commands = ans;
|
|
211
|
+
const ggbParser = new GeogebraParser(commands);
|
|
212
|
+
const objectDict = ggbParser.objectDict();
|
|
213
|
+
const pointsCoords = Object.keys(objectDict).map((name) => ggbParser.pointCoords(name));
|
|
214
|
+
const pointsCoordsSortedByAscX = pointsCoords.toSorted(([x1], [x2]) => {
|
|
215
|
+
return x1 - x2;
|
|
216
|
+
});
|
|
217
|
+
const solutionPointsSortedByAscX = getSolutionPoints(identifiers).toSorted((p1, p2) => {
|
|
218
|
+
return p1.x.evaluate() - p2.x.evaluate();
|
|
219
|
+
});
|
|
220
|
+
return (pointsCoordsSortedByAscX.length === solutionPointsSortedByAscX.length &&
|
|
221
|
+
pointsCoordsSortedByAscX.every(([x, y], i) => {
|
|
222
|
+
const studentPoint = new Point("StudentPoint", x, y);
|
|
223
|
+
const solutionPoint = solutionPointsSortedByAscX[i];
|
|
224
|
+
const distance = studentPoint.distanceTo(solutionPoint);
|
|
225
|
+
return distance < 1;
|
|
226
|
+
}));
|
|
227
|
+
};
|
|
228
|
+
const getPlacePointsOfDerivativeFromGraphQuestion = () => {
|
|
229
|
+
const arrNodeAbscissa = [
|
|
230
|
+
randint(-10, -5),
|
|
231
|
+
randint(-5, 0),
|
|
232
|
+
randint(0, 5),
|
|
233
|
+
randint(6, 10),
|
|
234
|
+
].map((x) => x.toTree());
|
|
235
|
+
const arrNodeImage = arrNodeAbscissa
|
|
236
|
+
.slice(1)
|
|
237
|
+
.reduce((acc, _, i) => {
|
|
238
|
+
const yPrev = acc[i];
|
|
239
|
+
const yNew = yPrev + randint(-5, 6);
|
|
240
|
+
acc.push(yNew);
|
|
241
|
+
return acc;
|
|
242
|
+
}, [randint(-9, 10)])
|
|
243
|
+
.map((x) => x.toTree());
|
|
244
|
+
const arrNodeDerivative = arrNodeAbscissa.map(() => {
|
|
245
|
+
const num = randint(-3, 3);
|
|
246
|
+
const den = randint(-3, 3, [0]);
|
|
247
|
+
return frac(num, den);
|
|
248
|
+
});
|
|
249
|
+
const arrPOF = zip(arrNodeAbscissa, zip(arrNodeImage, arrNodeDerivative)).map(([nodeAbscissa, [nodeValue, nodeDerivative]]) => {
|
|
250
|
+
const pof = new PointOfFunction(nodeAbscissa, nodeValue, nodeDerivative);
|
|
251
|
+
return pof;
|
|
252
|
+
});
|
|
253
|
+
const arrArrPOF = zip(arrPOF.slice(0, -1), arrPOF.slice(1));
|
|
254
|
+
const cubicSpline = createCubicSpline(arrArrPOF);
|
|
255
|
+
const identifiers = {
|
|
256
|
+
cubicSplineIds: cubicSpline.toIdentifiers(),
|
|
257
|
+
pofIds: arrPOF.map((pof) => pof.toIdentifiers()),
|
|
258
|
+
};
|
|
259
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
260
|
+
};
|
|
261
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
262
|
+
return {
|
|
263
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
264
|
+
instruction: getInstruction(identifiers),
|
|
265
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
266
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
267
|
+
identifiers,
|
|
268
|
+
hint: getHint(identifiers),
|
|
269
|
+
correction: getCorrection(identifiers),
|
|
270
|
+
style: {
|
|
271
|
+
tableOptions: {
|
|
272
|
+
firstCellIsDivided: false,
|
|
273
|
+
firstColumnIsHeader: true,
|
|
274
|
+
firstRowIsHeader: false,
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
export const placePointsOfDerivativeFromGraph = {
|
|
280
|
+
id: "placePointsOfDerivativeFromGraph",
|
|
281
|
+
label: "Placer des points de la dérivée à partir des tangentes à la courbe représentative d'une fonction",
|
|
282
|
+
isSingleStep: true,
|
|
283
|
+
generator: (nb, opts) => getDistinctQuestions(() => getPlacePointsOfDerivativeFromGraphQuestion(opts), nb),
|
|
284
|
+
ggbTimer: 60,
|
|
285
|
+
isGGBAnswerValid,
|
|
286
|
+
subject: "Mathématiques",
|
|
287
|
+
getHint,
|
|
288
|
+
getInstruction,
|
|
289
|
+
getCorrection,
|
|
290
|
+
getGGBAnswer,
|
|
291
|
+
getStudentGGBOptions,
|
|
292
|
+
answerType: "GGB",
|
|
293
|
+
getQuestionFromIdentifiers,
|
|
294
|
+
hasHintAndCorrection: true,
|
|
295
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
nodeIdsXAsked: NodeIdentifiers;
|
|
5
|
+
nodeIdsF: NodeIdentifiers;
|
|
6
|
+
typeF: string;
|
|
7
|
+
};
|
|
8
|
+
type Options = {
|
|
9
|
+
typeF: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const tangentEquationFromFunctionExpression: Exercise<Identifiers, Options>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=tangentEquationFromFunctionExpression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tangentEquationFromFunctionExpression.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAUrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAgF7C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,eAAe,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsWF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgDF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAC1D,WAAW,EACX,OAAO,CAqBR,CAAC"}
|