math-exercises 3.0.158 → 3.0.159
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 +0 -1
- 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/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/index.d.ts +2 -0
- package/lib/exercises/math/geometry/circles/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/index.js +1 -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/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/index.d.ts +123 -0
- package/lib/index.d.ts.map +1 -1
- 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
|
@@ -22,12 +22,13 @@ import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
|
22
22
|
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
23
23
|
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
24
24
|
import { getCartesiansProducts } from "../../../../../utils/arrays/cartesianProducts.js";
|
|
25
|
+
import { NamedIntervalIds, NamedIntervalNodeConstructor, } from "../../../../../tree/nodes/sets/namedIntervalNode.js";
|
|
25
26
|
const texXDomain = `\\mathbb{R}`;
|
|
26
27
|
const texNoSolution = (() => {
|
|
27
28
|
const trinom = new Trinom(1, 1, 1);
|
|
28
29
|
return trinom.getRootsEquationSolutionTex(true);
|
|
29
30
|
})();
|
|
30
|
-
const intervalbbR =
|
|
31
|
+
const intervalbbR = NamedIntervalNodeConstructor.fromName(NamedIntervalIds.R);
|
|
31
32
|
const texbbR = intervalbbR.toTex();
|
|
32
33
|
const createNodeForCoeffs = (coeffs) => {
|
|
33
34
|
const [a, b, c] = coeffs.toReversed();
|
|
@@ -139,9 +140,9 @@ const getCorrection = (identifiers, optsIn) => {
|
|
|
139
140
|
//workaround:
|
|
140
141
|
const coeffsFMinusG = zip(coeffsF, coeffsG).map(([kF, kG]) => kF - kG);
|
|
141
142
|
const nodeFMinusGSimplified = createNodeForCoeffs(coeffsFMinusG);
|
|
142
|
-
return `On
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
return `On transforme l’équation pour se ramener au cas $e^{f(x)} = 1$.
|
|
144
|
+
Il suffira alors de résoudre $f(x) = 0$,
|
|
145
|
+
car le seul antécédent de $1$ par la fonction exponentielle est $0$.
|
|
145
146
|
|
|
146
147
|
${alignTex([
|
|
147
148
|
["", "", getStatementNode(identifiers).toTex()],
|
|
@@ -214,7 +215,7 @@ const getKeys = (_, optsIn) => {
|
|
|
214
215
|
switch (answerInputType) {
|
|
215
216
|
case "x=... ou x=...":
|
|
216
217
|
return [
|
|
217
|
-
...["x", "equal", "ou"],
|
|
218
|
+
...["x", "equal", "ou", "lbrace", "rbrace", "in"],
|
|
218
219
|
...[
|
|
219
220
|
{
|
|
220
221
|
id: "custom",
|
|
@@ -392,7 +393,7 @@ const getAnswerInputTypes = (opts) => {
|
|
|
392
393
|
}
|
|
393
394
|
};
|
|
394
395
|
const optsDefault = {
|
|
395
|
-
solutionFormat: "
|
|
396
|
+
solutionFormat: "Ensemble",
|
|
396
397
|
functionTypeF: "degré $1$",
|
|
397
398
|
functionTypeG: "degré $1$",
|
|
398
399
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expOfTrinomEquals1Equation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"expOfTrinomEquals1Equation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAmCrC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0YF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAgBF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoBrE,CAAC"}
|
|
@@ -14,6 +14,16 @@ import { SetVEA } from "../../../../../exercises/vea/setVEA.js";
|
|
|
14
14
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
15
15
|
import { discreteSetParser } from "../../../../../tree/parsers/discreteSetParser.js";
|
|
16
16
|
import { getCartesiansProducts } from "../../../../../utils/arrays/cartesianProducts.js";
|
|
17
|
+
import { randomMany } from "../../../../../utils/alea/random.js";
|
|
18
|
+
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
19
|
+
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
20
|
+
import { power } from "../../../../../tree/nodes/operators/powerNode.js";
|
|
21
|
+
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
22
|
+
import { round } from "../../../../../math/utils/round.js";
|
|
23
|
+
import { opposite } from "../../../../../tree/nodes/functions/oppositeNode.js";
|
|
24
|
+
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
25
|
+
import { sqrt } from "../../../../../tree/nodes/functions/sqrtNode.js";
|
|
26
|
+
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
17
27
|
const texXDomain = `\\mathbb{R}`;
|
|
18
28
|
const texNoSolution = (() => {
|
|
19
29
|
const trinom = new Trinom(1, 1, 1);
|
|
@@ -58,12 +68,13 @@ Quelle équation faut-il donc résoudre ?`;
|
|
|
58
68
|
};
|
|
59
69
|
const getCorrection = (identifiers, optsIn) => {
|
|
60
70
|
const opts = optsIn ?? optsDefault;
|
|
71
|
+
const { a, b, c } = identifiers;
|
|
61
72
|
const nodeChildOfExp = getChildOfExpNode(identifiers);
|
|
73
|
+
const nodeDelta = substract(power(b, 2), multiply(4, multiply(a, c)));
|
|
74
|
+
const delta = nodeDelta.evaluate();
|
|
62
75
|
return `L'équation est de la forme $e^{u(x)}=1$ avec $u(x)=${nodeChildOfExp.toTex()}$.
|
|
63
76
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Pour $t$ dans $\\mathbb{R}$, on a :
|
|
77
|
+
Pour t dans $\\mathbb{R}$, on sait que :
|
|
67
78
|
|
|
68
79
|
$$
|
|
69
80
|
e^t=1 \\Leftrightarrow t=0
|
|
@@ -75,14 +86,56 @@ $$
|
|
|
75
86
|
e^{u(x)}=1 \\Leftrightarrow u(x)=0
|
|
76
87
|
$$
|
|
77
88
|
|
|
78
|
-
|
|
89
|
+
Par conséquent :
|
|
79
90
|
|
|
80
91
|
${alignTex([
|
|
81
92
|
["", "", `e^{${nodeChildOfExp.toTex()}}=1`],
|
|
82
93
|
["", `\\Leftrightarrow`, `${nodeChildOfExp.toTex()}=0`],
|
|
83
|
-
["", `\\Leftrightarrow`, `${getAnswer(identifiers, opts)}`],
|
|
84
94
|
])}
|
|
85
95
|
|
|
96
|
+
On calcule le discriminant :
|
|
97
|
+
|
|
98
|
+
$$
|
|
99
|
+
\\Delta = ${nodeDelta.toTex()} = ${round(delta, 2).frenchify()}
|
|
100
|
+
$$
|
|
101
|
+
|
|
102
|
+
${(() => {
|
|
103
|
+
if (delta > 0) {
|
|
104
|
+
const nodeX1 = frac(substract(opposite(b), sqrt("\\Delta".toTree())), multiply(2, a));
|
|
105
|
+
const nodeX2 = frac(add(opposite(b), sqrt("\\Delta".toTree())), multiply(2, a));
|
|
106
|
+
return `$\\Delta > 0$ donc
|
|
107
|
+
|
|
108
|
+
$$
|
|
109
|
+
x_1 = ${nodeX1.toTex()} = ${nodeX1.evaluate({ "\\Delta": delta }).frenchify()}
|
|
110
|
+
$$
|
|
111
|
+
|
|
112
|
+
$$
|
|
113
|
+
x_2 = ${nodeX2.toTex()} = ${nodeX2.evaluate({ "\\Delta": delta }).frenchify()}
|
|
114
|
+
$$
|
|
115
|
+
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
else if (delta === 0) {
|
|
119
|
+
const nodeX1 = frac(opposite(b), multiply(2, a));
|
|
120
|
+
return `$\\Delta = 0$ donc
|
|
121
|
+
|
|
122
|
+
$$
|
|
123
|
+
x_1 = x_2 = ${nodeX1.toTex()} = ${nodeX1.evaluate().frenchify()}
|
|
124
|
+
$$
|
|
125
|
+
|
|
126
|
+
`;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return `$\\Delta < 0$ donc il n'y a pas de racines réelles.`;
|
|
130
|
+
}
|
|
131
|
+
})()}
|
|
132
|
+
|
|
133
|
+
Conclusion :
|
|
134
|
+
|
|
135
|
+
$$
|
|
136
|
+
${getAnswer(identifiers, opts)}
|
|
137
|
+
$$
|
|
138
|
+
|
|
86
139
|
`;
|
|
87
140
|
};
|
|
88
141
|
const getPropositions = (n, { answer, ...identifiers }, optsIn) => {
|
|
@@ -225,9 +278,35 @@ const isAnswerValid = (ans, { answer, ...identifiers }, optsIn) => {
|
|
|
225
278
|
};
|
|
226
279
|
const getExpOfTrinomEquals1EquationQuestion = (optsIn) => {
|
|
227
280
|
const opts = optsIn ?? optsDefault;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
281
|
+
function createRandomCoeffs(rootPool) {
|
|
282
|
+
const roots = randomMany(rootPool, randint(0, 3));
|
|
283
|
+
let a;
|
|
284
|
+
let b;
|
|
285
|
+
let c;
|
|
286
|
+
switch (roots.length) {
|
|
287
|
+
case 0:
|
|
288
|
+
{
|
|
289
|
+
[a, b, c] = [...Array(3).keys()].map(() => randint(1, 10));
|
|
290
|
+
const isPositive = coinFlip();
|
|
291
|
+
if (!isPositive) {
|
|
292
|
+
[a, b, c] = [a, b, c].map((v) => v * -1);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
296
|
+
case 1:
|
|
297
|
+
case 2:
|
|
298
|
+
{
|
|
299
|
+
const rootsExplicit = roots.length === 1 ? [roots[0], roots[0]] : roots;
|
|
300
|
+
a = randint(1, 6);
|
|
301
|
+
b = a * rootsExplicit.reduce((acc, v) => acc + v);
|
|
302
|
+
c = a * rootsExplicit.reduce((acc, v) => acc * v);
|
|
303
|
+
}
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
return [c, b, a];
|
|
307
|
+
}
|
|
308
|
+
const rootPool = [...Array(41).keys()].map((i) => i - 20);
|
|
309
|
+
const [c, b, a] = createRandomCoeffs(rootPool);
|
|
231
310
|
const identifiers = { a, b, c };
|
|
232
311
|
return getQuestionFromIdentifiers(identifiers, opts);
|
|
233
312
|
};
|
|
@@ -258,7 +337,7 @@ const getAnswerInputTypes = (opts) => {
|
|
|
258
337
|
}
|
|
259
338
|
};
|
|
260
339
|
const optsDefault = {
|
|
261
|
-
solutionFormat: "
|
|
340
|
+
solutionFormat: "Ensemble",
|
|
262
341
|
};
|
|
263
342
|
const options = [
|
|
264
343
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factorizeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/factorizeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAyCrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"factorizeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/factorizeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAyCrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqRF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAsBF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAyB5D,CAAC"}
|
|
@@ -147,7 +147,14 @@ const getKeys = (_, optsIn) => {
|
|
|
147
147
|
case "x=... ou x=...":
|
|
148
148
|
return ["x", "equal", "ou"];
|
|
149
149
|
case "S={...;...}":
|
|
150
|
-
return [
|
|
150
|
+
return [
|
|
151
|
+
"S",
|
|
152
|
+
"equal",
|
|
153
|
+
"lbrace",
|
|
154
|
+
"semicolon",
|
|
155
|
+
"rbrace",
|
|
156
|
+
"varnothing",
|
|
157
|
+
];
|
|
151
158
|
default:
|
|
152
159
|
throw new Error("Unsupported answerInputType: " + answerInputType);
|
|
153
160
|
}
|
|
@@ -168,7 +175,6 @@ const isAnswerValid = (ans, { answer: _, ...identifiers }, optsIn) => {
|
|
|
168
175
|
.replaceAll("text{ ou }", ";")
|
|
169
176
|
.replaceAll("x", "")
|
|
170
177
|
.replaceAll("=", "");
|
|
171
|
-
console.log("formated", formated);
|
|
172
178
|
// if (formated === "\\varnothing") {
|
|
173
179
|
// return EmptySet;
|
|
174
180
|
// }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAwCrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsOF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAsBF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAejE,CAAC"}
|
|
@@ -61,6 +61,32 @@ const getAnswer = (identifiers, optsIn) => {
|
|
|
61
61
|
const answerNode = getAnswerNode(identifiers);
|
|
62
62
|
return getTexForEquationSolutionNode(answerNode, opts);
|
|
63
63
|
};
|
|
64
|
+
const getKeys = (_, optsIn) => {
|
|
65
|
+
const opts = optsIn ?? optsDefault;
|
|
66
|
+
const { answerInputTypes } = opts;
|
|
67
|
+
return [
|
|
68
|
+
...answerInputTypes.reduce((acc, answerInputType) => {
|
|
69
|
+
const specialSet = new Set((() => {
|
|
70
|
+
switch (answerInputType) {
|
|
71
|
+
case "x=... ou x=...":
|
|
72
|
+
return ["x", "equal", "ou"];
|
|
73
|
+
case "S={...;...}":
|
|
74
|
+
return [
|
|
75
|
+
"S",
|
|
76
|
+
"equal",
|
|
77
|
+
"lbrace",
|
|
78
|
+
"semicolon",
|
|
79
|
+
"rbrace",
|
|
80
|
+
"varnothing",
|
|
81
|
+
];
|
|
82
|
+
default:
|
|
83
|
+
throw new Error("Unsupported answerInputType: " + answerInputType);
|
|
84
|
+
}
|
|
85
|
+
})());
|
|
86
|
+
return new Set([...acc, ...specialSet]);
|
|
87
|
+
}, new Set()),
|
|
88
|
+
];
|
|
89
|
+
};
|
|
64
90
|
const isAnswerValid = (ans, { answer: _, ...identifiers }, optsIn) => {
|
|
65
91
|
const opts = optsIn ?? optsDefault;
|
|
66
92
|
const answerNode = getAnswerNode(identifiers);
|
|
@@ -73,7 +99,6 @@ const isAnswerValid = (ans, { answer: _, ...identifiers }, optsIn) => {
|
|
|
73
99
|
.replaceAll("text{ ou }", ";")
|
|
74
100
|
.replaceAll("x", "")
|
|
75
101
|
.replaceAll("=", "");
|
|
76
|
-
console.log("formated", formated);
|
|
77
102
|
// if (formated === "\\varnothing") {
|
|
78
103
|
// return EmptySet;
|
|
79
104
|
// }
|
|
@@ -177,7 +202,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
177
202
|
instruction: getInstruction(identifiers, opts),
|
|
178
203
|
startStatement: getStartStatement(identifiers, opts),
|
|
179
204
|
answer: getAnswer(identifiers, opts),
|
|
180
|
-
keys:
|
|
205
|
+
keys: getKeys(identifiers, opts),
|
|
181
206
|
answerFormat: "tex",
|
|
182
207
|
identifiers,
|
|
183
208
|
hint: getHint(identifiers, opts),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solveByFactorizingWithIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAW7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"solveByFactorizingWithIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAW7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AA0LF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAUF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAsBvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationSquareWithSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"equationSquareWithSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkKF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAkBzD,CAAC"}
|
package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expOfFEqualsExpOfGInequation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAqBrC,OAAO,EACL,gBAAgB,EAGjB,MAAM,sCAAsC,CAAC;AAiH9C;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"expOfFEqualsExpOfGInequation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAqBrC,OAAO,EACL,gBAAgB,EAGjB,MAAM,sCAAsC,CAAC;AAiH9C;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAwYF,KAAK,OAAO,GAAG;IACb,wBAAwB,EAAE,MAAM,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AA2BF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAuBvE,CAAC"}
|
|
@@ -29,6 +29,7 @@ import { inequationParser } from "../../../../../tree/parsers/inequationParser.j
|
|
|
29
29
|
import { Trinom } from "../../../../../math/polynomials/trinom.js";
|
|
30
30
|
import { UnionIntervalNode } from "../../../../../tree/nodes/sets/unionIntervalNode.js";
|
|
31
31
|
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
32
|
+
import { NamedIntervalIds, NamedIntervalNodeConstructor, } from "../../../../../tree/nodes/sets/namedIntervalNode.js";
|
|
32
33
|
const reuseSecondDegreeInequation = {
|
|
33
34
|
getAnswerNode: (identifiers) => {
|
|
34
35
|
const { a, b, c, ineqType } = identifiers;
|
|
@@ -69,7 +70,7 @@ const reuseFirstDegreeInequationsType3 = {
|
|
|
69
70
|
},
|
|
70
71
|
};
|
|
71
72
|
const texXDomain = `\\mathbb{R}`;
|
|
72
|
-
const intervalbbR =
|
|
73
|
+
const intervalbbR = NamedIntervalNodeConstructor.fromName(NamedIntervalIds.R);
|
|
73
74
|
const texbbR = intervalbbR.toTex();
|
|
74
75
|
const createNodeForCoeffs = (coeffs) => {
|
|
75
76
|
//because Error: n-th coeff must be not null at new Polynomial
|
|
@@ -168,7 +169,7 @@ const getAnswer = (identifiers, optsIn) => {
|
|
|
168
169
|
}
|
|
169
170
|
};
|
|
170
171
|
const getHint = () => {
|
|
171
|
-
return `Essaye de transformer l'
|
|
172
|
+
return `Essaye de transformer l'inéquation originale en une inéquation du type $e^{h(x)}=1$, puis résous cette inéquation.`;
|
|
172
173
|
};
|
|
173
174
|
const getCorrection = (identifiers, optsIn) => {
|
|
174
175
|
const opts = optsIn ?? optsDefault;
|
|
@@ -182,9 +183,9 @@ const getCorrection = (identifiers, optsIn) => {
|
|
|
182
183
|
//workaround:
|
|
183
184
|
const coeffsFMinusG = zip(coeffsF, coeffsG).map(([kF, kG]) => kF - kG);
|
|
184
185
|
const nodeFMinusGSimplified = createNodeForCoeffs(coeffsFMinusG);
|
|
185
|
-
return `On va transformer l'
|
|
186
|
+
return `On va transformer l'inéquation originale pour se ramener au cas $e^{f(x)} < 1$.
|
|
186
187
|
|
|
187
|
-
L'
|
|
188
|
+
L'exponentielle est strictement positive sur $${intervalbbR.toTex()}$ donc on peut tout diviser par le membre de droite sans changer le sens de l'inégalité.
|
|
188
189
|
|
|
189
190
|
${alignTex([
|
|
190
191
|
["", "", getStatementNode(identifiers).toTex()],
|
|
@@ -203,6 +204,12 @@ ${alignTex([
|
|
|
203
204
|
`\\Leftrightarrow`,
|
|
204
205
|
new InequationNode([exp(nodeFMinusGSimplified), (1).toTree()], ineqType).toTex(),
|
|
205
206
|
],
|
|
207
|
+
[
|
|
208
|
+
"",
|
|
209
|
+
`\\Leftrightarrow`,
|
|
210
|
+
new InequationNode([exp(nodeFMinusGSimplified), "e^{0}".toTree()], //hack pour éviter de me battre avec toTex etc.
|
|
211
|
+
ineqType).toTex(),
|
|
212
|
+
],
|
|
206
213
|
[
|
|
207
214
|
"",
|
|
208
215
|
`\\Leftrightarrow`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeInequationsType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,gBAAgB,EAGjB,MAAM,sCAAsC,CAAC;AAY9C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeInequationsType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,gBAAgB,EAGjB,MAAM,sCAAsC,CAAC;AAY9C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4LF,KAAK,OAAO,GAAG;IACb,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CActE,CAAC"}
|
|
@@ -23,7 +23,7 @@ $$
|
|
|
23
23
|
${affine1.toTex()} ${ineqType} ${affine2.toTex()}
|
|
24
24
|
$$`;
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const getAnswerNode = (identifiers, opts) => {
|
|
27
27
|
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
28
28
|
const { ineqType, a, b, c, d, coeff } = identifiers;
|
|
29
29
|
const affine1 = new Affine(a, b);
|
|
@@ -33,10 +33,13 @@ const getAnswer = (identifiers, opts) => {
|
|
|
33
33
|
.toTree();
|
|
34
34
|
const invIneqType = new InequationSymbol(ineqType).reversed();
|
|
35
35
|
const ineq = new InequationNode(["x".toTree(), result], coeff > 0 ? ineqType : invIneqType);
|
|
36
|
-
const
|
|
37
|
-
? new InequationSolutionNode(ineq.toInterval())
|
|
38
|
-
: ineq
|
|
39
|
-
return
|
|
36
|
+
const node = isInterval
|
|
37
|
+
? new InequationSolutionNode(ineq.toInterval())
|
|
38
|
+
: ineq;
|
|
39
|
+
return node;
|
|
40
|
+
};
|
|
41
|
+
const getAnswer = (identifiers, opts) => {
|
|
42
|
+
return getAnswerNode(identifiers, opts).toTex();
|
|
40
43
|
};
|
|
41
44
|
// const getHint: GetHint<Identifiers, Options> = (identifiers, opts) => {
|
|
42
45
|
// return `Isole le terme $x$ dans le membre de gauche de l'inéquation. Attention : lorsqu'on multiplie (ou divise) les deux membres d'une inéquation par un nombre négatif, le sens de l'inéquation est inversé.`;
|
|
@@ -155,3 +158,6 @@ export const firstDegreeInequationsType3 = {
|
|
|
155
158
|
options,
|
|
156
159
|
getQuestionFromIdentifiers,
|
|
157
160
|
};
|
|
161
|
+
// export const reuseFirstDegreeInequationsType3 = {
|
|
162
|
+
// getAnswerNode,
|
|
163
|
+
// };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expDerivativeFour.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeFour.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expDerivativeFour.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeFour.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAiKF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
|
|
@@ -18,9 +18,6 @@ $$
|
|
|
18
18
|
f(x) = ${fct.toTex()}
|
|
19
19
|
$$`;
|
|
20
20
|
};
|
|
21
|
-
const getAnswer = (identifiers) => {
|
|
22
|
-
return getAnswerNode(identifiers).toTex();
|
|
23
|
-
};
|
|
24
21
|
const getAnswerNode = (identifiers) => {
|
|
25
22
|
const { affine1Coeffs, affine2Coeffs } = identifiers;
|
|
26
23
|
const affine1 = new Affine(affine1Coeffs[1], affine1Coeffs[0]);
|
|
@@ -29,25 +26,75 @@ const getAnswerNode = (identifiers) => {
|
|
|
29
26
|
const deriv = new MultiplyNode(new Affine(affine2.a * affine1.a, affine1.a + affine2.a * affine1.b).toTree(), exp);
|
|
30
27
|
return deriv.simplify();
|
|
31
28
|
};
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const affine2 = AffineConstructor.random();
|
|
35
|
-
const identifiers = {
|
|
36
|
-
affine1Coeffs: affine1.coefficients,
|
|
37
|
-
affine2Coeffs: affine2.coefficients,
|
|
38
|
-
};
|
|
39
|
-
//ae^cx+d + c(ax+b)e^cx+d = (a+c(ax+b))e^cx+d = (cax + a +cb) e^cx+d
|
|
40
|
-
return getQuestionFromIdentifiers(identifiers);
|
|
29
|
+
const getAnswer = (identifiers) => {
|
|
30
|
+
return getAnswerNode(identifiers).toTex();
|
|
41
31
|
};
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
32
|
+
const getHint = () => {
|
|
33
|
+
return `Si $u$ et $v$ sont deux fonctions dérivables, alors :
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
(uv)'(x) = u'(x)v(x) + u(x)v'(x)
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
Si $w$ est une fonction dérivable alors :
|
|
40
|
+
|
|
41
|
+
$$
|
|
42
|
+
(e^{w(x)})'(x) = w'(x) \\times e^{w(x)}
|
|
43
|
+
$$
|
|
44
|
+
|
|
45
|
+
`;
|
|
46
|
+
};
|
|
47
|
+
const getCorrection = (identifiers) => {
|
|
48
|
+
const { affine1Coeffs, affine2Coeffs } = identifiers;
|
|
49
|
+
const affine1 = new Affine(affine1Coeffs[1], affine1Coeffs[0]);
|
|
50
|
+
const affine2 = new Affine(affine2Coeffs[1], affine2Coeffs[0]);
|
|
51
|
+
return `Si $u$ et $v$ sont deux fonctions dérivables, alors :
|
|
52
|
+
|
|
53
|
+
$$
|
|
54
|
+
(uv)'(x) = u'(x)v(x) + u(x)v'(x)
|
|
55
|
+
$$
|
|
56
|
+
|
|
57
|
+
Ici :
|
|
58
|
+
|
|
59
|
+
$$
|
|
60
|
+
u(x) = ${affine1.toTex()}
|
|
61
|
+
$$
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
v(x) = e^{${affine2.toTex()}}
|
|
65
|
+
$$
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
u'(x) = ${affine1.toTree().derivative().simplify().toTex()}
|
|
69
|
+
$$
|
|
70
|
+
|
|
71
|
+
$$
|
|
72
|
+
v'(x) = ${affine2
|
|
73
|
+
.toTree()
|
|
74
|
+
.derivative()
|
|
75
|
+
.simplify()
|
|
76
|
+
.toTex()} \\times e^{${affine2.toTex()}}
|
|
77
|
+
$$
|
|
78
|
+
|
|
79
|
+
Donc :
|
|
80
|
+
|
|
81
|
+
$$
|
|
82
|
+
f'(x) = ${affine1
|
|
83
|
+
.toTree()
|
|
84
|
+
.derivative()
|
|
85
|
+
.simplify()
|
|
86
|
+
.toTex()} \\times e^{${affine2.toTex()}} + (${affine1.toTex()}) \\times (${affine2
|
|
87
|
+
.toTree()
|
|
88
|
+
.derivative()
|
|
89
|
+
.simplify()
|
|
90
|
+
.toTex()} \\times e^{${affine2.toTex()}})
|
|
91
|
+
$$
|
|
92
|
+
|
|
93
|
+
$$
|
|
94
|
+
f'(x) = ${getAnswer(identifiers)}
|
|
95
|
+
$$
|
|
96
|
+
|
|
97
|
+
`;
|
|
51
98
|
};
|
|
52
99
|
const getPropositions = (n, { answer }) => {
|
|
53
100
|
const propositions = [];
|
|
@@ -69,6 +116,28 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
|
69
116
|
return handleVEAError(err);
|
|
70
117
|
}
|
|
71
118
|
};
|
|
119
|
+
const getExpDerivativeFourQuestion = () => {
|
|
120
|
+
const affine1 = AffineConstructor.random();
|
|
121
|
+
const affine2 = AffineConstructor.random();
|
|
122
|
+
const identifiers = {
|
|
123
|
+
affine1Coeffs: affine1.coefficients,
|
|
124
|
+
affine2Coeffs: affine2.coefficients,
|
|
125
|
+
};
|
|
126
|
+
//ae^cx+d + c(ax+b)e^cx+d = (a+c(ax+b))e^cx+d = (cax + a +cb) e^cx+d
|
|
127
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
128
|
+
};
|
|
129
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
130
|
+
const question = {
|
|
131
|
+
answer: getAnswer(identifiers),
|
|
132
|
+
instruction: getInstruction(identifiers),
|
|
133
|
+
keys: ["x", "epower", "exp"],
|
|
134
|
+
answerFormat: "tex",
|
|
135
|
+
identifiers,
|
|
136
|
+
hint: getHint(identifiers),
|
|
137
|
+
correction: getCorrection(identifiers),
|
|
138
|
+
};
|
|
139
|
+
return question;
|
|
140
|
+
};
|
|
72
141
|
export const expDerivativeFour = {
|
|
73
142
|
id: "expDerivativeFour",
|
|
74
143
|
connector: "=",
|
|
@@ -83,4 +152,5 @@ export const expDerivativeFour = {
|
|
|
83
152
|
getInstruction,
|
|
84
153
|
getAnswer,
|
|
85
154
|
getQuestionFromIdentifiers,
|
|
155
|
+
hasHintAndCorrection: true,
|
|
86
156
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8IF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|