math-exercises 3.0.170 → 3.0.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +38 -10
- package/lib/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.js +7 -4
- package/lib/exercises/math/derivation/variations/signVarTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromGraph.js +2 -3
- package/lib/exercises/math/functions/trinoms/problems/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/problems/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/problems/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.js +202 -0
- package/lib/exercises/math/functions/variations/partialVarTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/partialVarTableFromGraph.js +2 -1
- package/lib/exercises/math/functions/variations/varTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableFromGraph.js +2 -1
- package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableFromSentences.js +2 -1
- package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.js +0 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +64 -60
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +173 -47
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +112 -46
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +6 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +60 -82
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +92 -6
- package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts +6 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/index.js +6 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +6 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +15 -5
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +18 -14
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +15 -5
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +38 -4
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +77 -26
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +6 -7
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +3 -16
- package/lib/exercises/math/probaStat/randomVariable/calculateProbaFromVATableLaw.d.ts +11 -0
- package/lib/exercises/math/probaStat/randomVariable/calculateProbaFromVATableLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/calculateProbaFromVATableLaw.js +232 -0
- package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts +14 -0
- package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.js +167 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +29 -56
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +9 -0
- package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.js +6 -6
- package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.js +116 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts +11 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.js +112 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.js +176 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.js +94 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +162 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.js +133 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.js +211 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.js +113 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.js +1 -1
- package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts +31 -0
- package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.js +192 -0
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +40 -11
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +172 -30
- package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianWithList.js +16 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticVariations.js +1 -1
- package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.js +0 -2
- package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
- package/lib/exercises/vea/rationalVEA.js +7 -3
- package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/varLineVEA.js +2 -1
- package/lib/exercises/vea/varSignTableVEA.d.ts +8 -0
- package/lib/exercises/vea/varSignTableVEA.d.ts.map +1 -1
- package/lib/exercises/vea/varSignTableVEA.js +8 -0
- package/lib/exercises/vea/xTableLineVEA.d.ts +1 -0
- package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/xTableLineVEA.js +1 -0
- package/lib/index.d.ts +86 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +3 -1
- package/lib/math/geometry/angle.d.ts +2 -0
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +17 -0
- package/lib/math/geometry/point.js +2 -2
- package/lib/math/geometry/segment.js +1 -1
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.js +4 -0
- package/lib/math/probability/randomVariable.d.ts +2 -1
- package/lib/math/probability/randomVariable.d.ts.map +1 -1
- package/lib/math/probability/randomVariable.js +7 -1
- package/lib/math/utils/arithmetic/primeFactors.d.ts +1 -1
- package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -1
- package/lib/math/utils/arithmetic/primeFactors.js +23 -9
- package/lib/math/utils/random/randTupleInt.d.ts +1 -0
- package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
- package/lib/math/utils/random/randTupleInt.js +3 -0
- package/lib/tests/exosTest.d.ts.map +1 -1
- package/lib/tests/exosTest.js +2 -0
- package/lib/tests/pdfs/mdTableToLatexTabular.js +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.d.ts +1 -0
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.js +3 -0
- package/lib/tree/nodes/equations/equalNode.d.ts +1 -0
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +3 -0
- 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/equations/multiEqualNode.d.ts +1 -0
- package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/multiEqualNode.js +3 -0
- package/lib/tree/nodes/equations/notEqualNode.d.ts +1 -0
- package/lib/tree/nodes/equations/notEqualNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/notEqualNode.js +3 -0
- package/lib/tree/nodes/functions/absNode.d.ts +1 -0
- package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/absNode.js +7 -0
- package/lib/tree/nodes/functions/arcSinNode.d.ts +1 -0
- package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arcSinNode.js +7 -0
- package/lib/tree/nodes/functions/arccosNode.d.ts +1 -0
- package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arccosNode.js +7 -0
- package/lib/tree/nodes/functions/arctanNode.d.ts +1 -0
- package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arctanNode.js +7 -0
- package/lib/tree/nodes/functions/cosNode.d.ts +1 -0
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +7 -0
- package/lib/tree/nodes/functions/expNode.d.ts +1 -0
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +7 -0
- package/lib/tree/nodes/functions/factorialNode.d.ts +30 -0
- package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/factorialNode.js +79 -0
- package/lib/tree/nodes/functions/functionNode.d.ts +2 -1
- package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/functionNode.js +1 -0
- package/lib/tree/nodes/functions/integralNode.d.ts +1 -0
- package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/integralNode.js +7 -0
- package/lib/tree/nodes/functions/log10Node.d.ts +1 -0
- package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
- package/lib/tree/nodes/functions/log10Node.js +7 -0
- package/lib/tree/nodes/functions/logNode.d.ts +1 -0
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +9 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +7 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +7 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +7 -0
- package/lib/tree/nodes/functions/tanNode.d.ts +1 -0
- package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/tanNode.js +7 -0
- package/lib/tree/nodes/geometry/degree.d.ts +1 -0
- package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +7 -0
- package/lib/tree/nodes/geometry/lengthNode.d.ts +1 -0
- package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/lengthNode.js +7 -0
- package/lib/tree/nodes/geometry/pointNode.d.ts +1 -0
- package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/pointNode.js +7 -0
- package/lib/tree/nodes/geometry/vectorNode.d.ts +1 -0
- package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/vectorNode.js +7 -0
- package/lib/tree/nodes/inequations/inequationNode.d.ts +1 -0
- package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationNode.js +7 -0
- 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 +7 -0
- package/lib/tree/nodes/node.d.ts +2 -1
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +2 -0
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
- package/lib/tree/nodes/nodeConstructor.js +4 -0
- package/lib/tree/nodes/numbers/percentNode.d.ts +1 -0
- package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/percentNode.js +7 -0
- package/lib/tree/nodes/operators/addNode.d.ts +1 -0
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +7 -0
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.js +18 -2
- package/lib/tree/nodes/operators/divideNode.d.ts +1 -0
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/divideNode.js +7 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +7 -0
- package/lib/tree/nodes/operators/limitNode.d.ts +1 -0
- package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/limitNode.js +7 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +7 -0
- package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +7 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +7 -0
- package/lib/tree/nodes/polynomials/monomNode.d.ts +1 -0
- package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
- package/lib/tree/nodes/polynomials/monomNode.js +7 -0
- package/lib/tree/nodes/polynomials/trinomNode.d.ts +1 -0
- package/lib/tree/nodes/polynomials/trinomNode.d.ts.map +1 -1
- package/lib/tree/nodes/polynomials/trinomNode.js +7 -0
- package/lib/tree/nodes/sets/belongsNode.d.ts +1 -0
- package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/belongsNode.js +7 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +7 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts +1 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +7 -0
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts +1 -0
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +7 -0
- package/lib/tree/nodes/variables/variableNode.d.ts +1 -0
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.js +7 -0
- package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -1
- package/lib/tree/utilities/nodeShuffler.js +3 -0
- package/lib/tree/utilities/nodeSimplifier.d.ts.map +1 -1
- package/lib/tree/utilities/nodeSimplifier.js +3 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
|
9
9
|
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
10
10
|
import { degreeParser } from "../../../../../tree/parsers/degreeParser.js";
|
|
11
11
|
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
12
13
|
const getPoints = (identifiers) => {
|
|
13
14
|
return identifiers.pointsIdentifiers.map(PointConstructor.fromIdentifiers);
|
|
14
15
|
};
|
|
@@ -38,8 +39,92 @@ const getInstruction = (identifiers) => {
|
|
|
38
39
|
|
|
39
40
|
Donner une mesure, arrondie au degré, de l'angle $\\widehat{${names.join("")}}$.`;
|
|
40
41
|
};
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
const getHint = (identifiers) => {
|
|
43
|
+
const points = getPoints(identifiers);
|
|
44
|
+
const names = points.map((p) => p.name);
|
|
45
|
+
const [nA, nB, nC] = names;
|
|
46
|
+
const u = `\\overrightarrow{${nB}${nA}}`;
|
|
47
|
+
const v = `\\overrightarrow{${nB}${nC}}`;
|
|
48
|
+
return `L'angle $\\widehat{${nA}${nB}${nC}}$ est formé par les vecteurs $${u}$ et $${v}$.
|
|
49
|
+
Calcule leur produit scalaire puis utilise sa définition :
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
${u} \\cdot ${v} = \\lVert{${nB}${nA}}\\rVert \\times \\lVert{${nB}${nC}}\\rVert \\times \\cos(\\widehat{${nA}${nB}${nC}})
|
|
53
|
+
$$
|
|
54
|
+
|
|
55
|
+
Tu pourras alors déterminer $\\cos(\\widehat{${nA}${nB}${nC}})$ et en déduire une mesure de l'angle $\\widehat{${nA}${nB}${nC}}$.`;
|
|
56
|
+
};
|
|
57
|
+
const getCorrection = (identifiers) => {
|
|
58
|
+
const points = getPoints(identifiers);
|
|
59
|
+
const names = points.map((p) => p.name);
|
|
60
|
+
const u = `\\overrightarrow{${names[1]}${names[0]}}`;
|
|
61
|
+
const v = `\\overrightarrow{${names[1]}${names[2]}}`;
|
|
62
|
+
const vecURaw = VectorConstructor.fromPointsRaw(points[1], points[0]);
|
|
63
|
+
const vecVRaw = VectorConstructor.fromPointsRaw(points[1], points[2]);
|
|
64
|
+
const vecU = vecURaw.simplify();
|
|
65
|
+
const vecV = vecVRaw.simplify();
|
|
66
|
+
const nodeNormU = vecU.getNorm();
|
|
67
|
+
const nodeNormV = vecV.getNorm();
|
|
68
|
+
const nodeScalarProduct = vecU.scalarProduct(vecV);
|
|
69
|
+
const nodeNormUSimplified = nodeNormU.simplify();
|
|
70
|
+
const nodeNormVSimplified = nodeNormV.simplify();
|
|
71
|
+
const nodeScalarProductSimplified = nodeScalarProduct.simplify();
|
|
72
|
+
const angleName = `\\widehat{${names.join("")}}`;
|
|
73
|
+
return `D'après la définition du produit scalaire :
|
|
74
|
+
|
|
75
|
+
$$
|
|
76
|
+
${u} \\cdot ${v} = \\lVert ${u} \\rVert \\times \\lVert ${v} \\rVert \\times \\cos(${angleName})
|
|
77
|
+
$$
|
|
78
|
+
|
|
79
|
+
Or :
|
|
80
|
+
|
|
81
|
+
$$
|
|
82
|
+
${u} = ${vecURaw.toCoords()} = ${vecU.toCoords()}
|
|
83
|
+
$$
|
|
84
|
+
|
|
85
|
+
$$
|
|
86
|
+
${v} = ${vecVRaw.toCoords()} = ${vecV.toCoords()}
|
|
87
|
+
$$
|
|
88
|
+
|
|
89
|
+
Ainsi :
|
|
90
|
+
|
|
91
|
+
${alignTex([
|
|
92
|
+
[`${u} \\cdot ${v}`, "=", nodeScalarProduct.toTex()],
|
|
93
|
+
["", "=", nodeScalarProductSimplified.toTex()],
|
|
94
|
+
])}
|
|
95
|
+
|
|
96
|
+
On calcule ensuite les normes des vecteurs :
|
|
97
|
+
|
|
98
|
+
${alignTex([
|
|
99
|
+
[`\\lVert ${u} \\rVert`, "=", nodeNormU.toTex()],
|
|
100
|
+
["", "=", nodeNormUSimplified.toTex()],
|
|
101
|
+
])}
|
|
102
|
+
|
|
103
|
+
${alignTex([
|
|
104
|
+
[`\\lVert ${v} \\rVert`, "=", nodeNormV.toTex()],
|
|
105
|
+
["", "=", nodeNormVSimplified.toTex()],
|
|
106
|
+
])}
|
|
107
|
+
|
|
108
|
+
On remplace alors ces valeurs dans l’égalité du produit scalaire :
|
|
109
|
+
|
|
110
|
+
$$
|
|
111
|
+
${nodeScalarProductSimplified.toTex()} = ${nodeNormUSimplified.toTex()} \\times ${nodeNormVSimplified.toTex()} \\times \\cos(${angleName})
|
|
112
|
+
$$
|
|
113
|
+
|
|
114
|
+
D’où:
|
|
115
|
+
|
|
116
|
+
$$
|
|
117
|
+
\\cos(${angleName}) = \\frac{${nodeScalarProductSimplified.toTex()}}{${nodeNormUSimplified.toTex()} \\times ${nodeNormVSimplified.toTex()}}
|
|
118
|
+
$$
|
|
119
|
+
|
|
120
|
+
Enfin, on utilise la fonction $\\cos^{-1}$ de la calculatrice pour en déduire une mesure de $${angleName}$ :
|
|
121
|
+
|
|
122
|
+
$$
|
|
123
|
+
${angleName} \\approx ${getAnswer(identifiers)}
|
|
124
|
+
$$
|
|
125
|
+
|
|
126
|
+
`;
|
|
127
|
+
};
|
|
43
128
|
const getKeys = () => {
|
|
44
129
|
return ["degree"];
|
|
45
130
|
};
|
|
@@ -70,8 +155,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
70
155
|
keys: getKeys(identifiers),
|
|
71
156
|
answerFormat: "tex",
|
|
72
157
|
identifiers,
|
|
73
|
-
|
|
74
|
-
|
|
158
|
+
hint: getHint(identifiers),
|
|
159
|
+
correction: getCorrection(identifiers),
|
|
75
160
|
};
|
|
76
161
|
};
|
|
77
162
|
export const angleFromScalarProduct = {
|
|
@@ -86,8 +171,9 @@ export const angleFromScalarProduct = {
|
|
|
86
171
|
isAnswerValid,
|
|
87
172
|
subject: "Mathématiques",
|
|
88
173
|
getInstruction,
|
|
89
|
-
|
|
90
|
-
|
|
174
|
+
getHint,
|
|
175
|
+
getCorrection,
|
|
176
|
+
hasHintAndCorrection: true,
|
|
91
177
|
getAnswer,
|
|
92
178
|
getQuestionFromIdentifiers,
|
|
93
179
|
};
|
|
@@ -2,7 +2,12 @@ export * from "./scalarProductViaCoords.js";
|
|
|
2
2
|
export * from "./scalarProductViaCos.js";
|
|
3
3
|
export * from "./scalarProductOrthoInSquare.js";
|
|
4
4
|
export * from "./scalarProductViaNorms.js";
|
|
5
|
-
export * from "./scalarProductIdentities.js";
|
|
6
5
|
export * from "./angleFromScalarProduct.js";
|
|
7
6
|
export * from "./findCoordinatesToOrthogonalize.js";
|
|
7
|
+
export * from "./scalarProductOfVectsOnGrid1.js";
|
|
8
|
+
export * from "./scalarProductComputeBH.js";
|
|
9
|
+
export * from "./scalarProductParallelogramDiagonalPlus.js";
|
|
10
|
+
export * from "./alg/index.js";
|
|
11
|
+
export * from "./orth/index.js";
|
|
12
|
+
export * from "./alKashi/index.js";
|
|
8
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AAEpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6CAA6C,CAAC;AAE5D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
@@ -2,6 +2,11 @@ export * from "./scalarProductViaCoords.js";
|
|
|
2
2
|
export * from "./scalarProductViaCos.js";
|
|
3
3
|
export * from "./scalarProductOrthoInSquare.js";
|
|
4
4
|
export * from "./scalarProductViaNorms.js";
|
|
5
|
-
export * from "./scalarProductIdentities.js";
|
|
6
5
|
export * from "./angleFromScalarProduct.js";
|
|
7
6
|
export * from "./findCoordinatesToOrthogonalize.js";
|
|
7
|
+
export * from "./scalarProductOfVectsOnGrid1.js";
|
|
8
|
+
export * from "./scalarProductComputeBH.js";
|
|
9
|
+
export * from "./scalarProductParallelogramDiagonalPlus.js";
|
|
10
|
+
export * from "./alg/index.js";
|
|
11
|
+
export * from "./orth/index.js";
|
|
12
|
+
export * from "./alKashi/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductIsOrthogonalVecsBasisIJ.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"scalarProductIsOrthogonalVecsBasisIJ.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AA2NF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAsBtE,CAAC"}
|
|
@@ -123,6 +123,12 @@ $$
|
|
|
123
123
|
${i} \\cdot ${j} = ${j} \\cdot ${i} = 0
|
|
124
124
|
$$
|
|
125
125
|
|
|
126
|
+
On a :
|
|
127
|
+
|
|
128
|
+
$$
|
|
129
|
+
${i} \\cdot ${i} = ${j} \\cdot ${j} = 1
|
|
130
|
+
$$
|
|
131
|
+
|
|
126
132
|
On peut donc calculer le produit scalaire en utilisant les coordonnées dans la base $(${i},${j})$ de la même manière que lorsque l'on travaille dans la base canonique du plan.
|
|
127
133
|
|
|
128
134
|
${alignTex([
|
package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductIsPointOnCircle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"scalarProductIsPointOnCircle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4MF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAmB9D,CAAC"}
|
package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js
CHANGED
|
@@ -54,9 +54,12 @@ const getAnswer = (identifiers) => {
|
|
|
54
54
|
const isOrthogonal = answerNode.simplify().evaluate() === 0;
|
|
55
55
|
return ["Oui", "Non"][isOrthogonal ? 0 : 1];
|
|
56
56
|
};
|
|
57
|
-
const getHint = () => {
|
|
58
|
-
const
|
|
59
|
-
|
|
57
|
+
const getHint = (identifiers) => {
|
|
58
|
+
const { pointNames } = identifiers;
|
|
59
|
+
const [nA, nB, nC] = pointNames;
|
|
60
|
+
const [vecAB, vecAC] = [`${nA}${nB}`, `${nA}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
|
|
61
|
+
return `Un point $${nA}$ appartient à un cercle de diamètre $[${nB}${nC}]$ si et seulement si le triangle $${nA}${nB}${nC}$ est rectangle en $${nA}$,
|
|
62
|
+
donc si et seulement si les vecteurs $${vecAB}$ et $${vecAC}$ sont orthogonaux.`;
|
|
60
63
|
};
|
|
61
64
|
const getCorrection = (identifiers) => {
|
|
62
65
|
const { pointNames } = identifiers;
|
|
@@ -72,7 +75,14 @@ const getCorrection = (identifiers) => {
|
|
|
72
75
|
const vecComputationV = createVecComputation(point1, point3);
|
|
73
76
|
const isOrthogonal = getAnswerNode(identifiers).simplify().evaluate() === 0;
|
|
74
77
|
const nodeScalarProduct = vecU.scalarProduct(vecV);
|
|
75
|
-
return
|
|
78
|
+
return `${(() => {
|
|
79
|
+
const [nA, nB, nC] = pointNames;
|
|
80
|
+
const [vecAB, vecAC] = [`${nA}${nB}`, `${nA}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
|
|
81
|
+
return `Le point $${nA}$ appartient au cercle de diamètre $[${nB}${nC}]$ si et seulement si le triangle $${nA}${nB}${nC}$ est rectangle en $${nA}$,
|
|
82
|
+
donc si et seulement si les vecteurs $${vecAB}$ et $${vecAC}$ sont orthogonaux.`;
|
|
83
|
+
})()}
|
|
84
|
+
|
|
85
|
+
On calcule les coordonnées des vecteurs :
|
|
76
86
|
|
|
77
87
|
${zip([vecComputationU, vecComputationV], [vecU, vecV]).map(([vecComputation, vec]) => `
|
|
78
88
|
|
|
@@ -150,7 +160,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
150
160
|
export const scalarProductIsPointOnCircle = {
|
|
151
161
|
id: "scalarProductIsPointOnCircle",
|
|
152
162
|
connector: "=",
|
|
153
|
-
label: "Déterminer si un point appartient ou non à un cercle de diamètre donné",
|
|
163
|
+
label: "Déterminer si un point appartient ou non à un cercle de diamètre donné à l'aide du produit scalaire",
|
|
154
164
|
isSingleStep: true,
|
|
155
165
|
generator: (nb) => getDistinctQuestions(() => getScalarProductIsPointOnCircleQuestion(), nb),
|
|
156
166
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductIsPointOnPerpendicularBisector.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAavC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"scalarProductIsPointOnPerpendicularBisector.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAavC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA2NF,eAAO,MAAM,2CAA2C,EAAE,QAAQ,CAAC,WAAW,CAuB3E,CAAC"}
|
|
@@ -53,9 +53,13 @@ const getAnswer = (identifiers) => {
|
|
|
53
53
|
const isOrthogonal = answerNode.simplify().evaluate() === 0;
|
|
54
54
|
return ["Oui", "Non"][isOrthogonal ? 0 : 1];
|
|
55
55
|
};
|
|
56
|
-
const getHint = () => {
|
|
57
|
-
const
|
|
58
|
-
|
|
56
|
+
const getHint = (identifiers) => {
|
|
57
|
+
const { pointNames } = identifiers;
|
|
58
|
+
const [nA, nB, nC] = pointNames;
|
|
59
|
+
const [vecCI, vecAB] = [`${nC}I`, `${nA}${nB}`].map((letter) => `\\overrightarrow{${letter}}`);
|
|
60
|
+
return `La médiatrice du segment $[${nA}${nB}]$ est la droite passant par le milieu $I$ de $[${nA}${nB}]$ et qui est perpendiculaire à $(${nA}${nB})$.
|
|
61
|
+
Un point $${nC}$ appartient donc à cette médiatrice si et seulement si $(${nC}I)$ est perpendiculaire à $(${nA}${nB})$,
|
|
62
|
+
c'est à dire si les vecteurs $${vecCI}$ et $${vecAB}$ sont orthognaux.`;
|
|
59
63
|
};
|
|
60
64
|
const getCorrection = (identifiers) => {
|
|
61
65
|
const { pointNames, pointIds } = identifiers;
|
|
@@ -73,17 +77,17 @@ const getCorrection = (identifiers) => {
|
|
|
73
77
|
const vecComputationV = createVecComputation(pointI, point3);
|
|
74
78
|
const isOrthogonal = getAnswerNode(identifiers).simplify().evaluate() === 0;
|
|
75
79
|
const nodeScalarProduct = vecU.scalarProduct(vecV);
|
|
76
|
-
return
|
|
80
|
+
return `${(() => {
|
|
81
|
+
const [nA, nB, nC] = pointNames;
|
|
82
|
+
const [vecCI, vecAB] = [`${nC}I`, `${nA}${nB}`].map((letter) => `\\overrightarrow{${letter}}`);
|
|
83
|
+
return `La médiatrice du segment $[${nA}${nB}]$ est la droite passant par le milieu $I$ de $[${nA}${nB}]$ et qui est perpendiculaire à $(${nA}${nB})$.
|
|
84
|
+
Le point $${nC}$ appartient donc à cette médiatrice si et seulement si $(${nC}I)$ est perpendiculaire à $(${nA}${nB})$,
|
|
85
|
+
c'est à dire si les vecteurs $${vecCI}$ et $${vecAB}$ sont orthognaux.`;
|
|
86
|
+
})()}
|
|
87
|
+
|
|
88
|
+
On détermine les coordonnées du milieu $I$ de $[${point1.name}${point2.name}]$ :
|
|
77
89
|
|
|
78
|
-
${alignTex([
|
|
79
|
-
[
|
|
80
|
-
"\\overrightarrow{OI}",
|
|
81
|
-
"=",
|
|
82
|
-
`\\frac{\\overrightarrow{O${point1.name}} + \\overrightarrow{O${point2.name}}}{2}`,
|
|
83
|
-
],
|
|
84
|
-
["", "=", `${vecOI.toCoords()}`],
|
|
85
|
-
["", "=", `${vecOI.simplify().toCoords()}`],
|
|
86
|
-
])}
|
|
90
|
+
${alignTex([[`I${vecOI.toCoords()}`], [`I${vecOI.simplify().toCoords()}`]])}
|
|
87
91
|
|
|
88
92
|
On peut calculer les coordonnées des vecteurs :
|
|
89
93
|
|
|
@@ -163,7 +167,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
163
167
|
export const scalarProductIsPointOnPerpendicularBisector = {
|
|
164
168
|
id: "scalarProductIsPointOnPerpendicularBisector",
|
|
165
169
|
connector: "=",
|
|
166
|
-
label: "Déterminer si un point appartient à la médiatrice d'un segment",
|
|
170
|
+
label: "Déterminer si un point appartient à la médiatrice d'un segment à l'aide du produit scalaire",
|
|
167
171
|
isSingleStep: true,
|
|
168
172
|
generator: (nb) => getDistinctQuestions(() => getScalarProductIsPointOnPerpendicularBisectorQuestion(), nb),
|
|
169
173
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductIsRightTriangleUsingPointCoords.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"scalarProductIsRightTriangleUsingPointCoords.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA+QF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAuB5E,CAAC"}
|
|
@@ -61,9 +61,12 @@ const getAnswer = (identifiers) => {
|
|
|
61
61
|
const isOrthogonal = answerNode.simplify().evaluate() === 0;
|
|
62
62
|
return ["Oui", "Non"][isOrthogonal ? 0 : 1];
|
|
63
63
|
};
|
|
64
|
-
const getHint = () => {
|
|
65
|
-
const
|
|
66
|
-
|
|
64
|
+
const getHint = (identifiers) => {
|
|
65
|
+
const { pointNames } = identifiers;
|
|
66
|
+
const [nA, nB, nC] = pointNames;
|
|
67
|
+
const [vecAB, vecBC] = [`${nA}${nB}`, `${nB}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
|
|
68
|
+
return `Un triangle $${nA}${nB}${nC}$ est rectangle en $${nB}$ si et seulement si les droites $(${nA}${nB})$ et $(${nB}${nC})$ sont perpendiculaires,
|
|
69
|
+
donc si et seulement si les vecteurs $${vecAB}$ et $${vecBC}$ sont orthognaux.`;
|
|
67
70
|
};
|
|
68
71
|
const getCorrection = (identifiers) => {
|
|
69
72
|
const { pointNames } = identifiers;
|
|
@@ -79,7 +82,14 @@ const getCorrection = (identifiers) => {
|
|
|
79
82
|
const vecComputationV = createVecComputation(point1, point3);
|
|
80
83
|
const vecComputationW = createVecComputation(point2, point3);
|
|
81
84
|
const isOrthogonal = getAnswerNode(identifiers).simplify().evaluate() === 0;
|
|
82
|
-
return
|
|
85
|
+
return `${(() => {
|
|
86
|
+
const [nA, nB, nC] = pointNames;
|
|
87
|
+
const [vecAB, vecBC] = [`${nA}${nB}`, `${nB}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
|
|
88
|
+
return `Le triangle $${nA}${nB}${nC}$ est rectangle en $${nB}$ si et seulement si les droites $(${nA}${nB})$ et $(${nB}${nC})$ sont perpendiculaires,
|
|
89
|
+
donc si et seulement si les vecteurs $${vecAB}$ et $${vecBC}$ sont orthognaux.`;
|
|
90
|
+
})()}
|
|
91
|
+
|
|
92
|
+
On calcule les coordonnées des vecteurs :
|
|
83
93
|
|
|
84
94
|
${zip([vecComputationU, vecComputationV, vecComputationW], [vecU, vecV, vecW]).map(([vecComputation, vec]) => `
|
|
85
95
|
|
|
@@ -218,7 +228,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
218
228
|
export const scalarProductIsRightTriangleUsingPointCoords = {
|
|
219
229
|
id: "scalarProductIsRightTriangleUsingPointCoords",
|
|
220
230
|
connector: "=",
|
|
221
|
-
label: "Déterminer si un triangle est rectangle à partir des coordonnées de ses sommets",
|
|
231
|
+
label: "Déterminer si un triangle est rectangle à partir des coordonnées de ses sommets à l'aide du produit scalaire",
|
|
222
232
|
isSingleStep: true,
|
|
223
233
|
generator: (nb) => getDistinctQuestions(() => getScalarProductIsRightTriangleUsingPointCoordsQuestion(), nb),
|
|
224
234
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductComputeBH.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"scalarProductComputeBH.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAqBtC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAmeF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AA+BF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA6BjE,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { Segment } from "../../../../../math/geometry/segment.js";
|
|
|
9
9
|
import { Triangle } from "../../../../../math/geometry/triangles/triangle.js";
|
|
10
10
|
import { VectorConstructor } from "../../../../../math/geometry/vector.js";
|
|
11
11
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
12
|
+
import { round } from "../../../../../math/utils/round.js";
|
|
12
13
|
import { abs } from "../../../../../tree/nodes/functions/absNode.js";
|
|
13
14
|
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
14
15
|
import { frac, isFractionNode, } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
@@ -56,6 +57,7 @@ const getCorrection = (identifiers) => {
|
|
|
56
57
|
const nodeLengthBC = vecBC.getNorm();
|
|
57
58
|
const vecBA = VectorConstructor.fromPoints(pointB, pointA);
|
|
58
59
|
const nodeScalarProduct = vecBA.scalarProduct(vecBC);
|
|
60
|
+
const isScalarProductPositive = nodeScalarProduct.evaluate() > 0;
|
|
59
61
|
return `Dans $BAC$, $H$ est le pied de la hauteur issue de $A$.
|
|
60
62
|
|
|
61
63
|
Autrement dit, $H$ est le projeté orthogonal de $A$ sur $(BC)$.
|
|
@@ -66,20 +68,42 @@ $$
|
|
|
66
68
|
\\overrightarrow{BA} \\cdot \\overrightarrow{BC} = \\overrightarrow{BH} \\cdot \\overrightarrow{BC}
|
|
67
69
|
$$
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
${(() => {
|
|
72
|
+
if (isScalarProductPositive) {
|
|
73
|
+
return `Or, puisque $\\overrightarrow{BH}$ et $\\overrightarrow{BC}$ sont colinéaires et de même sens :
|
|
70
74
|
|
|
71
75
|
$$
|
|
72
|
-
\\
|
|
76
|
+
\\overrightarrow{BH} \\cdot \\overrightarrow{BC} = BH \\times BC
|
|
73
77
|
$$
|
|
74
78
|
|
|
75
79
|
On a donc :
|
|
76
80
|
|
|
77
81
|
$$
|
|
78
|
-
BH = \\frac{\\
|
|
82
|
+
BH = \\frac{\\overrightarrow{BA} \\cdot \\overrightarrow{BC}}{BC}
|
|
79
83
|
$$
|
|
80
84
|
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return `Or, puisque $\\overrightarrow{BH}$ et $\\overrightarrow{BC}$ sont colinéaires et de sens opposés :
|
|
89
|
+
|
|
90
|
+
$$
|
|
91
|
+
\\overrightarrow{BH} \\cdot \\overrightarrow{BC} = - BH \\times BC
|
|
92
|
+
$$
|
|
93
|
+
|
|
94
|
+
On a donc :
|
|
95
|
+
|
|
96
|
+
$$
|
|
97
|
+
BH = \\frac{- \\overrightarrow{BA} \\cdot \\overrightarrow{BC}}{BC}
|
|
98
|
+
$$
|
|
99
|
+
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
})()}
|
|
81
103
|
Application numérique :
|
|
82
104
|
|
|
105
|
+
On calcule donc le produit scalaire $\\overrightarrow{BA} \\cdot \\overrightarrow{BC}$ :
|
|
106
|
+
|
|
83
107
|
$$
|
|
84
108
|
\\overrightarrow{BA} = ${vecBA.toCoords()}
|
|
85
109
|
$$
|
|
@@ -92,10 +116,14 @@ $$
|
|
|
92
116
|
\\overrightarrow{BA} \\cdot \\overrightarrow{BC} = ${nodeScalarProduct.toTex()}
|
|
93
117
|
$$
|
|
94
118
|
|
|
119
|
+
Puis on calcule la longueur $BC$ :
|
|
120
|
+
|
|
95
121
|
$$
|
|
96
122
|
BC = ${nodeLengthBC.toTex()}
|
|
97
123
|
$$
|
|
98
124
|
|
|
125
|
+
On a donc :
|
|
126
|
+
|
|
99
127
|
$$
|
|
100
128
|
BH = ${getAnswer(identifiers)}
|
|
101
129
|
$$
|
|
@@ -207,7 +235,13 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
|
207
235
|
try {
|
|
208
236
|
const nodeAns = parseAlgebraic(ans);
|
|
209
237
|
const nodeAnswer = getAnswerNode(identifiers);
|
|
210
|
-
|
|
238
|
+
const isValidExact = () => {
|
|
239
|
+
return substract(nodeAns, nodeAnswer).simplify().evaluate() === 0;
|
|
240
|
+
};
|
|
241
|
+
const isValidRounded = (precision) => {
|
|
242
|
+
return nodeAns.evaluate() - round(nodeAnswer.evaluate(), precision) === 0;
|
|
243
|
+
};
|
|
244
|
+
return isValidExact() || isValidRounded(2);
|
|
211
245
|
}
|
|
212
246
|
catch (err) {
|
|
213
247
|
return handleVEAError(err);
|
package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalarProductOfVectsOnGrid1.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"scalarProductOfVectsOnGrid1.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAWvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAmcF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAgBF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAyBtE,CAAC"}
|