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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { CircleConstructor } from "../../../../math/geometry/circle.js";
|
|
4
|
+
import { Point, PointConstructor } from "../../../../math/geometry/point.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { equal } from "../../../../tree/nodes/equations/equalNode.js";
|
|
7
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
8
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
9
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
10
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
11
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
12
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
13
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
14
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
15
|
+
import { randomInt } from "crypto";
|
|
16
|
+
const getPropositions = (n, { answer }) => {
|
|
17
|
+
const propositions = [];
|
|
18
|
+
addValidProp(propositions, answer);
|
|
19
|
+
propWhile(propositions, n, () => {
|
|
20
|
+
const fakeCenter = PointConstructor.random("C");
|
|
21
|
+
const fakeRadius = randomInt(1, 10);
|
|
22
|
+
tryToAddWrongProp(propositions, CircleConstructor.cartesianEquation(fakeCenter, fakeRadius).toTex());
|
|
23
|
+
});
|
|
24
|
+
return shuffleProps(propositions, n);
|
|
25
|
+
};
|
|
26
|
+
const getAnswerNode = (identifiers) => {
|
|
27
|
+
const { aIds, bIds, cIds } = identifiers;
|
|
28
|
+
const a = reifyAlgebraic(aIds);
|
|
29
|
+
const b = reifyAlgebraic(bIds);
|
|
30
|
+
const c = reifyAlgebraic(cIds);
|
|
31
|
+
const abscisse = frac(a, -2).simplify();
|
|
32
|
+
const ordonne = frac(b, -2).simplify();
|
|
33
|
+
const radiusSquared = substract(add(square(abscisse), square(ordonne)), c).simplify();
|
|
34
|
+
return equal(add(square(substract("x", abscisse).simplify()), square(substract("y", ordonne).simplify())), radiusSquared.simplify());
|
|
35
|
+
};
|
|
36
|
+
const getAnswer = (identifiers) => {
|
|
37
|
+
return getAnswerNode(identifiers).toTex();
|
|
38
|
+
};
|
|
39
|
+
const getInstruction = (identifiers) => {
|
|
40
|
+
const { aIds, bIds, cIds } = identifiers;
|
|
41
|
+
const a = reifyAlgebraic(aIds);
|
|
42
|
+
const b = reifyAlgebraic(bIds);
|
|
43
|
+
const c = reifyAlgebraic(cIds);
|
|
44
|
+
return `Soit $\\mathcal{C}$ le cercle dont une équation cartésienne sous forme développée est :
|
|
45
|
+
|
|
46
|
+
$$
|
|
47
|
+
${add(add(square("x"), multiply(a, "x")), add(add(square("y"), multiply(b, "y")), c))
|
|
48
|
+
.simplify({
|
|
49
|
+
towardsDistribute: true,
|
|
50
|
+
forbidFactorize: true,
|
|
51
|
+
})
|
|
52
|
+
.toTex()} = 0
|
|
53
|
+
$$
|
|
54
|
+
|
|
55
|
+
Donner l'équation cartésienne de $\\mathcal{C}$ sous forme canonique.`;
|
|
56
|
+
};
|
|
57
|
+
const getHint = (identifiers) => {
|
|
58
|
+
const { aIds, bIds } = identifiers;
|
|
59
|
+
const a = reifyAlgebraic(aIds);
|
|
60
|
+
const b = reifyAlgebraic(bIds);
|
|
61
|
+
const aIsPos = a.evaluate() > 0;
|
|
62
|
+
const bIsPos = b.evaluate() > 0;
|
|
63
|
+
return `Réécrit l'équation en faisant apparaître des identités remarquables.
|
|
64
|
+
|
|
65
|
+
Pour cela, tu peux compléter les égalités suivantes :
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
${add(square("x"), multiply(a, "x")).toTex()} = ${square((aIsPos ? add : substract)("x", "\\ldots")).toTex()} - \\ldots
|
|
69
|
+
$$
|
|
70
|
+
|
|
71
|
+
et
|
|
72
|
+
|
|
73
|
+
$$
|
|
74
|
+
${add(square("y"), multiply(b, "y")).toTex()} = ${square((bIsPos ? add : substract)("y", "\\ldots")).toTex()} - \\ldots
|
|
75
|
+
$$
|
|
76
|
+
`;
|
|
77
|
+
};
|
|
78
|
+
const getCorrection = (identifiers) => {
|
|
79
|
+
const { aIds, bIds, cIds } = identifiers;
|
|
80
|
+
const a = reifyAlgebraic(aIds);
|
|
81
|
+
const b = reifyAlgebraic(bIds);
|
|
82
|
+
const c = reifyAlgebraic(cIds);
|
|
83
|
+
const abscisse = frac(a, -2).simplify();
|
|
84
|
+
const ordonne = frac(b, -2).simplify();
|
|
85
|
+
const firstId = substract(square(substract("x", abscisse).simplify()), square(abscisse).simplify());
|
|
86
|
+
const secondId = substract(square(substract("y", ordonne).simplify()), square(ordonne).simplify());
|
|
87
|
+
return `On réécrit l'équation en faisant apparaître des identités remarquables. Pour cela, on remarque que :
|
|
88
|
+
|
|
89
|
+
$$
|
|
90
|
+
${add(square("x"), multiply(a, "x")).toTex()} = ${firstId.toTex()}
|
|
91
|
+
$$
|
|
92
|
+
|
|
93
|
+
et :
|
|
94
|
+
|
|
95
|
+
$$
|
|
96
|
+
${add(square("y"), multiply(b, "y")).toTex()} = ${secondId.toTex()}
|
|
97
|
+
$$
|
|
98
|
+
|
|
99
|
+
L'équation peut donc se réécrire :
|
|
100
|
+
|
|
101
|
+
$$
|
|
102
|
+
${add(add(firstId, secondId), c).toTex()} = 0
|
|
103
|
+
$$
|
|
104
|
+
|
|
105
|
+
La forme canonique est donc :
|
|
106
|
+
|
|
107
|
+
$$
|
|
108
|
+
${getAnswer(identifiers)}
|
|
109
|
+
$$
|
|
110
|
+
|
|
111
|
+
`;
|
|
112
|
+
};
|
|
113
|
+
const getKeys = () => {
|
|
114
|
+
return ["x", "y", "equal"];
|
|
115
|
+
};
|
|
116
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
117
|
+
try {
|
|
118
|
+
const split = ans.split("=");
|
|
119
|
+
if (split.length !== 2)
|
|
120
|
+
return false;
|
|
121
|
+
const left = parseAlgebraic(split[0]);
|
|
122
|
+
const right = parseAlgebraic(split[1]);
|
|
123
|
+
const studentEq = substract(left, right).simplify();
|
|
124
|
+
const eqNode = getAnswerNode(identifiers);
|
|
125
|
+
const ansNode = substract(eqNode.leftChild, eqNode.rightChild).simplify();
|
|
126
|
+
return studentEq.toTex() === ansNode.toTex();
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
return handleVEAError(err);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const getCircleCanonicalEquationFromDevEquationQuestion = () => {
|
|
133
|
+
const radius = randint(1, 10).toTree();
|
|
134
|
+
const centerx = randint(-9, 10, [0]);
|
|
135
|
+
const centery = randint(-9, 10, [0]);
|
|
136
|
+
const center = new Point("C", centerx, centery);
|
|
137
|
+
const identifiers = {
|
|
138
|
+
aIds: multiply(-2, center.x).simplify().toIdentifiers(),
|
|
139
|
+
bIds: multiply(-2, center.y).simplify().toIdentifiers(),
|
|
140
|
+
cIds: substract(add(square(center.x), square(center.y)), square(radius))
|
|
141
|
+
.simplify()
|
|
142
|
+
.toIdentifiers(),
|
|
143
|
+
};
|
|
144
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
145
|
+
};
|
|
146
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
147
|
+
return {
|
|
148
|
+
answer: getAnswer(identifiers),
|
|
149
|
+
instruction: getInstruction(identifiers),
|
|
150
|
+
keys: getKeys(identifiers),
|
|
151
|
+
answerFormat: "tex",
|
|
152
|
+
identifiers,
|
|
153
|
+
hint: getHint(identifiers),
|
|
154
|
+
correction: getCorrection(identifiers),
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
export const circleCanonicalEquationFromDevEquation = {
|
|
158
|
+
id: "circleCanonicalEquationFromDevEquation",
|
|
159
|
+
connector: "\\iff",
|
|
160
|
+
label: "Donner l'équation cartésienne canonique d'un cercle à partir d'une équation développée",
|
|
161
|
+
isSingleStep: true,
|
|
162
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCircleCanonicalEquationFromDevEquationQuestion(opts), nb),
|
|
163
|
+
qcmTimer: 60,
|
|
164
|
+
freeTimer: 60,
|
|
165
|
+
getPropositions,
|
|
166
|
+
isAnswerValid,
|
|
167
|
+
subject: "Mathématiques",
|
|
168
|
+
getInstruction,
|
|
169
|
+
getHint,
|
|
170
|
+
getCorrection,
|
|
171
|
+
getAnswer,
|
|
172
|
+
getQuestionFromIdentifiers,
|
|
173
|
+
hasHintAndCorrection: true,
|
|
174
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { EqualNodeIdentifiers } from "../../../../tree/nodes/equations/equalNode.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
isAskingRadius: boolean;
|
|
5
|
+
equationIds: EqualNodeIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
type Options = {
|
|
8
|
+
askedParameter: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const circleCenterAndRadiusFromEquation: Exercise<Identifiers, Options>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=circleCenterAndRadiusFromEquation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circleCenterAndRadiusFromEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,oBAAoB,EACrB,MAAM,yCAAyC,CAAC;AAWjD,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC;AAqJF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAWF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAwB1E,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, GeneratorOptionType, GeneratorOptionTarget, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { pointVEA } from "../../../../exercises/vea/pointVEA.js";
|
|
4
|
+
import { sqrtVEA } from "../../../../exercises/vea/sqrtVEA.js";
|
|
5
|
+
import { CircleConstructor } from "../../../../math/geometry/circle.js";
|
|
6
|
+
import { Point, PointConstructor } from "../../../../math/geometry/point.js";
|
|
7
|
+
import { SquareRootConstructor } from "../../../../math/numbers/reals/real.js";
|
|
8
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
9
|
+
import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
10
|
+
import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
11
|
+
import { reifyAlgebraic } from "../../../../tree/nodes/nodeConstructor.js";
|
|
12
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
13
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
14
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
15
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
16
|
+
const getPropositions = (n, { answer, isAskingRadius }) => {
|
|
17
|
+
const propositions = [];
|
|
18
|
+
addValidProp(propositions, answer);
|
|
19
|
+
propWhile(propositions, n, () => {
|
|
20
|
+
if (isAskingRadius)
|
|
21
|
+
tryToAddWrongProp(propositions, coinFlip()
|
|
22
|
+
? randint(1, 10) + ""
|
|
23
|
+
: SquareRootConstructor.randomIrreductible(20).toTex());
|
|
24
|
+
else
|
|
25
|
+
tryToAddWrongProp(propositions, PointConstructor.random("A").toCoords());
|
|
26
|
+
});
|
|
27
|
+
return shuffleProps(propositions, n);
|
|
28
|
+
};
|
|
29
|
+
const getAnswer = (identifiers) => {
|
|
30
|
+
const { equationIds, isAskingRadius } = identifiers;
|
|
31
|
+
const equation = reifyAlgebraic(equationIds);
|
|
32
|
+
console.log(equation.toTex());
|
|
33
|
+
if (isAskingRadius)
|
|
34
|
+
return sqrt(equation.rightChild).simplify().toTex();
|
|
35
|
+
const left = equation.leftChild;
|
|
36
|
+
const xNode = left.leftChild;
|
|
37
|
+
const abscisse = opposite(xNode.leftChild.toDetailedEvaluation({ x: (0).toTree() })).simplify();
|
|
38
|
+
const yNode = left.rightChild;
|
|
39
|
+
const ordonnee = opposite(yNode.leftChild.toDetailedEvaluation({ y: (0).toTree() })).simplify();
|
|
40
|
+
return new Point("O", abscisse, ordonnee).toCoords();
|
|
41
|
+
};
|
|
42
|
+
const getInstruction = (identifiers) => {
|
|
43
|
+
const { equationIds, isAskingRadius } = identifiers;
|
|
44
|
+
const equation = reifyAlgebraic(equationIds);
|
|
45
|
+
return `Soit $\\mathcal{C}$ le cercle dont une équation cartésienne est :
|
|
46
|
+
|
|
47
|
+
$$
|
|
48
|
+
${equation.toTex()}
|
|
49
|
+
$$
|
|
50
|
+
|
|
51
|
+
${isAskingRadius
|
|
52
|
+
? "Quel est le rayon de $\\mathcal{C}$ ?"
|
|
53
|
+
: "Quelles sont les coordonnées du centre de $\\mathcal{C}$ ?"}`;
|
|
54
|
+
};
|
|
55
|
+
const getHint = () => {
|
|
56
|
+
return `Si $A(x_A;y_A)$ est le centre d'un cercle $\\mathcal{C}$ de rayon $R$, alors une équation cartésienne de $\\mathcal{C}$ est :
|
|
57
|
+
|
|
58
|
+
$$
|
|
59
|
+
(x-x_A)^2+(y-y_A)^2 = R^2
|
|
60
|
+
$$`;
|
|
61
|
+
};
|
|
62
|
+
const getCorrection = (identifiers) => {
|
|
63
|
+
const { isAskingRadius, equationIds } = identifiers;
|
|
64
|
+
const radius = getAnswer({ equationIds, isAskingRadius: true });
|
|
65
|
+
const coords = getAnswer({ equationIds, isAskingRadius: false });
|
|
66
|
+
const coordsTrimed = coords
|
|
67
|
+
.replaceAll("\\left", "")
|
|
68
|
+
.replaceAll("\\right", "")
|
|
69
|
+
.replaceAll("(", "")
|
|
70
|
+
.replaceAll(")", "");
|
|
71
|
+
const abscisse = coordsTrimed.split(";")[0].unfrenchify();
|
|
72
|
+
const ordonnee = coordsTrimed.split(";")[1].unfrenchify();
|
|
73
|
+
return `Si $A(x_A;y_A)$ est le centre d'un cercle $\\mathcal{C}$ de rayon $R$, alors une équation cartésienne de $R$ est :
|
|
74
|
+
|
|
75
|
+
$$
|
|
76
|
+
(x-x_A)^2+(y-y_A)^2 = R^2
|
|
77
|
+
$$
|
|
78
|
+
|
|
79
|
+
Ici, on peut donc réécrire l'équation pour faire apparaître les coordonnées du centre et le rayon :
|
|
80
|
+
|
|
81
|
+
$$
|
|
82
|
+
(${substract("x", abscisse).toTex()})^2 + (${substract("y", ordonnee).toTex()})^2 = ${square(radius).toTex()}
|
|
83
|
+
$$
|
|
84
|
+
|
|
85
|
+
${isAskingRadius
|
|
86
|
+
? `Le rayon de $\\mathcal{C}$ est donc $${radius}$.`
|
|
87
|
+
: `Les coordonnées du centre de $\\mathcal{C}$ sont donc $${coords}$.`}`;
|
|
88
|
+
};
|
|
89
|
+
const getKeys = () => {
|
|
90
|
+
return ["semicolon"];
|
|
91
|
+
};
|
|
92
|
+
const isAnswerValid = (ans, { answer, isAskingRadius }) => {
|
|
93
|
+
try {
|
|
94
|
+
if (isAskingRadius)
|
|
95
|
+
return sqrtVEA(ans, answer);
|
|
96
|
+
else {
|
|
97
|
+
return pointVEA(ans, answer);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
return handleVEAError(err);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const getCircleCenterAndRadiusFromEquationQuestion = (opts) => {
|
|
105
|
+
const isAskingRadius = opts?.askedParameter === "Rayon"
|
|
106
|
+
? true
|
|
107
|
+
: opts?.askedParameter === "Coordonnées du centre"
|
|
108
|
+
? false
|
|
109
|
+
: coinFlip();
|
|
110
|
+
const center = PointConstructor.random("O");
|
|
111
|
+
const radius = coinFlip()
|
|
112
|
+
? randint(1, 10).toTree()
|
|
113
|
+
: SquareRootConstructor.randomIrreductible(20).toTree();
|
|
114
|
+
const eq = CircleConstructor.cartesianEquation(center, radius);
|
|
115
|
+
console.log("rad ", radius.toTex(), "eq ", eq.toTex());
|
|
116
|
+
const identifiers = {
|
|
117
|
+
isAskingRadius,
|
|
118
|
+
equationIds: eq.toIdentifiers(),
|
|
119
|
+
};
|
|
120
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
121
|
+
};
|
|
122
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
123
|
+
return {
|
|
124
|
+
answer: getAnswer(identifiers),
|
|
125
|
+
instruction: getInstruction(identifiers),
|
|
126
|
+
keys: getKeys(identifiers),
|
|
127
|
+
answerFormat: "tex",
|
|
128
|
+
identifiers,
|
|
129
|
+
hint: getHint(identifiers),
|
|
130
|
+
correction: getCorrection(identifiers),
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const options = [
|
|
134
|
+
{
|
|
135
|
+
id: "askedParameter",
|
|
136
|
+
label: "Paramètre demandé",
|
|
137
|
+
target: GeneratorOptionTarget.generation,
|
|
138
|
+
type: GeneratorOptionType.select,
|
|
139
|
+
values: ["Rayon", "Coordonnées du centre", "L'un ou l'autre aléatoirement"],
|
|
140
|
+
defaultValue: "L'un ou l'autre aléatoirement",
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
export const circleCenterAndRadiusFromEquation = {
|
|
144
|
+
id: "circleCenterAndRadiusFromEquation",
|
|
145
|
+
connector: "=",
|
|
146
|
+
label: "Déterminer le centre ou le rayon d'un cercle dans son équation canonique",
|
|
147
|
+
isSingleStep: true,
|
|
148
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCircleCenterAndRadiusFromEquationQuestion(opts), nb),
|
|
149
|
+
qcmTimer: 60,
|
|
150
|
+
freeTimer: 60,
|
|
151
|
+
getPropositions,
|
|
152
|
+
isAnswerValid,
|
|
153
|
+
subject: "Mathématiques",
|
|
154
|
+
getInstruction,
|
|
155
|
+
getHint,
|
|
156
|
+
getCorrection,
|
|
157
|
+
getAnswer,
|
|
158
|
+
getQuestionFromIdentifiers,
|
|
159
|
+
hasHintAndCorrection: true,
|
|
160
|
+
options,
|
|
161
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
AIds: PointIdentifiers;
|
|
5
|
+
BIds: PointIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const circleEquationFromDiameter: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=circleEquationFromDiameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circleEquationFromDiameter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/circleEquationFromDiameter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAStC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AA+JF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAmB5D,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { PointConstructor, } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { Vector } from "../../../../math/geometry/vector.js";
|
|
5
|
+
import { equal } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
7
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
8
|
+
import { doWhile } from "../../../../utils/doWhile.js";
|
|
9
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
10
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
11
|
+
const getPropositions = (n, { answer }) => {
|
|
12
|
+
const propositions = [];
|
|
13
|
+
addValidProp(propositions, answer);
|
|
14
|
+
propWhile(propositions, n, () => {
|
|
15
|
+
const [A, B] = PointConstructor.randomDifferent(2, {});
|
|
16
|
+
tryToAddWrongProp(propositions, getAnswer({
|
|
17
|
+
AIds: A.toIdentifiers(),
|
|
18
|
+
BIds: B.toIdentifiers(),
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
return shuffleProps(propositions, n);
|
|
22
|
+
};
|
|
23
|
+
const getAnswerNode = (identifiers) => {
|
|
24
|
+
// const { AIds, BIds } = identifiers;
|
|
25
|
+
// const A = PointConstructor.fromIdentifiers(AIds);
|
|
26
|
+
// const B = PointConstructor.fromIdentifiers(BIds);
|
|
27
|
+
// const center = A.midpoint(B).simplify();
|
|
28
|
+
// const radius = frac(A.distanceToNode(B), 2).simplify();
|
|
29
|
+
// return CircleConstructor.cartesianEquation(center, radius);
|
|
30
|
+
const { AIds, BIds } = identifiers;
|
|
31
|
+
const A = PointConstructor.fromIdentifiers(AIds);
|
|
32
|
+
const B = PointConstructor.fromIdentifiers(BIds);
|
|
33
|
+
const AM = new Vector("AM", substract("x", A.x), substract("y", A.y)).simplify();
|
|
34
|
+
const BM = new Vector("BM", substract("x", B.x), substract("y", B.y)).simplify();
|
|
35
|
+
return equal(AM.scalarProduct(BM)
|
|
36
|
+
.simplify({ forbidFactorize: true, towardsDistribute: true })
|
|
37
|
+
.toTex(), 0);
|
|
38
|
+
};
|
|
39
|
+
const getAnswer = (identifiers) => {
|
|
40
|
+
return getAnswerNode(identifiers).toTex();
|
|
41
|
+
};
|
|
42
|
+
const getInstruction = (identifiers) => {
|
|
43
|
+
const { AIds, BIds } = identifiers;
|
|
44
|
+
const A = PointConstructor.fromIdentifiers(AIds);
|
|
45
|
+
const B = PointConstructor.fromIdentifiers(BIds);
|
|
46
|
+
return `Soit $\\mathcal{C}$ le cercle de diamètre $[AB]$, avec $${A.toTexWithCoords()}$ et $${B.toTexWithCoords()}$.
|
|
47
|
+
|
|
48
|
+
Donner une équation cartésienne du cercle $\\mathcal{C}$.`;
|
|
49
|
+
};
|
|
50
|
+
const getHint = () => {
|
|
51
|
+
return `Si $[AB]$ est le diamètre d'un cercle $\\mathcal{C}$, alors tout point de $C$ est tel que $ABC$ est un triangle rectangle en $C$.
|
|
52
|
+
|
|
53
|
+
Cela signifie donc qu'un point $C(x;y)$ est sur le cercle $\\mathcal{C}$ si et seulement si les vecteurs $\\overrightarrow{AC}$ et $\\overrightarrow{BC}$ sont orthogonaux.`;
|
|
54
|
+
};
|
|
55
|
+
const getCorrection = (identifiers) => {
|
|
56
|
+
const { AIds, BIds } = identifiers;
|
|
57
|
+
const A = PointConstructor.fromIdentifiers(AIds);
|
|
58
|
+
const B = PointConstructor.fromIdentifiers(BIds);
|
|
59
|
+
const AM = new Vector("AM", substract("x", A.x), substract("y", A.y)).simplify();
|
|
60
|
+
const BM = new Vector("BM", substract("x", B.x), substract("y", B.y)).simplify();
|
|
61
|
+
// const center = A.midpoint(B).simplify();
|
|
62
|
+
// const radius = frac(A.distanceToNode(B), 2).simplify();
|
|
63
|
+
// const canoEq = CircleConstructor.cartesianEquation(center, radius).toTex();
|
|
64
|
+
return `On considère un point $M(x;y)$.
|
|
65
|
+
|
|
66
|
+
Le point $M$ appartient à $\\mathcal{C}$ si seulement si le triangle $ABM$ est rectangle en $M$, c'est à dire si $\\overrightarrow{AM}$ et $\\overrightarrow{BM}$ sont orthogonaux.
|
|
67
|
+
|
|
68
|
+
Donc le point $M$ appartient à $\\mathcal{C}$ si et seulement si :
|
|
69
|
+
|
|
70
|
+
${alignTex([
|
|
71
|
+
["", "\\overrightarrow{AM}\\cdot \\overrightarrow{BM}=0"],
|
|
72
|
+
["\\iff", `${AM.scalarProduct(BM).toTex()} = 0`],
|
|
73
|
+
[
|
|
74
|
+
"\\iff",
|
|
75
|
+
`${AM.scalarProduct(BM)
|
|
76
|
+
.simplify({ forbidFactorize: true, towardsDistribute: true })
|
|
77
|
+
.toTex()} = 0`,
|
|
78
|
+
],
|
|
79
|
+
])}
|
|
80
|
+
|
|
81
|
+
Une équation cartésienne du cercle $\\mathcal{C}$ est donc :
|
|
82
|
+
|
|
83
|
+
$$
|
|
84
|
+
${getAnswer(identifiers)}
|
|
85
|
+
$$`;
|
|
86
|
+
};
|
|
87
|
+
const getKeys = () => {
|
|
88
|
+
return ["x", "y", "equal"];
|
|
89
|
+
};
|
|
90
|
+
const isAnswerValid = (ans, { answer: _answer, ...identifiers }) => {
|
|
91
|
+
try {
|
|
92
|
+
const split = ans.split("=");
|
|
93
|
+
if (split.length !== 2)
|
|
94
|
+
return false;
|
|
95
|
+
const left = parseAlgebraic(split[0]);
|
|
96
|
+
const right = parseAlgebraic(split[1]);
|
|
97
|
+
const studentEq = substract(left, right).simplify({
|
|
98
|
+
towardsDistribute: true,
|
|
99
|
+
forbidFactorize: true,
|
|
100
|
+
});
|
|
101
|
+
const ansNodeDev = getAnswerNode(identifiers).leftChild;
|
|
102
|
+
return studentEq.toTex() === ansNodeDev.toTex();
|
|
103
|
+
}
|
|
104
|
+
catch (err) {
|
|
105
|
+
return handleVEAError(err);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const getCircleEquationFromDiameterQuestion = () => {
|
|
109
|
+
const A = PointConstructor.random("A");
|
|
110
|
+
const B = doWhile(() => PointConstructor.random("B"), (p) => p.equals(A));
|
|
111
|
+
const identifiers = {
|
|
112
|
+
AIds: A.toIdentifiers(),
|
|
113
|
+
BIds: B.toIdentifiers(),
|
|
114
|
+
};
|
|
115
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
116
|
+
};
|
|
117
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
118
|
+
return {
|
|
119
|
+
answer: getAnswer(identifiers),
|
|
120
|
+
instruction: getInstruction(identifiers),
|
|
121
|
+
keys: getKeys(identifiers),
|
|
122
|
+
answerFormat: "tex",
|
|
123
|
+
identifiers,
|
|
124
|
+
hint: getHint(identifiers),
|
|
125
|
+
correction: getCorrection(identifiers),
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export const circleEquationFromDiameter = {
|
|
129
|
+
id: "circleEquationFromDiameter",
|
|
130
|
+
connector: "\\iff",
|
|
131
|
+
label: "Déterminer une équation cartésienne d'un cercle en connaissant son diamètre",
|
|
132
|
+
isSingleStep: true,
|
|
133
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCircleEquationFromDiameterQuestion(opts), nb),
|
|
134
|
+
qcmTimer: 60,
|
|
135
|
+
freeTimer: 60,
|
|
136
|
+
getPropositions,
|
|
137
|
+
isAnswerValid,
|
|
138
|
+
subject: "Mathématiques",
|
|
139
|
+
getInstruction,
|
|
140
|
+
getHint,
|
|
141
|
+
getCorrection,
|
|
142
|
+
getAnswer,
|
|
143
|
+
getQuestionFromIdentifiers,
|
|
144
|
+
hasHintAndCorrection: true,
|
|
145
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
centerIds: PointIdentifiers;
|
|
6
|
+
radiusIds: NodeIdentifiers;
|
|
7
|
+
};
|
|
8
|
+
type Options = {
|
|
9
|
+
equationType: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const circleEquationFromPointAndRadius: Exercise<Identifiers, Options>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=circleEquationFromPointAndRadius.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circleEquationFromPointAndRadius.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/circleEquationFromPointAndRadius.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AAwMF,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAYF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAwBzE,CAAC"}
|