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
|
@@ -32,11 +32,11 @@ const getInstruction = (identifiers) => {
|
|
|
32
32
|
return `Sachant que :
|
|
33
33
|
|
|
34
34
|
$$
|
|
35
|
-
\\exp(${texA})\\approx${expARounded.frenchify()}
|
|
35
|
+
\\exp(${texA})\\approx ${expARounded.frenchify()}
|
|
36
36
|
$$
|
|
37
37
|
|
|
38
38
|
$$
|
|
39
|
-
\\exp(${texB})\\approx${expBRounded.frenchify()}
|
|
39
|
+
\\exp(${texB})\\approx ${expBRounded.frenchify()}
|
|
40
40
|
$$
|
|
41
41
|
|
|
42
42
|
donner une valeur approchée de $\\exp(${texAOpBSubstituted})$
|
|
@@ -188,6 +188,33 @@ const getPropositions = (n, { answer, ...identifiers }) => {
|
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
+
//filler
|
|
192
|
+
if (propositions.length < n) {
|
|
193
|
+
//exp(b)-exp(a)
|
|
194
|
+
{
|
|
195
|
+
const nodeWrong = round(substract(expBRounded, expARounded).evaluate(), precision).toTree();
|
|
196
|
+
const tex = nodeWrong.toTex();
|
|
197
|
+
if (tex !== "NaN") {
|
|
198
|
+
tryToAddWrongProp(propositions, tex);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
//exp(a)/exp(b)
|
|
202
|
+
{
|
|
203
|
+
const nodeWrong = round(frac(expARounded, expBRounded).evaluate(), precision).toTree();
|
|
204
|
+
const tex = nodeWrong.toTex();
|
|
205
|
+
if (tex !== "NaN") {
|
|
206
|
+
tryToAddWrongProp(propositions, tex);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
//(exp(a)+exp(b))/2
|
|
210
|
+
{
|
|
211
|
+
const nodeWrong = round(frac(add(expARounded, expBRounded), 2).evaluate(), precision).toTree();
|
|
212
|
+
const tex = nodeWrong.toTex();
|
|
213
|
+
if (tex !== "NaN") {
|
|
214
|
+
tryToAddWrongProp(propositions, tex);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
191
218
|
return shuffleProps(propositions, n);
|
|
192
219
|
};
|
|
193
220
|
const isAnswerValid = (ans, { answer }) => {
|
|
@@ -260,7 +287,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
260
287
|
};
|
|
261
288
|
export const approxExpAPlusB = {
|
|
262
289
|
id: "approxExpAPlusB",
|
|
263
|
-
label: "Déterminer une valeur approchée de $\\exp(a
|
|
290
|
+
label: "Déterminer une valeur approchée de $\\exp(a \\pm b)$ à partir de $\\exp(a)$ et $\\exp(b)$",
|
|
264
291
|
isSingleStep: true,
|
|
265
292
|
generator: (nb, opts) => getDistinctQuestions(() => getApproxExpAPlusBQuestion(opts), nb),
|
|
266
293
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approxExpKa.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/algebraic/approxExpKa.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"approxExpKa.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/algebraic/approxExpKa.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqPF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { randfloat } from "../../../../../math/utils/random/randfloat.js";
|
|
4
3
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
4
|
import { round } from "../../../../../math/utils/round.js";
|
|
6
5
|
import { exp } from "../../../../../tree/nodes/functions/expNode.js";
|
|
@@ -15,13 +14,13 @@ import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
|
15
14
|
const getInstruction = (identifiers) => {
|
|
16
15
|
const { nodeIdsA, nodeIdsK, expARounded, precision } = identifiers;
|
|
17
16
|
const [nodeA, nodeK] = [nodeIdsA, nodeIdsK].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
18
|
-
const [texA, _] = [nodeA, nodeK].map((node) => node.toTex());
|
|
17
|
+
const [texA, _] = [nodeA, nodeK].map((node) => node.toTex({ roundTo: 2 }));
|
|
19
18
|
const nodeKA = multiply(nodeK, nodeA).simplify({ fractionsToDecimal: true });
|
|
20
19
|
const texKA = nodeKA.toTex();
|
|
21
20
|
return `Sachant que :
|
|
22
21
|
|
|
23
22
|
$$
|
|
24
|
-
\\exp(${texA})\\approx${expARounded.frenchify()}
|
|
23
|
+
\\exp(${texA})\\approx ${expARounded.frenchify()}
|
|
25
24
|
$$
|
|
26
25
|
|
|
27
26
|
donner une valeur approchée de $\\exp(${texKA})$
|
|
@@ -39,7 +38,7 @@ const getAnswer = (identifiers) => {
|
|
|
39
38
|
const getHint = (identifiers) => {
|
|
40
39
|
const { nodeIdsA, nodeIdsK } = identifiers;
|
|
41
40
|
const [nodeA, nodeK] = [nodeIdsA, nodeIdsK].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
42
|
-
const [texA, texK] = [nodeA, nodeK].map((node) => node.toTex());
|
|
41
|
+
const [texA, texK] = [nodeA, nodeK].map((node) => node.toTex({ roundTo: 2 }));
|
|
43
42
|
return `Utilise la propriété :
|
|
44
43
|
|
|
45
44
|
$$
|
|
@@ -51,7 +50,7 @@ $$
|
|
|
51
50
|
const getCorrection = (identifiers) => {
|
|
52
51
|
const { nodeIdsA, nodeIdsK, expARounded } = identifiers;
|
|
53
52
|
const [nodeA, nodeK] = [nodeIdsA, nodeIdsK].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
54
|
-
const [texA, texK] = [nodeA, nodeK].map((node) => node.toTex());
|
|
53
|
+
const [texA, texK] = [nodeA, nodeK].map((node) => node.toTex({ roundTo: 2 }));
|
|
55
54
|
const nodeKA = multiply(nodeK, nodeA).simplify();
|
|
56
55
|
const texKA = nodeKA.toTex();
|
|
57
56
|
return `On a :
|
|
@@ -69,7 +68,7 @@ $$
|
|
|
69
68
|
On a donc :
|
|
70
69
|
|
|
71
70
|
$$
|
|
72
|
-
\\exp(${texKA}) = (
|
|
71
|
+
\\exp(${texKA}) = (\\exp(${texA}))^{${texK}} \\approx ({${expARounded.frenchify()}})^{${texK}}
|
|
73
72
|
$$
|
|
74
73
|
|
|
75
74
|
$$
|
|
@@ -134,7 +133,13 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
134
133
|
};
|
|
135
134
|
const getApproxExpKaQuestion = () => {
|
|
136
135
|
function createRandomIdentifiers() {
|
|
137
|
-
const
|
|
136
|
+
const dot1Pool = [...Array(30).keys()]
|
|
137
|
+
.map((i) => i + 1)
|
|
138
|
+
.map((i) => i * 0.1);
|
|
139
|
+
const dot25Pool = [...Array(12).keys()]
|
|
140
|
+
.map((i) => i + 1)
|
|
141
|
+
.map((i) => i * 0.25);
|
|
142
|
+
const nodeA = random(random([dot1Pool, dot25Pool])).toTree();
|
|
138
143
|
const precision = randint(1, 6);
|
|
139
144
|
const expARounded = round(exp(nodeA).evaluate(), precision);
|
|
140
145
|
const nodeK = random([
|
|
@@ -162,7 +162,7 @@ $$
|
|
|
162
162
|
Ainsi :
|
|
163
163
|
|
|
164
164
|
$$
|
|
165
|
-
${myExp(nodeAOpB).toTex()} = ${getAnswer(identifiers)}
|
|
165
|
+
${myExp(nodeAOpB).toTex()} = ${getAnswer(identifiers, opts)}
|
|
166
166
|
$$
|
|
167
167
|
|
|
168
168
|
`;
|
|
@@ -200,7 +200,7 @@ const getKeys = (identifiers, optsIn) => {
|
|
|
200
200
|
const nodeA = NodeConstructor.fromIdentifiers(identifiers.nodeIdsA);
|
|
201
201
|
const isUsingPi = nodeA.toTex().includes("\\pi");
|
|
202
202
|
return [
|
|
203
|
-
...(opts.isUseExpNotation ? ["exp"] : ["
|
|
203
|
+
...(opts.isUseExpNotation ? ["exp"] : ["epower"]),
|
|
204
204
|
...(isUsingPi ? ["pi"] : []),
|
|
205
205
|
];
|
|
206
206
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approxExpAPlusH.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/approxExpAPlusH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"approxExpAPlusH.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/approxExpAPlusH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAa7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA4PF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAmBjD,CAAC"}
|
|
@@ -13,6 +13,7 @@ import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.j
|
|
|
13
13
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
14
14
|
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
15
15
|
import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
16
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
16
17
|
const precision = 2;
|
|
17
18
|
const getInstruction = (identifiers) => {
|
|
18
19
|
const { nodeIdsA, nodeIdsH, nodeIdsAOpH, expARounded } = identifiers;
|
|
@@ -31,9 +32,7 @@ $$
|
|
|
31
32
|
\\exp(${texA})\\approx${expARounded.frenchify()}
|
|
32
33
|
$$
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
avec $${precision}$ décimale${precision > 1 ? "s" : ""}.`;
|
|
35
|
+
Donner une valeur approchée de $\\exp(${texAOpHSubstituted})$ avec $${precision}$ décimale${precision > 1 ? "s" : ""}.`;
|
|
37
36
|
};
|
|
38
37
|
const getAnswerNode = (identifiers) => {
|
|
39
38
|
const { nodeIdsH, nodeIdsAOpH, expARounded } = identifiers;
|
|
@@ -80,37 +79,25 @@ const getCorrection = (identifiers) => {
|
|
|
80
79
|
const { nodeIdsA, nodeIdsH, nodeIdsAOpH, expARounded } = identifiers;
|
|
81
80
|
const [nodeA, nodeH, nodeAOpH] = [nodeIdsA, nodeIdsH, nodeIdsAOpH].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
82
81
|
const [texA, texH, texAOpH] = [nodeA, nodeH, nodeAOpH].map((node) => node.toTex());
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
\\exp'(${texA}) = \\exp(${texA}) \\approx ${expARounded.frenchify()}
|
|
95
|
-
$$
|
|
96
|
-
|
|
97
|
-
Ainsi :
|
|
98
|
-
|
|
99
|
-
$$
|
|
100
|
-
\\exp(${texA} + ${texH}) \\approx ${expARounded.frenchify()} + ${expARounded.frenchify()} \\times ${texH}
|
|
101
|
-
$$
|
|
102
|
-
|
|
103
|
-
$$
|
|
104
|
-
\\exp(${texA} + ${texH}) \\approx ${getAnswer(identifiers)}
|
|
105
|
-
$$
|
|
82
|
+
const strOpSymbol = (() => {
|
|
83
|
+
switch (texAOpH) {
|
|
84
|
+
case "a+h":
|
|
85
|
+
return "+";
|
|
86
|
+
case "a-h":
|
|
87
|
+
return "-";
|
|
88
|
+
default:
|
|
89
|
+
throw new Error("Unsupported texAOpH: " + texAOpH);
|
|
90
|
+
}
|
|
91
|
+
})();
|
|
92
|
+
return `On souhaite utiliser la formule :
|
|
106
93
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
94
|
+
${alignTex([
|
|
95
|
+
[
|
|
96
|
+
`\\exp(${texA} ${strOpSymbol} ${texH})`,
|
|
97
|
+
`\\approx`,
|
|
98
|
+
`\\exp(${texA}) ${strOpSymbol} \\exp'(${texA}) \\times ${texH}`,
|
|
99
|
+
],
|
|
100
|
+
])}
|
|
114
101
|
|
|
115
102
|
Or :
|
|
116
103
|
|
|
@@ -120,18 +107,20 @@ $$
|
|
|
120
107
|
|
|
121
108
|
Ainsi :
|
|
122
109
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
110
|
+
${alignTex([
|
|
111
|
+
[
|
|
112
|
+
`\\exp(${texA} ${strOpSymbol} ${texH})`,
|
|
113
|
+
`\\approx`,
|
|
114
|
+
`${expARounded.frenchify()} ${strOpSymbol} ${expARounded.frenchify()} \\times ${texH}`,
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
`\\exp(${texA} ${strOpSymbol} ${texH})`,
|
|
118
|
+
`\\approx`,
|
|
119
|
+
`${getAnswer(identifiers)}`,
|
|
120
|
+
],
|
|
121
|
+
])}
|
|
130
122
|
|
|
131
123
|
`;
|
|
132
|
-
default:
|
|
133
|
-
throw new Error("Unsupported texAOpH: " + texAOpH);
|
|
134
|
-
}
|
|
135
124
|
};
|
|
136
125
|
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
137
126
|
const { nodeIdsA, nodeIdsH, nodeIdsAOpH, expARounded } = identifiers;
|
|
@@ -216,7 +205,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
216
205
|
};
|
|
217
206
|
export const approxExpAPlusH = {
|
|
218
207
|
id: "approxExpAPlusH",
|
|
219
|
-
label: "Déterminer une valeur approchée de $\\exp(a
|
|
208
|
+
label: "Déterminer une valeur approchée de $\\exp(a \\pm h)$ par approximation linéaire",
|
|
220
209
|
isSingleStep: true,
|
|
221
210
|
generator: (nb, opts) => getDistinctQuestions(() => getApproxExpAPlusHQuestion(opts), nb),
|
|
222
211
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expAntecedentFromGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/expAntecedentFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"expAntecedentFromGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/expAntecedentFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAyRF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { greenMain, red } from "../../../../../geogebra/colors.js";
|
|
|
4
4
|
import { GeogebraConstructor } from "../../../../../geogebra/geogebraConstructor.js";
|
|
5
5
|
import { Point } from "../../../../../math/geometry/point.js";
|
|
6
6
|
import { randfloat } from "../../../../../math/utils/random/randfloat.js";
|
|
7
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
7
8
|
import { round } from "../../../../../math/utils/round.js";
|
|
8
9
|
import { exp } from "../../../../../tree/nodes/functions/expNode.js";
|
|
9
10
|
import { LogNode } from "../../../../../tree/nodes/functions/logNode.js";
|
|
@@ -11,6 +12,11 @@ import { substract } from "../../../../../tree/nodes/operators/substractNode.js"
|
|
|
11
12
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
12
13
|
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
13
14
|
const precision = 2;
|
|
15
|
+
const getGridPoints = () => {
|
|
16
|
+
return [...Array(9).keys()]
|
|
17
|
+
.map((i) => i + 1)
|
|
18
|
+
.map((i) => new Point(`P${i}`, round(Math.log(i), precision), i));
|
|
19
|
+
};
|
|
14
20
|
const getInstruction = (identifiers) => {
|
|
15
21
|
const { a, isExpPrime } = identifiers;
|
|
16
22
|
return `La courbe représentative de la fonction exponentielle est ci-dessous en rouge.
|
|
@@ -49,10 +55,10 @@ $$
|
|
|
49
55
|
|
|
50
56
|
Cela étant dit,
|
|
51
57
|
|
|
52
|
-
pour résoudre graphiquement $f(x)=${a.frenchify()}$, on
|
|
58
|
+
pour résoudre graphiquement $f(x)=${a.frenchify()}$, cherche-t-on l'image ou les antécédents ?`;
|
|
53
59
|
}
|
|
54
60
|
else {
|
|
55
|
-
return `Pour résoudre graphiquement $f(x)=${a.frenchify()}$, on
|
|
61
|
+
return `Pour résoudre graphiquement $f(x)=${a.frenchify()}$, cherche-t-on l'image ou les antécédents ?`;
|
|
56
62
|
}
|
|
57
63
|
};
|
|
58
64
|
const getCorrection = (identifiers) => {
|
|
@@ -78,10 +84,8 @@ $$
|
|
|
78
84
|
}
|
|
79
85
|
})()}
|
|
80
86
|
On cherche les antécédents de $${a.frenchify()}$ par $\\exp$.
|
|
81
|
-
|
|
82
|
-
La fonction exponentielle est strictement croissante de $\\mathbb{R}$ dans $\\mathbb{R}^{+*}$
|
|
83
87
|
|
|
84
|
-
|
|
88
|
+
Il n'y en a qu'un seul.
|
|
85
89
|
|
|
86
90
|
On lit :
|
|
87
91
|
|
|
@@ -99,9 +103,33 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
99
103
|
const pointX0 = new Point("PX0", x, 0);
|
|
100
104
|
const point0Y = new Point("P0Y", 0, y);
|
|
101
105
|
const pointXY = new Point("PXY", x, y);
|
|
106
|
+
const gridPoints = getGridPoints();
|
|
102
107
|
const commands = [
|
|
103
108
|
`Cf = exp(x)`,
|
|
104
109
|
`SetColor(Cf, "${red}")`,
|
|
110
|
+
//custom grid
|
|
111
|
+
...gridPoints.flatMap((point, i) => {
|
|
112
|
+
const x = point.x.evaluate();
|
|
113
|
+
const y = point.y.evaluate();
|
|
114
|
+
return [
|
|
115
|
+
//lineFromX
|
|
116
|
+
`LX${i} = Line((${x},0),(${x},1))`,
|
|
117
|
+
`SetColor(LX${i}, "#999999")`,
|
|
118
|
+
`SetLineThickness(LX${i}, 1)`,
|
|
119
|
+
`SetFixed(LX${i}, true)`,
|
|
120
|
+
//lineFromY
|
|
121
|
+
`LY${i} = Line((0,${y}),(1,${y}))`,
|
|
122
|
+
`SetColor(LY${i}, "#999999")`,
|
|
123
|
+
`SetLineThickness(LY${i}, 1)`,
|
|
124
|
+
`SetFixed(LY${i}, true)`,
|
|
125
|
+
//markerFromX
|
|
126
|
+
`LblX${i} = Text("\\footnotesize ${round(x, precision).frenchify()}", (${x},0), true, true, 0, -1)`,
|
|
127
|
+
//markerFromY
|
|
128
|
+
// `LblY${i} = Text("\\footnotesize ${round(y, precision).toFixed(
|
|
129
|
+
// precision,
|
|
130
|
+
// )}", (0,${y}), true, true, -1, 0)`,
|
|
131
|
+
];
|
|
132
|
+
}),
|
|
105
133
|
`v1 = Vector(${point0Y.toMathString()},${pointXY.toMathString()})`,
|
|
106
134
|
`SetColor(v1, "${greenMain}")`,
|
|
107
135
|
`v2 = Vector(${pointXY.toMathString()},${pointX0.toMathString()})`,
|
|
@@ -110,6 +138,10 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
110
138
|
const ggb = new GeogebraConstructor({
|
|
111
139
|
commands,
|
|
112
140
|
lockedAxesRatio: (xMaxFrame - xMinFrame) / (yMaxFrame - yMinFrame),
|
|
141
|
+
xAxis: {
|
|
142
|
+
hideNumbers: true,
|
|
143
|
+
},
|
|
144
|
+
hideGrid: true,
|
|
113
145
|
});
|
|
114
146
|
return ggb.getOptions({
|
|
115
147
|
coords: coordsFrame,
|
|
@@ -118,10 +150,41 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
118
150
|
const getGGBOptions = (identifiers) => {
|
|
119
151
|
const { coordsFrame } = identifiers;
|
|
120
152
|
const [xMinFrame, xMaxFrame, yMinFrame, yMaxFrame] = coordsFrame;
|
|
121
|
-
const
|
|
153
|
+
const gridPoints = getGridPoints();
|
|
154
|
+
const commands = [
|
|
155
|
+
`Cf = exp(x)`,
|
|
156
|
+
`SetColor(Cf, "${red}")`,
|
|
157
|
+
//custom grid
|
|
158
|
+
...gridPoints.flatMap((point, i) => {
|
|
159
|
+
const x = point.x.evaluate();
|
|
160
|
+
const y = point.y.evaluate();
|
|
161
|
+
return [
|
|
162
|
+
//lineFromX
|
|
163
|
+
`LX${i} = Line((${x},0),(${x},1))`,
|
|
164
|
+
`SetColor(LX${i}, "#999999")`,
|
|
165
|
+
`SetLineThickness(LX${i}, 1)`,
|
|
166
|
+
`SetFixed(LX${i}, true)`,
|
|
167
|
+
//lineFromY
|
|
168
|
+
`LY${i} = Line((0,${y}),(1,${y}))`,
|
|
169
|
+
`SetColor(LY${i}, "#999999")`,
|
|
170
|
+
`SetLineThickness(LY${i}, 1)`,
|
|
171
|
+
`SetFixed(LY${i}, true)`,
|
|
172
|
+
//markerFromX
|
|
173
|
+
`LblX${i} = Text("\\footnotesize ${round(x, precision).frenchify()}", (${x},0), true, true, 0, -1)`,
|
|
174
|
+
//markerFromY
|
|
175
|
+
// `LblY${i} = Text("\\footnotesize ${round(y, precision).toFixed(
|
|
176
|
+
// precision,
|
|
177
|
+
// )}", (0,${y}), true, true, -1, 0)`,
|
|
178
|
+
];
|
|
179
|
+
}),
|
|
180
|
+
];
|
|
122
181
|
const ggb = new GeogebraConstructor({
|
|
123
182
|
commands,
|
|
124
183
|
lockedAxesRatio: (xMaxFrame - xMinFrame) / (yMaxFrame - yMinFrame),
|
|
184
|
+
xAxis: {
|
|
185
|
+
hideNumbers: true,
|
|
186
|
+
},
|
|
187
|
+
hideGrid: true,
|
|
125
188
|
});
|
|
126
189
|
return ggb.getOptions({
|
|
127
190
|
coords: coordsFrame,
|
|
@@ -150,9 +213,18 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
150
213
|
return substract(nodeAns, nodeAnswer).evaluate() === 0;
|
|
151
214
|
};
|
|
152
215
|
const getExpAntecedentFromGraphQuestion = () => {
|
|
153
|
-
const
|
|
216
|
+
const minA = 1;
|
|
217
|
+
const maxA = 8;
|
|
218
|
+
const a = randint(minA, maxA + 1);
|
|
154
219
|
const isExpPrime = coinFlip();
|
|
155
|
-
const
|
|
220
|
+
const minYFrame = Math.max(1, a - randint(1, 3));
|
|
221
|
+
const maxYFrame = a + randint(1, 3);
|
|
222
|
+
const coordsFrame = [
|
|
223
|
+
Math.log(minYFrame),
|
|
224
|
+
Math.log(maxYFrame),
|
|
225
|
+
-1.3,
|
|
226
|
+
maxYFrame,
|
|
227
|
+
];
|
|
156
228
|
const identifiers = {
|
|
157
229
|
a,
|
|
158
230
|
isExpPrime,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expImageFromGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/expImageFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"expImageFromGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/expImageFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAwQF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
|
|
@@ -12,19 +12,16 @@ import { substract } from "../../../../../tree/nodes/operators/substractNode.js"
|
|
|
12
12
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
13
13
|
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
14
14
|
const precision = 2;
|
|
15
|
+
const getGridPoints = () => {
|
|
16
|
+
return [...Array(9).keys()].map((i) => new Point(`P${i}`, i, round(Math.exp(i), precision)));
|
|
17
|
+
};
|
|
15
18
|
const getInstruction = (identifiers) => {
|
|
16
19
|
const { a, isExpPrime } = identifiers;
|
|
17
20
|
return `La courbe représentative de la fonction exponentielle est ci-dessous en rouge.
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$$
|
|
22
|
-
\\exp${isExpPrime ? "'" : ""}(${a.frenchify()}) = x
|
|
23
|
-
$$
|
|
24
|
-
|
|
25
|
-
(donner une valeur approchée
|
|
22
|
+
Donner une lecture graphique de la valeur de $\\exp${isExpPrime ? "'" : ""}(${a.frenchify()})$
|
|
26
23
|
|
|
27
|
-
avec $${precision}$ décimale${precision > 1 ? "s" : ""}
|
|
24
|
+
avec $${precision}$ décimale${precision > 1 ? "s" : ""}.`;
|
|
28
25
|
};
|
|
29
26
|
const getAnswerNode = (identifiers) => {
|
|
30
27
|
const { a } = identifiers;
|
|
@@ -35,26 +32,22 @@ const getAnswer = (identifiers) => {
|
|
|
35
32
|
};
|
|
36
33
|
const getHint = (identifiers) => {
|
|
37
34
|
const { a, isExpPrime } = identifiers;
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
return `${(() => {
|
|
36
|
+
if (isExpPrime) {
|
|
37
|
+
return `La fonction exponentielle vérifie pour tout $x$ réel :
|
|
40
38
|
|
|
41
39
|
$$
|
|
42
40
|
\\exp'(x)=\\exp(x)
|
|
43
41
|
$$
|
|
44
42
|
|
|
45
|
-
On cherche donc à
|
|
46
|
-
|
|
47
|
-
$$
|
|
48
|
-
\\exp(x)=${a.frenchify()}
|
|
49
|
-
$$
|
|
50
|
-
|
|
51
|
-
Cela étant dit,
|
|
43
|
+
On cherche donc à lire graphiquement la valeur de $\\exp(${a.frenchify()})$.
|
|
52
44
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return ``;
|
|
49
|
+
}
|
|
50
|
+
})()}Pour une fonction $f$, comment lit-on $f(${a.frenchify()})$ ?`;
|
|
58
51
|
};
|
|
59
52
|
const getCorrection = (identifiers) => {
|
|
60
53
|
const { a, isExpPrime } = identifiers;
|
|
@@ -72,7 +65,7 @@ $$
|
|
|
72
65
|
return ``;
|
|
73
66
|
}
|
|
74
67
|
})()}
|
|
75
|
-
On cherche l'image de $${a.frenchify()}$ par $\\exp
|
|
68
|
+
On cherche l'image de $${a.frenchify()}$ par $\\exp$.
|
|
76
69
|
|
|
77
70
|
On lit :
|
|
78
71
|
|
|
@@ -90,9 +83,34 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
90
83
|
const pointX0 = new Point("PX0", x, 0);
|
|
91
84
|
const point0Y = new Point("P0Y", 0, y);
|
|
92
85
|
const pointXY = new Point("PXY", x, y);
|
|
86
|
+
const gridPoints = getGridPoints();
|
|
93
87
|
const commands = [
|
|
94
88
|
`Cf = exp(x)`,
|
|
95
89
|
`SetColor(Cf, "${red}")`,
|
|
90
|
+
//custom grid
|
|
91
|
+
...gridPoints.flatMap((point, i) => {
|
|
92
|
+
const x = point.x.evaluate();
|
|
93
|
+
const y = point.y.evaluate();
|
|
94
|
+
return [
|
|
95
|
+
//lineFromX
|
|
96
|
+
`LX${i} = Line((${x},0),(${x},1))`,
|
|
97
|
+
`SetColor(LX${i}, "#999999")`,
|
|
98
|
+
`SetLineThickness(LX${i}, 1)`,
|
|
99
|
+
`SetFixed(LX${i}, true)`,
|
|
100
|
+
//lineFromY
|
|
101
|
+
`LY${i} = Line((0,${y}),(1,${y}))`,
|
|
102
|
+
`SetColor(LY${i}, "#999999")`,
|
|
103
|
+
`SetLineThickness(LY${i}, 1)`,
|
|
104
|
+
`SetFixed(LY${i}, true)`,
|
|
105
|
+
//markerFromX
|
|
106
|
+
// `LblX${i} = Text("\\footnotesize ${round(
|
|
107
|
+
// x,
|
|
108
|
+
// precision,
|
|
109
|
+
// ).frenchify()}", (${x},0), true, true, 0, -1)`,
|
|
110
|
+
//markerFromY
|
|
111
|
+
`LblY${i} = Text("\\footnotesize ${round(y, precision).toFixed(precision)}", (0,${y}), true, true, -1, 0)`,
|
|
112
|
+
];
|
|
113
|
+
}),
|
|
96
114
|
`v1 = Vector(${pointX0.toMathString()},${pointXY.toMathString()})`,
|
|
97
115
|
`SetColor(v1, "${greenMain}")`,
|
|
98
116
|
`v2 = Vector(${pointXY.toMathString()},${point0Y.toMathString()})`,
|
|
@@ -101,6 +119,10 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
101
119
|
const ggb = new GeogebraConstructor({
|
|
102
120
|
commands,
|
|
103
121
|
lockedAxesRatio: (xMaxFrame - xMinFrame) / (yMaxFrame - yMinFrame),
|
|
122
|
+
yAxis: {
|
|
123
|
+
hideNumbers: true,
|
|
124
|
+
},
|
|
125
|
+
hideGrid: true,
|
|
104
126
|
});
|
|
105
127
|
return ggb.getOptions({
|
|
106
128
|
coords: coordsFrame,
|
|
@@ -109,10 +131,43 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
109
131
|
const getGGBOptions = (identifiers) => {
|
|
110
132
|
const { coordsFrame } = identifiers;
|
|
111
133
|
const [xMinFrame, xMaxFrame, yMinFrame, yMaxFrame] = coordsFrame;
|
|
112
|
-
const
|
|
134
|
+
const gridPoints = getGridPoints();
|
|
135
|
+
const commands = [
|
|
136
|
+
//func
|
|
137
|
+
`Cf = exp(x)`,
|
|
138
|
+
`SetColor(Cf, "${red}")`,
|
|
139
|
+
//custom grid
|
|
140
|
+
...gridPoints.flatMap((point, i) => {
|
|
141
|
+
const x = point.x.evaluate();
|
|
142
|
+
const y = point.y.evaluate();
|
|
143
|
+
return [
|
|
144
|
+
//lineFromX
|
|
145
|
+
`LX${i} = Line((${x},0),(${x},1))`,
|
|
146
|
+
`SetColor(LX${i}, "#999999")`,
|
|
147
|
+
`SetLineThickness(LX${i}, 1)`,
|
|
148
|
+
`SetFixed(LX${i}, true)`,
|
|
149
|
+
//lineFromY
|
|
150
|
+
`LY${i} = Line((0,${y}),(1,${y}))`,
|
|
151
|
+
`SetColor(LY${i}, "#999999")`,
|
|
152
|
+
`SetLineThickness(LY${i}, 1)`,
|
|
153
|
+
`SetFixed(LY${i}, true)`,
|
|
154
|
+
//markerFromX
|
|
155
|
+
// `LblX${i} = Text("\\footnotesize ${round(
|
|
156
|
+
// x,
|
|
157
|
+
// precision,
|
|
158
|
+
// ).frenchify()}", (${x},0), true, true, 0, -1)`,
|
|
159
|
+
//markerFromY
|
|
160
|
+
`LblY${i} = Text("\\footnotesize ${round(y, precision).toFixed(precision)}", (0,${y}), true, true, -1, 0)`,
|
|
161
|
+
];
|
|
162
|
+
}),
|
|
163
|
+
];
|
|
113
164
|
const ggb = new GeogebraConstructor({
|
|
114
165
|
commands,
|
|
115
166
|
lockedAxesRatio: (xMaxFrame - xMinFrame) / (yMaxFrame - yMinFrame),
|
|
167
|
+
yAxis: {
|
|
168
|
+
hideNumbers: true,
|
|
169
|
+
},
|
|
170
|
+
hideGrid: true,
|
|
116
171
|
});
|
|
117
172
|
return ggb.getOptions({
|
|
118
173
|
coords: coordsFrame,
|
|
@@ -145,7 +200,7 @@ const getExpImageFromGraphQuestion = () => {
|
|
|
145
200
|
const maxA = 8;
|
|
146
201
|
const a = randint(minA, maxA + 1);
|
|
147
202
|
const isExpPrime = coinFlip();
|
|
148
|
-
const minXFrame =
|
|
203
|
+
const minXFrame = -1;
|
|
149
204
|
const maxXFrame = a + randint(1, 3);
|
|
150
205
|
const coordsFrame = [
|
|
151
206
|
minXFrame,
|
package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPlausibleExpFromGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAmB7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CAQd,CAAC;
|
|
1
|
+
{"version":3,"file":"isPlausibleExpFromGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAmB7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CAQd,CAAC;AA8WF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|