math-exercises 3.0.158 → 3.0.160
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/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +7 -6
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +88 -9
- package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +8 -2
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +27 -2
- package/lib/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.js +1 -3
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.js +0 -1
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +11 -4
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +11 -5
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +91 -21
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +63 -43
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +72 -49
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +19 -19
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +26 -14
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts +1 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/index.js +1 -0
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.d.ts +7 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +174 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +30 -3
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +12 -7
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +2 -2
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +33 -44
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +80 -8
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +80 -25
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +6 -15
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +54 -42
- package/lib/exercises/math/functions/exponential/index.d.ts +2 -0
- package/lib/exercises/math/functions/exponential/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.js +3 -0
- package/lib/exercises/math/functions/trinoms/factoForm/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/factoForm/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/factoForm/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/factoForm/trinomDevelopFactorizedForm.d.ts +13 -0
- package/lib/exercises/math/functions/trinoms/factoForm/trinomDevelopFactorizedForm.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/factoForm/trinomDevelopFactorizedForm.js +147 -0
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +96 -0
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +95 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.js +173 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts +2 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.js +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.js +97 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +18 -23
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +24 -26
- package/lib/exercises/math/functions/variations/index.d.ts +1 -0
- package/lib/exercises/math/functions/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/index.js +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.d.ts +12 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.js +230 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.d.ts +10 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.js +167 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts +3 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/index.js +3 -0
- package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.d.ts +10 -0
- package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.js +131 -0
- package/lib/exercises/math/geometry/circles/circleCanonicalEquationFromDevEquation.d.ts +10 -0
- package/lib/exercises/math/geometry/circles/circleCanonicalEquationFromDevEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/circleCanonicalEquationFromDevEquation.js +174 -0
- package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts +12 -0
- package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.js +161 -0
- package/lib/exercises/math/geometry/circles/circleEquationFromDiameter.d.ts +9 -0
- package/lib/exercises/math/geometry/circles/circleEquationFromDiameter.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/circleEquationFromDiameter.js +145 -0
- package/lib/exercises/math/geometry/circles/circleEquationFromPointAndRadius.d.ts +13 -0
- package/lib/exercises/math/geometry/circles/circleEquationFromPointAndRadius.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/circleEquationFromPointAndRadius.js +181 -0
- package/lib/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.d.ts +11 -0
- package/lib/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.js +191 -0
- package/lib/exercises/math/geometry/circles/index.d.ts +7 -0
- package/lib/exercises/math/geometry/circles/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/index.js +6 -0
- package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.d.ts +11 -0
- package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.js +131 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +0 -2
- package/lib/exercises/math/geometry/index.d.ts +1 -0
- package/lib/exercises/math/geometry/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/index.js +1 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.js +181 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts +4 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +23 -3
- package/lib/exercises/math/geometry/lines/index.d.ts +1 -0
- package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/index.js +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.d.ts +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.js +3 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +247 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +13 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +452 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +253 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.d.ts +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.js +3 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.d.ts +10 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.js +174 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +231 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts +14 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +292 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.d.ts +6 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.js +5 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +202 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +127 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +167 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +180 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +235 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +423 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts +17 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +347 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +301 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +141 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.d.ts +10 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.js +174 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +2 -0
- package/lib/exercises/math/sequences/generation/index.d.ts +2 -0
- package/lib/exercises/math/sequences/generation/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/generation/index.js +1 -0
- package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.d.ts +8 -0
- package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.d.ts.map +1 -0
- package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.js +63 -0
- package/lib/exercises/math/sequences/graph/index.d.ts +2 -0
- package/lib/exercises/math/sequences/graph/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/graph/index.js +1 -0
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.d.ts +11 -0
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.d.ts.map +1 -0
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +113 -0
- package/lib/exercises/math/sequences/index.d.ts +2 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +2 -0
- package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.d.ts +12 -0
- package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.d.ts.map +1 -0
- package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.js +114 -0
- package/lib/exercises/math/sequences/notation/identifySequenceTermInList.d.ts +12 -0
- package/lib/exercises/math/sequences/notation/identifySequenceTermInList.d.ts.map +1 -0
- package/lib/exercises/math/sequences/notation/identifySequenceTermInList.js +111 -0
- package/lib/exercises/math/sequences/notation/index.d.ts +3 -0
- package/lib/exercises/math/sequences/notation/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/notation/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.js +0 -1
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +0 -2
- package/lib/exercises/vea/cartesianLineVEA.d.ts +2 -0
- package/lib/exercises/vea/cartesianLineVEA.d.ts.map +1 -0
- package/lib/exercises/vea/cartesianLineVEA.js +1 -0
- package/lib/exercises/vea/pointVEA.d.ts +2 -0
- package/lib/exercises/vea/pointVEA.d.ts.map +1 -0
- package/lib/exercises/vea/pointVEA.js +7 -0
- package/lib/index.d.ts +164 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/circle.d.ts +6 -0
- package/lib/math/geometry/circle.d.ts.map +1 -1
- package/lib/math/geometry/circle.js +16 -0
- package/lib/math/geometry/line.d.ts +2 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +7 -0
- package/lib/math/geometry/point.d.ts +1 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +5 -0
- package/lib/math/geometry/polygons/relationPP.d.ts +8 -0
- package/lib/math/geometry/polygons/relationPP.d.ts.map +1 -0
- package/lib/math/geometry/polygons/relationPP.js +41 -0
- package/lib/math/polynomials/trinom.d.ts +1 -1
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +15 -6
- package/lib/math/utils/arithmetic/primeFactors.js +1 -1
- package/lib/math/utils/geometry/randomVecs2.d.ts +6 -0
- package/lib/math/utils/geometry/randomVecs2.d.ts.map +1 -0
- package/lib/math/utils/geometry/randomVecs2.js +34 -0
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +2 -2
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts +1 -0
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +3 -0
- package/lib/tree/nodes/functions/expNode.d.ts +1 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +1 -0
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.js +3 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +6 -4
- package/lib/tree/nodes/sets/intervalNode.d.ts +6 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/namedIntervalNode.d.ts +31 -0
- package/lib/tree/nodes/sets/namedIntervalNode.d.ts.map +1 -0
- package/lib/tree/nodes/sets/namedIntervalNode.js +77 -0
- package/package.json +1 -1
|
@@ -2,15 +2,21 @@ import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../../exer
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
|
|
4
4
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
|
+
import { opposite } from "../../../../../tree/nodes/functions/oppositeNode.js";
|
|
6
|
+
import { sqrt } from "../../../../../tree/nodes/functions/sqrtNode.js";
|
|
7
|
+
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
8
|
+
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
5
9
|
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
10
|
+
import { square } from "../../../../../tree/nodes/operators/powerNode.js";
|
|
6
11
|
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
7
12
|
import { discreteSetParser } from "../../../../../tree/parsers/discreteSetParser.js";
|
|
8
13
|
import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
9
14
|
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
15
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
10
16
|
const getInstruction = (identifiers) => {
|
|
11
17
|
const { a, b, c } = identifiers;
|
|
12
18
|
const trinom = new Trinom(a, b, c);
|
|
13
|
-
return `Soit $f$ la fonction définie par :
|
|
19
|
+
return `Soit $f$ la fonction polynôme du second degré définie par :
|
|
14
20
|
|
|
15
21
|
$$
|
|
16
22
|
f(x) = ${trinom.toTree().toTex()}
|
|
@@ -18,6 +24,91 @@ $$
|
|
|
18
24
|
|
|
19
25
|
Résoudre l'équation $f(x) = 0$.`;
|
|
20
26
|
};
|
|
27
|
+
const getHint = () => {
|
|
28
|
+
return `Calcule le déterminant $\\Delta$ de $f$ :
|
|
29
|
+
|
|
30
|
+
$$
|
|
31
|
+
\\Delta = b^2 -4ac
|
|
32
|
+
$$
|
|
33
|
+
|
|
34
|
+
Alors, l'équation $f(x) = 0$ :
|
|
35
|
+
- n'admet pas de solution réelle si $\\Delta<0$;
|
|
36
|
+
- admet une solution $x_0 = \\frac{-b}{2a}$ si $\\Delta=0$;
|
|
37
|
+
- admet deux solutions $x_1 = \\frac{-b-\\sqrt{\\Delta}}{2a}$ et $x_2 = \\frac{-b+\\sqrt{\\Delta}}{2a}$ si $\\Delta>0$.
|
|
38
|
+
`;
|
|
39
|
+
};
|
|
40
|
+
const getCorrection = (identifiers) => {
|
|
41
|
+
const { a, b, c } = identifiers;
|
|
42
|
+
const delta = substract(square(b), multiply(4, multiply(a, c))).simplify();
|
|
43
|
+
const deltaEv = delta.evaluate();
|
|
44
|
+
const hasNoSol = deltaEv < 0;
|
|
45
|
+
const hasOneSol = deltaEv === 0;
|
|
46
|
+
let corr = `On calcule le discriminant :
|
|
47
|
+
|
|
48
|
+
${alignTex([
|
|
49
|
+
["\\Delta", "=", "b^2 - 4ac"],
|
|
50
|
+
["", "=", substract(square(b), multiply(4, multiply(a, c))).toTex()],
|
|
51
|
+
["", "=", delta.toTex()],
|
|
52
|
+
])}`;
|
|
53
|
+
if (hasNoSol) {
|
|
54
|
+
corr += `
|
|
55
|
+
|
|
56
|
+
Puisque $\\Delta<0$, l'équation $f(x) = 0$ n'admet donc pas de solution réelle.`;
|
|
57
|
+
}
|
|
58
|
+
else if (hasOneSol) {
|
|
59
|
+
corr += `
|
|
60
|
+
|
|
61
|
+
Puisque $\\Delta = 0$, l'équation $f(x)=0$ admet une solution $x_0$ :
|
|
62
|
+
|
|
63
|
+
${alignTex([
|
|
64
|
+
["x_0", "=", "\\frac{-b}{2a}"],
|
|
65
|
+
["", "=", frac(opposite(b), multiply(2, a)).toTex()],
|
|
66
|
+
["", "=", frac(opposite(b), multiply(2, a)).simplify().toTex()],
|
|
67
|
+
])}
|
|
68
|
+
|
|
69
|
+
L'ensemble des solutions est donc :
|
|
70
|
+
|
|
71
|
+
$$
|
|
72
|
+
${getAnswer(identifiers)}
|
|
73
|
+
$$`;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
corr += `
|
|
77
|
+
|
|
78
|
+
Puisque $\\Delta > 0$, l'équation $f(x)=0$ admet deux solutions :
|
|
79
|
+
|
|
80
|
+
${alignTex([
|
|
81
|
+
["x_1", "=", "\\frac{-b-\\sqrt{\\Delta}}{2a}"],
|
|
82
|
+
["", "=", frac(substract(opposite(b), sqrt(delta)), multiply(2, a)).toTex()],
|
|
83
|
+
[
|
|
84
|
+
"",
|
|
85
|
+
"=",
|
|
86
|
+
frac(substract(opposite(b), sqrt(delta)), multiply(2, a))
|
|
87
|
+
.simplify()
|
|
88
|
+
.toTex(),
|
|
89
|
+
],
|
|
90
|
+
])}
|
|
91
|
+
|
|
92
|
+
${alignTex([
|
|
93
|
+
["x_2", "=", "\\frac{-b+\\sqrt{\\Delta}}{2a}"],
|
|
94
|
+
["", "=", frac(add(opposite(b), sqrt(delta)), multiply(2, a)).toTex()],
|
|
95
|
+
[
|
|
96
|
+
"",
|
|
97
|
+
"=",
|
|
98
|
+
frac(add(opposite(b), sqrt(delta)), multiply(2, a))
|
|
99
|
+
.simplify()
|
|
100
|
+
.toTex(),
|
|
101
|
+
],
|
|
102
|
+
])}
|
|
103
|
+
L'ensemble des solutions est donc :
|
|
104
|
+
|
|
105
|
+
$$
|
|
106
|
+
${getAnswer(identifiers)}
|
|
107
|
+
$$
|
|
108
|
+
`;
|
|
109
|
+
}
|
|
110
|
+
return corr;
|
|
111
|
+
};
|
|
21
112
|
const getAnswer = (identifiers) => {
|
|
22
113
|
const { a, b, c } = identifiers;
|
|
23
114
|
const trinom = new Trinom(a, b, c);
|
|
@@ -35,6 +126,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
35
126
|
keys: ["S", "equal", "lbrace", "semicolon", "rbrace", "varnothing"],
|
|
36
127
|
answerFormat: "tex",
|
|
37
128
|
identifiers,
|
|
129
|
+
hint: getHint(identifiers),
|
|
130
|
+
correction: getCorrection(identifiers),
|
|
38
131
|
};
|
|
39
132
|
return question;
|
|
40
133
|
};
|
|
@@ -102,4 +195,5 @@ export const rootsFromDevForm = {
|
|
|
102
195
|
subject: "Mathématiques",
|
|
103
196
|
pdfOptions: { shouldSpreadPropositions: true },
|
|
104
197
|
getQuestionFromIdentifiers,
|
|
198
|
+
hasHintAndCorrection: true,
|
|
105
199
|
};
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../../math/geometry/point.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
summitIds: PointIdentifiers;
|
|
5
|
+
pointIds: PointIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const devFormFromSummitAndPoint: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=devFormFromSummitAndPoint.d.ts.map
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devFormFromSummitAndPoint.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAWtC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAyLF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAmB3D,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Point, PointConstructor, } from "../../../../../math/geometry/point.js";
|
|
4
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
|
+
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { square } from "../../../../../tree/nodes/operators/powerNode.js";
|
|
9
|
+
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
11
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
13
|
+
const getPropositions = (n, { answer }) => {
|
|
14
|
+
const propositions = [];
|
|
15
|
+
addValidProp(propositions, answer);
|
|
16
|
+
propWhile(propositions, n, () => {
|
|
17
|
+
const summit = PointConstructor.random("S");
|
|
18
|
+
const a = randint(-10, 10, [0]);
|
|
19
|
+
const pointX = randint(-10, 10, [summit.x.evaluate()]);
|
|
20
|
+
const pointY = add(multiply(a, square(substract(pointX, summit.x))), summit.y).simplify();
|
|
21
|
+
const point = new Point("A", pointX, pointY);
|
|
22
|
+
const fakeIds = {
|
|
23
|
+
pointIds: point.toIdentifiers(),
|
|
24
|
+
summitIds: summit.toIdentifiers(),
|
|
25
|
+
};
|
|
26
|
+
tryToAddWrongProp(propositions, getAnswer(fakeIds));
|
|
27
|
+
});
|
|
28
|
+
return shuffleProps(propositions, n);
|
|
29
|
+
};
|
|
30
|
+
const getAnswer = (identifiers) => {
|
|
31
|
+
const { pointIds, summitIds } = identifiers;
|
|
32
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
33
|
+
const summit = PointConstructor.fromIdentifiers(summitIds);
|
|
34
|
+
const a = frac(substract(point.y, summit.y), square(substract(point.x, summit.x))).simplify();
|
|
35
|
+
const cano = add(multiply(a, square(substract("x", summit.x))), summit.y);
|
|
36
|
+
return cano
|
|
37
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
38
|
+
.toTex();
|
|
39
|
+
};
|
|
40
|
+
const getInstruction = (identifiers) => {
|
|
41
|
+
const { pointIds, summitIds } = identifiers;
|
|
42
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
43
|
+
const summit = PointConstructor.fromIdentifiers(summitIds);
|
|
44
|
+
return `On considère une fonction polynôme du second degré $f$. Sa parabole passe par le point $${point.toTexWithCoords()}$, et son sommet est $${summit.toTexWithCoords()}$.
|
|
45
|
+
|
|
46
|
+
Déterminer la forme développée de $f$.`;
|
|
47
|
+
};
|
|
48
|
+
const getHint = (identifiers) => {
|
|
49
|
+
return `La forme canonique d'une fonction polynôme du second degré $f$ est :
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
f(x) = a(x-\\alpha)^2 + \\beta
|
|
53
|
+
$$
|
|
54
|
+
|
|
55
|
+
où $\\alpha$ est l'abscisse du sommet de la parabole, et $\\beta$ son ordonnée.
|
|
56
|
+
|
|
57
|
+
Utilise cette formule ici, puis le fait que le point $${PointConstructor.fromIdentifiers(identifiers.pointIds).toTexWithCoords()}$ est un point de la parabole pour déterminer $a$.`;
|
|
58
|
+
};
|
|
59
|
+
const getCorrection = (identifiers) => {
|
|
60
|
+
const { pointIds, summitIds } = identifiers;
|
|
61
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
62
|
+
const summit = PointConstructor.fromIdentifiers(summitIds);
|
|
63
|
+
const beta = summit.y;
|
|
64
|
+
const alpha = summit.x;
|
|
65
|
+
const a = frac(substract(point.y, summit.y), square(substract(point.x, summit.x))).simplify();
|
|
66
|
+
return `Puisque le sommet de la parabole est $${summit.toTexWithCoords()}$, la forme canonique de $f$ est :
|
|
67
|
+
|
|
68
|
+
$$
|
|
69
|
+
f(x) = ${add(multiply("a", square(substract("x", alpha).simplify())), beta).toTex()}
|
|
70
|
+
$$
|
|
71
|
+
|
|
72
|
+
Puisque $${point.toTexWithCoords()}$ est un point de la parabole, on a :
|
|
73
|
+
|
|
74
|
+
${alignTex([
|
|
75
|
+
[`f(${point.x.toTex()})`, "=", `${point.y.toTex()}`],
|
|
76
|
+
[
|
|
77
|
+
add(multiply("a", square(substract(point.x, alpha).simplify())), beta).toTex(),
|
|
78
|
+
"=",
|
|
79
|
+
`${point.y.toTex()}`,
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
add(multiply("a", square(substract(point.x, alpha))), beta)
|
|
83
|
+
.simplify()
|
|
84
|
+
.toTex(),
|
|
85
|
+
"=",
|
|
86
|
+
`${point.y.toTex()}`,
|
|
87
|
+
],
|
|
88
|
+
["a", "=", a.simplify().toTex()],
|
|
89
|
+
])}
|
|
90
|
+
|
|
91
|
+
Il ne reste plus qu'à développer la forme canonique de $f$ :
|
|
92
|
+
|
|
93
|
+
${alignTex([
|
|
94
|
+
[
|
|
95
|
+
"f(x)",
|
|
96
|
+
"=",
|
|
97
|
+
add(multiply(a, square(substract("x", alpha))), beta)
|
|
98
|
+
.simplify()
|
|
99
|
+
.toTex(),
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"",
|
|
103
|
+
"=",
|
|
104
|
+
add(multiply(a, square(substract("x", alpha)).simplify({
|
|
105
|
+
towardsDistribute: true,
|
|
106
|
+
forbidFactorize: true,
|
|
107
|
+
})), beta).toTex(),
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
"",
|
|
111
|
+
"=",
|
|
112
|
+
add(multiply(a, square(substract("x", alpha))), beta)
|
|
113
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
114
|
+
.toTex(),
|
|
115
|
+
],
|
|
116
|
+
])}
|
|
117
|
+
`;
|
|
118
|
+
};
|
|
119
|
+
const getKeys = () => {
|
|
120
|
+
return ["xsquare", "x"];
|
|
121
|
+
};
|
|
122
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
123
|
+
try {
|
|
124
|
+
const parsed = parseAlgebraic(ans);
|
|
125
|
+
return (parsed
|
|
126
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
127
|
+
.toTex() === answer);
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
return handleVEAError(err);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const getDevFormFromSummitAndPointQuestion = () => {
|
|
134
|
+
const summit = PointConstructor.random("S");
|
|
135
|
+
const a = randint(-10, 10, [0]);
|
|
136
|
+
const pointX = randint(-10, 10, [summit.x.evaluate()]);
|
|
137
|
+
const pointY = add(multiply(a, square(substract(pointX, summit.x))), summit.y).simplify();
|
|
138
|
+
const point = new Point("A", pointX, pointY);
|
|
139
|
+
const identifiers = {
|
|
140
|
+
pointIds: point.toIdentifiers(),
|
|
141
|
+
summitIds: summit.toIdentifiers(),
|
|
142
|
+
};
|
|
143
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
144
|
+
};
|
|
145
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
146
|
+
return {
|
|
147
|
+
answer: getAnswer(identifiers),
|
|
148
|
+
instruction: getInstruction(identifiers),
|
|
149
|
+
keys: getKeys(identifiers),
|
|
150
|
+
answerFormat: "tex",
|
|
151
|
+
identifiers,
|
|
152
|
+
hint: getHint(identifiers),
|
|
153
|
+
correction: getCorrection(identifiers),
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
export const devFormFromSummitAndPoint = {
|
|
157
|
+
id: "devFormFromSummitAndPoint",
|
|
158
|
+
connector: "=",
|
|
159
|
+
label: "Déterminer la forme développée d'un trinôme en connaissant un point et le sommet de la parabole",
|
|
160
|
+
isSingleStep: true,
|
|
161
|
+
generator: (nb, opts) => getDistinctQuestions(() => getDevFormFromSummitAndPointQuestion(opts), nb),
|
|
162
|
+
qcmTimer: 60,
|
|
163
|
+
freeTimer: 60,
|
|
164
|
+
getPropositions,
|
|
165
|
+
isAnswerValid,
|
|
166
|
+
subject: "Mathématiques",
|
|
167
|
+
getInstruction,
|
|
168
|
+
getHint,
|
|
169
|
+
getCorrection,
|
|
170
|
+
getAnswer,
|
|
171
|
+
getQuestionFromIdentifiers,
|
|
172
|
+
hasHintAndCorrection: true,
|
|
173
|
+
};
|
|
@@ -6,4 +6,6 @@ export * from "./extremumTypeFromAlgebricForm.js";
|
|
|
6
6
|
export * from "./summitAbscissFromDevForm.js";
|
|
7
7
|
export * from "./summitAbscissFromRoots.js";
|
|
8
8
|
export * from "./summitReading.js";
|
|
9
|
+
export * from "./summitAbscissFromSymetricPoints.js";
|
|
10
|
+
export * from "./devFormFromSummitAndPoint.js";
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC"}
|
|
@@ -6,3 +6,5 @@ export * from "./extremumTypeFromAlgebricForm.js";
|
|
|
6
6
|
export * from "./summitAbscissFromDevForm.js";
|
|
7
7
|
export * from "./summitAbscissFromRoots.js";
|
|
8
8
|
export * from "./summitReading.js";
|
|
9
|
+
export * from "./summitAbscissFromSymetricPoints.js";
|
|
10
|
+
export * from "./devFormFromSummitAndPoint.js";
|
|
@@ -11,7 +11,7 @@ const getInstruction = (identifiers) => {
|
|
|
11
11
|
const { a, b, c } = identifiers;
|
|
12
12
|
const trinom = new Trinom(a, b, c);
|
|
13
13
|
const roots = trinom.getRoots();
|
|
14
|
-
return `Soit $f(x) = ax^2+bx+c$ une fonction polynôme du second
|
|
14
|
+
return `Soit $f(x) = ax^2+bx+c$ une fonction polynôme du second degré, dont les racines sont $${roots[0]}$ et $${roots[1]}$.
|
|
15
15
|
|
|
16
16
|
Quelle est l'abscisse du sommet de la parabole représentant $f$ ?`;
|
|
17
17
|
};
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../../math/geometry/point.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
pointAIds: PointIdentifiers;
|
|
5
|
+
pointBIds: PointIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const summitAbscissFromSymetricPoints: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=summitAbscissFromSymetricPoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summitAbscissFromSymetricPoints.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAMtC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAuFF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAsBjE,CAAC"}
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { rationalVEA } from "../../../../../exercises/vea/rationalVEA.js";
|
|
4
|
+
import { Point, PointConstructor, } from "../../../../../math/geometry/point.js";
|
|
5
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
6
|
+
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
8
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
9
|
+
const getPropositions = (n, { answer }) => {
|
|
10
|
+
const propositions = [];
|
|
11
|
+
addValidProp(propositions, answer);
|
|
12
|
+
propWhile(propositions, n, () => {
|
|
13
|
+
tryToAddWrongProp(propositions, randint(-10, 10) + "");
|
|
14
|
+
});
|
|
15
|
+
return shuffleProps(propositions, n);
|
|
16
|
+
};
|
|
17
|
+
const getAnswer = (identifiers) => {
|
|
18
|
+
const { pointAIds, pointBIds } = identifiers;
|
|
19
|
+
const A = PointConstructor.fromIdentifiers(pointAIds);
|
|
20
|
+
const B = PointConstructor.fromIdentifiers(pointBIds);
|
|
21
|
+
return frac(add(A.x, B.x), 2).simplify().toTex();
|
|
22
|
+
};
|
|
23
|
+
const getInstruction = (identifiers) => {
|
|
24
|
+
const { pointAIds, pointBIds } = identifiers;
|
|
25
|
+
const A = PointConstructor.fromIdentifiers(pointAIds);
|
|
26
|
+
const B = PointConstructor.fromIdentifiers(pointBIds);
|
|
27
|
+
return `On considère une parabole passant par les points $${A.toTexWithCoords()}$ et $${B.toTexWithCoords()}$.
|
|
28
|
+
|
|
29
|
+
Quelle est l'abscisse du sommet de cette parabole ?`;
|
|
30
|
+
};
|
|
31
|
+
const getHint = () => {
|
|
32
|
+
return `On sait que la parabole admet comme axe de symétrie la droite verticale passant par son sommet.`;
|
|
33
|
+
};
|
|
34
|
+
const getCorrection = (identifiers) => {
|
|
35
|
+
const { pointAIds, pointBIds } = identifiers;
|
|
36
|
+
const A = PointConstructor.fromIdentifiers(pointAIds);
|
|
37
|
+
const B = PointConstructor.fromIdentifiers(pointBIds);
|
|
38
|
+
return `$A$ et $B$ ont la même ordonnée, ils sont donc symétriques par rapport à l'axe de symétrie de la parabole.
|
|
39
|
+
|
|
40
|
+
L'abscisse du sommet de la parabole est donc la moyenne des abscisses des deux points :
|
|
41
|
+
|
|
42
|
+
$$
|
|
43
|
+
${frac(add(A.x, B.x), 2).toTex()} = ${frac(add(A.x, B.x).simplify(), 2).toSimplificationTex()}
|
|
44
|
+
$$`;
|
|
45
|
+
};
|
|
46
|
+
const getKeys = () => {
|
|
47
|
+
return [];
|
|
48
|
+
};
|
|
49
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
50
|
+
try {
|
|
51
|
+
return rationalVEA(ans, answer);
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
return handleVEAError(err);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const getSummitAbscissFromSymetricPointsQuestion = () => {
|
|
58
|
+
const y = randint(-10, 10);
|
|
59
|
+
const x = randint(-10, 10);
|
|
60
|
+
const x2 = x + randint(2, 10);
|
|
61
|
+
const A = new Point("A", x, y);
|
|
62
|
+
const B = new Point("B", x2, y);
|
|
63
|
+
const identifiers = {
|
|
64
|
+
pointAIds: A.toIdentifiers(),
|
|
65
|
+
pointBIds: B.toIdentifiers(),
|
|
66
|
+
};
|
|
67
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
68
|
+
};
|
|
69
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
70
|
+
return {
|
|
71
|
+
answer: getAnswer(identifiers),
|
|
72
|
+
instruction: getInstruction(identifiers),
|
|
73
|
+
keys: getKeys(identifiers),
|
|
74
|
+
answerFormat: "tex",
|
|
75
|
+
identifiers,
|
|
76
|
+
hint: getHint(identifiers),
|
|
77
|
+
correction: getCorrection(identifiers),
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export const summitAbscissFromSymetricPoints = {
|
|
81
|
+
id: "summitAbscissFromSymetricPoints",
|
|
82
|
+
connector: "=",
|
|
83
|
+
label: "Déterminer l'abscisse du sommet d'une parabole en connaissant deux points symétriques",
|
|
84
|
+
isSingleStep: true,
|
|
85
|
+
generator: (nb, opts) => getDistinctQuestions(() => getSummitAbscissFromSymetricPointsQuestion(opts), nb),
|
|
86
|
+
qcmTimer: 60,
|
|
87
|
+
freeTimer: 60,
|
|
88
|
+
getPropositions,
|
|
89
|
+
isAnswerValid,
|
|
90
|
+
subject: "Mathématiques",
|
|
91
|
+
getInstruction,
|
|
92
|
+
getHint,
|
|
93
|
+
getCorrection,
|
|
94
|
+
getAnswer,
|
|
95
|
+
getQuestionFromIdentifiers,
|
|
96
|
+
hasHintAndCorrection: true,
|
|
97
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"varOfAEXPlusB.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/variations/exp/varOfAEXPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"varOfAEXPlusB.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/variations/exp/varOfAEXPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAuFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAiB/C,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { AffineConstructor } from "../../../../../math/polynomials/affine.js";
|
|
4
3
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
4
|
import { exp } from "../../../../../tree/nodes/functions/expNode.js";
|
|
6
|
-
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../../tree/nodes/numbers/infiniteNode.js";
|
|
7
5
|
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
8
6
|
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
-
import {
|
|
10
|
-
import { IntervalNode } from "../../../../../tree/nodes/sets/intervalNode.js";
|
|
7
|
+
import { NamedIntervalIds, NamedIntervalNodeConstructor, } from "../../../../../tree/nodes/sets/namedIntervalNode.js";
|
|
11
8
|
const createNodeAEXPlusB = (a, b) => {
|
|
12
9
|
return add(multiply(a, exp("x".toTree())), b);
|
|
13
10
|
};
|
|
@@ -23,21 +20,15 @@ const getAnswer = (identifiers) => {
|
|
|
23
20
|
const { a } = identifiers;
|
|
24
21
|
return a > 0 ? "$f$ est croissante" : "$f$ est décroissante";
|
|
25
22
|
};
|
|
26
|
-
const getInterval = (
|
|
27
|
-
|
|
28
|
-
const interval = intervalAskedIndex === 0
|
|
29
|
-
? new IntervalNode(MinusInfinityNode, a.toTree(), ClosureType.OF)
|
|
30
|
-
: intervalAskedIndex === 1
|
|
31
|
-
? new IntervalNode(a.toTree(), b.toTree(), ClosureType.FF)
|
|
32
|
-
: new IntervalNode(b.toTree(), PlusInfinityNode, ClosureType.FO);
|
|
33
|
-
return interval;
|
|
23
|
+
const getInterval = () => {
|
|
24
|
+
return NamedIntervalNodeConstructor.fromName(NamedIntervalIds.R);
|
|
34
25
|
};
|
|
35
26
|
const getInstructionNode = (identifiers) => {
|
|
36
27
|
const { a, b } = identifiers;
|
|
37
28
|
return createNodeAEXPlusB(a, b);
|
|
38
29
|
};
|
|
39
30
|
const getInstruction = (identifiers) => {
|
|
40
|
-
const interval = getInterval(
|
|
31
|
+
const interval = getInterval();
|
|
41
32
|
const nodeInstruction = getInstructionNode(identifiers);
|
|
42
33
|
return `Soit la fonction $f$ définie sur $\\mathbb{R}$ par :
|
|
43
34
|
|
|
@@ -47,19 +38,23 @@ $$
|
|
|
47
38
|
|
|
48
39
|
Quel est le sens de variation de $f$ sur $${interval.toTex()}$ ?`;
|
|
49
40
|
};
|
|
50
|
-
const getHint = (
|
|
51
|
-
|
|
52
|
-
return `Observe comment varient les valeurs de $f(x)$ pour les valeurs de $x$ comprises dans l'intervalle $${interval.toTex()}$.`;
|
|
41
|
+
const getHint = () => {
|
|
42
|
+
return `Dérive et étudie le signe.`;
|
|
53
43
|
};
|
|
54
44
|
const getCorrection = (identifiers) => {
|
|
55
|
-
const { a
|
|
56
|
-
const interval = getInterval(
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
const { a } = identifiers;
|
|
46
|
+
const interval = getInterval();
|
|
47
|
+
const nodeInstruction = getInstructionNode(identifiers);
|
|
48
|
+
const isDerivativePositive = a > 0;
|
|
49
|
+
return `On calcule la dérivée. Soit $x$ dans $${interval.toTex()}$.
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
f'(x) = ${nodeInstruction.derivative().simplify().toTex()}
|
|
53
|
+
$$
|
|
54
|
+
|
|
55
|
+
$${a > 0 ? `${a.frenchify()} > 0` : `${a.frenchify()} < 0`}$ et $e^x >0$ donc $f'(x) ${isDerivativePositive ? ">" : "<"} 0$.
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
Conclusion : ${getAnswer(identifiers).toLocaleLowerCase()} sur $${interval.toTex()}$.`;
|
|
63
58
|
};
|
|
64
59
|
const getVarOfAEXPlusBQuestion = () => {
|
|
65
60
|
const a = randint(-10, 11, [0]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"varOfAEXPlusBOverCEXPlusD.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"varOfAEXPlusBOverCEXPlusD.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAgMF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAiB3D,CAAC"}
|
|
@@ -2,14 +2,13 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../e
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
4
4
|
import { exp } from "../../../../../tree/nodes/functions/expNode.js";
|
|
5
|
-
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../../tree/nodes/numbers/infiniteNode.js";
|
|
6
5
|
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
7
6
|
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
8
7
|
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
8
|
import { power } from "../../../../../tree/nodes/operators/powerNode.js";
|
|
10
9
|
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { NamedIntervalIds, NamedIntervalNodeConstructor, } from "../../../../../tree/nodes/sets/namedIntervalNode.js";
|
|
11
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
13
12
|
const createNodeAEXPlusB = (a, b) => {
|
|
14
13
|
return add(multiply(a, exp("x".toTree())), b);
|
|
15
14
|
};
|
|
@@ -36,14 +35,8 @@ const getAnswer = (identifiers) => {
|
|
|
36
35
|
const discr = substract(multiply(a, d), multiply(c, b)).evaluate();
|
|
37
36
|
return discr > 0 ? "$f$ est croissante" : "$f$ est décroissante";
|
|
38
37
|
};
|
|
39
|
-
const getInterval = (
|
|
40
|
-
|
|
41
|
-
const interval = intervalAskedIndex === 0
|
|
42
|
-
? new IntervalNode(MinusInfinityNode, a.toTree(), ClosureType.OF)
|
|
43
|
-
: intervalAskedIndex === 1
|
|
44
|
-
? new IntervalNode(a.toTree(), b.toTree(), ClosureType.FF)
|
|
45
|
-
: new IntervalNode(b.toTree(), PlusInfinityNode, ClosureType.FO);
|
|
46
|
-
return interval;
|
|
38
|
+
const getInterval = () => {
|
|
39
|
+
return NamedIntervalNodeConstructor.fromName(NamedIntervalIds.R);
|
|
47
40
|
};
|
|
48
41
|
const getInstructionNode = (identifiers) => {
|
|
49
42
|
const { a, b, c, d } = identifiers;
|
|
@@ -52,9 +45,9 @@ const getInstructionNode = (identifiers) => {
|
|
|
52
45
|
return frac(nodeNum, nodeDen);
|
|
53
46
|
};
|
|
54
47
|
const getInstruction = (identifiers) => {
|
|
55
|
-
const interval = getInterval(
|
|
48
|
+
const interval = getInterval();
|
|
56
49
|
const nodeInstruction = getInstructionNode(identifiers);
|
|
57
|
-
return `Soit la fonction $f$ définie sur
|
|
50
|
+
return `Soit la fonction $f$ définie sur $${interval.toTex()}$ par :
|
|
58
51
|
|
|
59
52
|
$$
|
|
60
53
|
f(x) = ${nodeInstruction.toTex()}
|
|
@@ -62,8 +55,8 @@ $$
|
|
|
62
55
|
|
|
63
56
|
Quel est le sens de variation de $f$ sur $${interval.toTex()}$ ?`;
|
|
64
57
|
};
|
|
65
|
-
const getHint = (
|
|
66
|
-
const interval = getInterval(
|
|
58
|
+
const getHint = () => {
|
|
59
|
+
const interval = getInterval();
|
|
67
60
|
return `Calcule la dérivée de $f$ pour en déduire les variations de $f$ sur $${interval.toTex()}$.`;
|
|
68
61
|
};
|
|
69
62
|
const getCorrection = (identifiers) => {
|
|
@@ -73,8 +66,10 @@ const getCorrection = (identifiers) => {
|
|
|
73
66
|
const nodeUPrime = nodeU.derivative().simplify();
|
|
74
67
|
const nodeVPrime = nodeV.derivative().simplify();
|
|
75
68
|
const discr = substract(multiply(a, d), multiply(c, b)).evaluate();
|
|
76
|
-
const interval = getInterval(
|
|
77
|
-
return `
|
|
69
|
+
const interval = getInterval();
|
|
70
|
+
return `Soit $x$ dans $${interval.toTex()}$.
|
|
71
|
+
|
|
72
|
+
On va calculer la dérivée du quotient.
|
|
78
73
|
|
|
79
74
|
Ici, on a :
|
|
80
75
|
|
|
@@ -98,17 +93,20 @@ $$
|
|
|
98
93
|
|
|
99
94
|
Donc :
|
|
100
95
|
|
|
101
|
-
|
|
102
|
-
f'(x) = (\\frac{u}{v})'(x)
|
|
103
|
-
|
|
96
|
+
${alignTex([
|
|
97
|
+
[`f'(x)`, "=", `(\\frac{u}{v})'(x)`],
|
|
98
|
+
[
|
|
99
|
+
`f'(x)`,
|
|
100
|
+
"=",
|
|
101
|
+
`${frac(substract(multiply(nodeUPrime, nodeV), multiply(nodeU, nodeVPrime)), power(nodeV, 2)).toTex()}`,
|
|
102
|
+
],
|
|
103
|
+
[`f'(x)`, "=", `${getDerivativeNodeSimplified1(identifiers).toTex()}`],
|
|
104
|
+
[`f'(x)`, "=", `${getDerivativeNodeSimplified2(identifiers).toTex()}`],
|
|
105
|
+
])}
|
|
104
106
|
|
|
105
|
-
|
|
106
|
-
f'(x) = (\\frac{u}{v})'(x) = ${getDerivativeNodeSimplified1(identifiers).toTex()}
|
|
107
|
-
$$
|
|
107
|
+
Le dénominateur est positif car c'est un carré.
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
f'(x) = (\\frac{u}{v})'(x) = ${getDerivativeNodeSimplified2(identifiers).toTex()}
|
|
111
|
-
$$
|
|
109
|
+
Le numérateur est ${discr > 0 ? "positif" : "négatif"} car $e^x > 0$
|
|
112
110
|
|
|
113
111
|
Conclusion : Pour tout $x$ réel :
|
|
114
112
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC"}
|