math-exercises 3.0.157 → 3.0.158
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/exercise.d.ts +7 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.js +145 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +444 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts +15 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +292 -0
- package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts +4 -0
- package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/index.js +3 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts +18 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +437 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/index.js +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +29 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +35 -2
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +19 -0
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +282 -0
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +30 -2
- package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/productDerivative.js +68 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +40 -4
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +30 -3
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts +12 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.js +127 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts +13 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.js +161 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts +11 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.js +116 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts +8 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.js +142 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +4 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.js +4 -0
- package/lib/exercises/math/derivation/index.d.ts +1 -1
- package/lib/exercises/math/derivation/index.js +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts +13 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +278 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts +11 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +211 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts +9 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +142 -0
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +5 -0
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/index.js +4 -0
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts +14 -0
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +337 -0
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts +11 -0
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +234 -0
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts +9 -0
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +190 -0
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts +9 -0
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +190 -0
- package/lib/exercises/math/functions/exponential/definition/index.d.ts +5 -0
- package/lib/exercises/math/functions/exponential/definition/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/index.js +4 -0
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts +13 -0
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +375 -0
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +30 -3
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +35 -1
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.js +23 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +29 -0
- package/lib/exercises/math/functions/variations/exp/index.d.ts +3 -0
- package/lib/exercises/math/functions/variations/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/exp/index.js +2 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts +9 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +101 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts +11 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +192 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +2 -2
- package/lib/exercises/math/geometry/thales/thales.js +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity/determinant.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +33 -7
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +38 -1
- package/lib/exercises/math/probaStat/conditionalProbability.d.ts +4 -1
- package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditionalProbability.js +38 -5
- package/lib/exercises/math/probaStat/independancy/independancy.d.ts +9 -0
- package/lib/exercises/math/probaStat/independancy/independancy.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/independancy.js +114 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts +9 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCap.js +101 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts +9 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCup.js +118 -0
- package/lib/exercises/math/probaStat/independancy/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/independancy/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/index.js +4 -0
- package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts +10 -0
- package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.js +106 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -1
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.js +7 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts +9 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.js +118 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +55 -6
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +42 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts +4 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +57 -7
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +24 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +31 -8
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +11 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.js +5 -5
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +3 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.js +41 -2
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -2
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequenceEvaluation.js +22 -2
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts +9 -0
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +107 -0
- package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/associatePoint.js +86 -0
- package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.js +205 -0
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts +7 -0
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +121 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts +7 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/index.js +7 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +100 -0
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts +8 -0
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +97 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.js +112 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts +7 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +92 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts +7 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +104 -0
- package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts +7 -0
- package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.js +83 -0
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts +8 -0
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +111 -0
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts +8 -0
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +101 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts +6 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/index.js +6 -0
- package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts +9 -0
- package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.js +151 -0
- package/lib/exercises/math/trigonometry/index.d.ts +3 -14
- package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/index.js +3 -14
- package/lib/exercises/math/trigonometry/triangle/index.d.ts +7 -0
- package/lib/exercises/math/trigonometry/triangle/index.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/index.js +6 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts +10 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometry.js +207 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts +10 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +174 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts +11 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.js +224 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts +13 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.js +189 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts +13 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +290 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts +18 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.js +386 -0
- package/lib/exercises/pc/mathExosInPC.d.ts +2 -2
- package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
- package/lib/exercises/pc/mathExosInPC.js +2 -2
- package/lib/index.d.ts +63 -27
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/segment.d.ts +1 -1
- package/lib/math/geometry/vector.d.ts +2 -1
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +1 -1
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.js +2 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +3 -1
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +17 -6
- package/lib/tree/nodes/operators/multiplyNode.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Rational } from "../../../../../math/numbers/rationals/rational.js";
|
|
4
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
|
+
import { exp } from "../../../../../tree/nodes/functions/expNode.js";
|
|
6
|
+
import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
|
|
7
|
+
import { EquationSolutionNode } from "../../../../../tree/nodes/equations/equationSolutionNode.js";
|
|
8
|
+
import { EmptySet } from "../../../../../tree/nodes/sets/discreteSetNode.js";
|
|
9
|
+
import { zip } from "../../../../../utils/arrays/arrayZip.js";
|
|
10
|
+
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../../tree/nodes/numbers/infiniteNode.js";
|
|
11
|
+
import { IntervalNode } from "../../../../../tree/nodes/sets/intervalNode.js";
|
|
12
|
+
import { ClosureType } from "../../../../../tree/nodes/sets/closure.js";
|
|
13
|
+
import { InequationSolutionNode } from "../../../../../tree/nodes/inequations/inequationSolutionNode.js";
|
|
14
|
+
import { Affine, AffineConstructor } from "../../../../../math/polynomials/affine.js";
|
|
15
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
16
|
+
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
17
|
+
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
18
|
+
import { getCartesiansProducts } from "../../../../../utils/arrays/cartesianProducts.js";
|
|
19
|
+
import { InequationSymbol, InequationSymbolConstructor, } from "../../../../../math/inequations/inequation.js";
|
|
20
|
+
import { InequationNode } from "../../../../../tree/nodes/inequations/inequationNode.js";
|
|
21
|
+
import { inequationSolutionFormat } from "../../../../../exercises/options/inequationSolutionFormat.js";
|
|
22
|
+
import { unionIntervalParser } from "../../../../../tree/parsers/unionIntervalParser.js";
|
|
23
|
+
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
24
|
+
//reuse other exercises: (unfortunately breaks exosTest)
|
|
25
|
+
// import { reuseSecondDegreeInequation } from "../../../../../exercises/math/functions/trinoms/equation/secondDegreeInequation.js";
|
|
26
|
+
// import { reuseFirstDegreeInequationsType3 } from "../../../../../exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js";
|
|
27
|
+
import { intervalParser } from "../../../../../tree/parsers/intervalParser.js";
|
|
28
|
+
import { inequationParser } from "../../../../../tree/parsers/inequationParser.js";
|
|
29
|
+
import { Trinom } from "../../../../../math/polynomials/trinom.js";
|
|
30
|
+
import { UnionIntervalNode } from "../../../../../tree/nodes/sets/unionIntervalNode.js";
|
|
31
|
+
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
32
|
+
const reuseSecondDegreeInequation = {
|
|
33
|
+
getAnswerNode: (identifiers) => {
|
|
34
|
+
const { a, b, c, ineqType } = identifiers;
|
|
35
|
+
const ineq = new InequationSymbol(ineqType);
|
|
36
|
+
const trinom = new Trinom(a, b, c);
|
|
37
|
+
const roots = trinom.getRootsNode();
|
|
38
|
+
const aPositive = a > 0;
|
|
39
|
+
const insideInterval = new IntervalNode(roots[0], roots[1], ineq.isStrict ? ClosureType.OO : ClosureType.FF);
|
|
40
|
+
const outsideUnion = new UnionIntervalNode([
|
|
41
|
+
new IntervalNode(MinusInfinityNode, roots[0], ineq.isStrict ? ClosureType.OO : ClosureType.OF),
|
|
42
|
+
new IntervalNode(roots[1], PlusInfinityNode, ineq.isStrict ? ClosureType.OO : ClosureType.FO),
|
|
43
|
+
]);
|
|
44
|
+
const tree = ineq.isSup
|
|
45
|
+
? aPositive
|
|
46
|
+
? outsideUnion
|
|
47
|
+
: insideInterval
|
|
48
|
+
: aPositive
|
|
49
|
+
? insideInterval
|
|
50
|
+
: outsideUnion;
|
|
51
|
+
return new InequationSolutionNode(tree);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const reuseFirstDegreeInequationsType3 = {
|
|
55
|
+
getAnswerNode: (identifiers, opts) => {
|
|
56
|
+
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
57
|
+
const { ineqType, a, b, c, d, coeff } = identifiers;
|
|
58
|
+
const affine1 = new Affine(a, b);
|
|
59
|
+
const affine2 = new Affine(c, d);
|
|
60
|
+
const result = new Rational(affine2.b - affine1.b, affine1.a - affine2.a)
|
|
61
|
+
.simplify()
|
|
62
|
+
.toTree();
|
|
63
|
+
const invIneqType = new InequationSymbol(ineqType).reversed();
|
|
64
|
+
const ineq = new InequationNode(["x".toTree(), result], coeff > 0 ? ineqType : invIneqType);
|
|
65
|
+
const node = isInterval
|
|
66
|
+
? new InequationSolutionNode(ineq.toInterval())
|
|
67
|
+
: ineq;
|
|
68
|
+
return node;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
const texXDomain = `\\mathbb{R}`;
|
|
72
|
+
const intervalbbR = new IntervalNode(MinusInfinityNode, PlusInfinityNode, ClosureType.OO);
|
|
73
|
+
const texbbR = intervalbbR.toTex();
|
|
74
|
+
const createNodeForCoeffs = (coeffs) => {
|
|
75
|
+
//because Error: n-th coeff must be not null at new Polynomial
|
|
76
|
+
const [a, b, c] = coeffs.toReversed();
|
|
77
|
+
if (a !== 0) {
|
|
78
|
+
return new Polynomial(coeffs).toTree();
|
|
79
|
+
}
|
|
80
|
+
else if (b !== 0) {
|
|
81
|
+
return AffineConstructor.fromCoeffs(coeffs).toTree();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return c.toTree();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const getStartStatement = (identifiers) => {
|
|
88
|
+
return getStatementNode(identifiers).toTex();
|
|
89
|
+
};
|
|
90
|
+
const getStatementNode = (identifiers) => {
|
|
91
|
+
const { coeffsF, coeffsG, ineqType } = identifiers;
|
|
92
|
+
const [nodeF, nodeG] = [coeffsF, coeffsG].map(createNodeForCoeffs);
|
|
93
|
+
const statementTree = new InequationNode([exp(nodeF), exp(nodeG)], ineqType);
|
|
94
|
+
return statementTree;
|
|
95
|
+
};
|
|
96
|
+
const getInstruction = (identifiers) => {
|
|
97
|
+
return `Résoudre dans $${texXDomain}$ :
|
|
98
|
+
|
|
99
|
+
$$
|
|
100
|
+
${getStatementNode(identifiers).toTex()}
|
|
101
|
+
$$`;
|
|
102
|
+
};
|
|
103
|
+
const getAnswerNode = (identifiers, opts) => {
|
|
104
|
+
const { inequationSolutionFormat } = opts;
|
|
105
|
+
const { coeffsF, coeffsG, ineqType } = identifiers;
|
|
106
|
+
const [a, b, c] = zip(coeffsF, coeffsG)
|
|
107
|
+
.map(([kF, kG]) => kF - kG)
|
|
108
|
+
.toReversed();
|
|
109
|
+
const isZero = [a, b, c].every((k) => k === 0);
|
|
110
|
+
if (isZero) {
|
|
111
|
+
switch (ineqType) {
|
|
112
|
+
case "<":
|
|
113
|
+
case ">":
|
|
114
|
+
return new EquationSolutionNode(EmptySet);
|
|
115
|
+
case "\\le":
|
|
116
|
+
case "\\ge": {
|
|
117
|
+
const intervalbbR = new IntervalNode(MinusInfinityNode, PlusInfinityNode, ClosureType.OO);
|
|
118
|
+
return new InequationSolutionNode(intervalbbR);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (a !== 0) {
|
|
124
|
+
return reuseSecondDegreeInequation.getAnswerNode({ a, b, c, ineqType });
|
|
125
|
+
}
|
|
126
|
+
else if (b !== 0) {
|
|
127
|
+
const [b, a] = coeffsF;
|
|
128
|
+
const [d, c] = coeffsG;
|
|
129
|
+
return reuseFirstDegreeInequationsType3.getAnswerNode({ a, b, c, d, ineqType, coeff: a - c }, { inequationSolutionFormat });
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
//a==0,b==0,c!==0
|
|
133
|
+
return new EquationSolutionNode(EmptySet);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const getAnswer = (identifiers, optsIn) => {
|
|
138
|
+
const opts = optsIn ?? optsDefault;
|
|
139
|
+
const { coeffsF, coeffsG, ineqType } = identifiers;
|
|
140
|
+
const [a, b, c] = zip(coeffsF, coeffsG)
|
|
141
|
+
.map(([kF, kG]) => kF - kG)
|
|
142
|
+
.toReversed();
|
|
143
|
+
const isCoeffsZero = [a, b, c].every((k) => k === 0);
|
|
144
|
+
if (isCoeffsZero) {
|
|
145
|
+
switch (ineqType) {
|
|
146
|
+
case "<":
|
|
147
|
+
case ">": {
|
|
148
|
+
if (opts.inequationSolutionFormat === "Inégalité (x>a)") {
|
|
149
|
+
return `x\\in\\varnothing`;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
return `S=\\varnothing`;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
case "\\le":
|
|
156
|
+
case "\\ge": {
|
|
157
|
+
if (opts.inequationSolutionFormat === "Inégalité (x>a)") {
|
|
158
|
+
return `x\\in${texbbR}`;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
return `S=${texbbR}`;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
return getAnswerNode(identifiers, opts).toTex();
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const getHint = () => {
|
|
171
|
+
return `Essaye de transformer l'équation originale en une équation du type $e^{h(x)}=1$, puis résous cette équation.`;
|
|
172
|
+
};
|
|
173
|
+
const getCorrection = (identifiers, optsIn) => {
|
|
174
|
+
const opts = optsIn ?? optsDefault;
|
|
175
|
+
const { coeffsF, coeffsG, ineqType } = identifiers;
|
|
176
|
+
const [nodeF, nodeG] = [coeffsF, coeffsG].map(createNodeForCoeffs);
|
|
177
|
+
//that would be nice, but:
|
|
178
|
+
//Error: should-throw Too many iterations in simplify
|
|
179
|
+
// const nodeFMinusGSimplified = substract(nodeF, nodeG).simplify({
|
|
180
|
+
// towardsDistribute: true,
|
|
181
|
+
// });
|
|
182
|
+
//workaround:
|
|
183
|
+
const coeffsFMinusG = zip(coeffsF, coeffsG).map(([kF, kG]) => kF - kG);
|
|
184
|
+
const nodeFMinusGSimplified = createNodeForCoeffs(coeffsFMinusG);
|
|
185
|
+
return `On va transformer l'équation originale pour se ramener à quelque chose que l'on connaît mieux.
|
|
186
|
+
|
|
187
|
+
L'ensemble image de la fonction exponentielle est $\\mathbb{R}^{+*}$ donc on peut tout diviser par le membre de droite sans changer le sens de l'inégalité.
|
|
188
|
+
|
|
189
|
+
${alignTex([
|
|
190
|
+
["", "", getStatementNode(identifiers).toTex()],
|
|
191
|
+
[
|
|
192
|
+
"",
|
|
193
|
+
`\\Leftrightarrow`,
|
|
194
|
+
new InequationNode([frac(exp(nodeF), exp(nodeG)), (1).toTree()], ineqType).toTex(),
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
"",
|
|
198
|
+
`\\Leftrightarrow`,
|
|
199
|
+
new InequationNode([exp(substract(nodeF, nodeG)), (1).toTree()], ineqType).toTex(),
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
"",
|
|
203
|
+
`\\Leftrightarrow`,
|
|
204
|
+
new InequationNode([exp(nodeFMinusGSimplified), (1).toTree()], ineqType).toTex(),
|
|
205
|
+
],
|
|
206
|
+
[
|
|
207
|
+
"",
|
|
208
|
+
`\\Leftrightarrow`,
|
|
209
|
+
new InequationNode([nodeFMinusGSimplified, (0).toTree()], ineqType).toTex(),
|
|
210
|
+
],
|
|
211
|
+
])}
|
|
212
|
+
|
|
213
|
+
On résout l'inéquation :
|
|
214
|
+
|
|
215
|
+
$$
|
|
216
|
+
${getAnswer(identifiers, opts)}
|
|
217
|
+
$$
|
|
218
|
+
|
|
219
|
+
`;
|
|
220
|
+
};
|
|
221
|
+
const getPropositions = (n, { answer, ...identifiers }, optsIn) => {
|
|
222
|
+
const opts = optsIn ?? optsDefault;
|
|
223
|
+
const propositions = [];
|
|
224
|
+
addValidProp(propositions, answer);
|
|
225
|
+
const { coeffsF, coeffsG, ineqType } = identifiers;
|
|
226
|
+
//random coeff signs for f and g
|
|
227
|
+
{
|
|
228
|
+
function getArrSign() {
|
|
229
|
+
return getCartesiansProducts([...Array(3).keys()].map(() => [-1, 1])).filter((arrS) => !arrS.every((s) => s === 1));
|
|
230
|
+
}
|
|
231
|
+
getCartesiansProducts([getArrSign(), getArrSign()]).forEach(([arrSignF, arrSignG]) => {
|
|
232
|
+
try {
|
|
233
|
+
const coeffsFWrong = zip(arrSignF, coeffsF).map(([s, k]) => s * k);
|
|
234
|
+
const coeffsGWrong = zip(arrSignG, coeffsG).map(([s, k]) => s * k);
|
|
235
|
+
const identifiersWrong = {
|
|
236
|
+
coeffsF: coeffsFWrong,
|
|
237
|
+
coeffsG: coeffsGWrong,
|
|
238
|
+
ineqType,
|
|
239
|
+
};
|
|
240
|
+
const texWrong = getAnswer(identifiersWrong, opts);
|
|
241
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
242
|
+
}
|
|
243
|
+
catch (_) {
|
|
244
|
+
(() => { })();
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
//random ineqType
|
|
249
|
+
{
|
|
250
|
+
["<", ">", "\\le", "\\ge"].forEach((inequalitySymbol) => {
|
|
251
|
+
try {
|
|
252
|
+
const identifiersWrong = {
|
|
253
|
+
coeffsF,
|
|
254
|
+
coeffsG,
|
|
255
|
+
ineqType: inequalitySymbol,
|
|
256
|
+
};
|
|
257
|
+
const texWrong = getAnswer(identifiersWrong, opts);
|
|
258
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
259
|
+
}
|
|
260
|
+
catch (_) {
|
|
261
|
+
(() => { })();
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
266
|
+
propWhile(propositions, n, () => {
|
|
267
|
+
const wrongRes = randint(-10, 11).toTree();
|
|
268
|
+
const wrongSymb = coinFlip()
|
|
269
|
+
? ineqType
|
|
270
|
+
: InequationSymbolConstructor.reverse(ineqType);
|
|
271
|
+
const wrongIneq = new InequationNode(["x".toTree(), wrongRes], wrongSymb);
|
|
272
|
+
tryToAddWrongProp(propositions, isInterval
|
|
273
|
+
? new InequationSolutionNode(wrongIneq.toInterval()).toTex()
|
|
274
|
+
: wrongIneq.toTex());
|
|
275
|
+
});
|
|
276
|
+
return shuffleProps(propositions, n);
|
|
277
|
+
};
|
|
278
|
+
const getKeys = (_identifiers, opts) => {
|
|
279
|
+
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
280
|
+
if (isInterval)
|
|
281
|
+
return [
|
|
282
|
+
"S",
|
|
283
|
+
"equal",
|
|
284
|
+
"lbracket",
|
|
285
|
+
"semicolon",
|
|
286
|
+
"rbracket",
|
|
287
|
+
"infty",
|
|
288
|
+
"varnothing",
|
|
289
|
+
];
|
|
290
|
+
return [
|
|
291
|
+
"x",
|
|
292
|
+
"inf",
|
|
293
|
+
"sup",
|
|
294
|
+
"leq",
|
|
295
|
+
"geq",
|
|
296
|
+
"belongs",
|
|
297
|
+
"varnothing",
|
|
298
|
+
"lbracket",
|
|
299
|
+
"semicolon",
|
|
300
|
+
"rbracket",
|
|
301
|
+
"infty",
|
|
302
|
+
];
|
|
303
|
+
};
|
|
304
|
+
const isAnswerValid = (ans, { answer, ...identifiers }, opts) => {
|
|
305
|
+
if (ans === answer) {
|
|
306
|
+
return true;
|
|
307
|
+
}
|
|
308
|
+
const { coeffsF, coeffsG } = identifiers;
|
|
309
|
+
const [a, _b, _c] = zip(coeffsF, coeffsG)
|
|
310
|
+
.map(([kF, kG]) => kF - kG)
|
|
311
|
+
.toReversed();
|
|
312
|
+
if (a !== 0) {
|
|
313
|
+
try {
|
|
314
|
+
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
315
|
+
if (isInterval) {
|
|
316
|
+
const parsed = unionIntervalParser(ans.replaceAll("S", "").replaceAll("=", ""));
|
|
317
|
+
if (!parsed)
|
|
318
|
+
return false;
|
|
319
|
+
return "S=\\ " + parsed.simplify().toTex() === answer;
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
const parsed = inequationParser(ans);
|
|
323
|
+
if (!parsed)
|
|
324
|
+
return false;
|
|
325
|
+
return parsed.simplify({ decimalToFractions: true }).toTex() === answer;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
catch (err) {
|
|
329
|
+
return handleVEAError(err);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
try {
|
|
334
|
+
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
335
|
+
if (isInterval) {
|
|
336
|
+
const parsed = intervalParser(ans.replaceAll("S", "").replaceAll("=", ""));
|
|
337
|
+
if (!parsed)
|
|
338
|
+
return false;
|
|
339
|
+
return ("S=\\ " + parsed.simplify({ decimalToFractions: true }).toTex() ===
|
|
340
|
+
answer);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
const parsed = inequationParser(ans);
|
|
344
|
+
if (!parsed)
|
|
345
|
+
return false;
|
|
346
|
+
return parsed.simplify({ decimalToFractions: true }).toTex() === answer;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
catch (err) {
|
|
350
|
+
return handleVEAError(err);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
const getExpOfFEqualsExpOfGInequationQuestion = (optsIn) => {
|
|
355
|
+
const opts = optsIn ?? optsDefault;
|
|
356
|
+
const { functionTypeF, functionTypeG } = opts;
|
|
357
|
+
function degreeForFunctionType(functionType) {
|
|
358
|
+
switch (functionType) {
|
|
359
|
+
case "constante":
|
|
360
|
+
return 0;
|
|
361
|
+
case "degré $1$":
|
|
362
|
+
return 1;
|
|
363
|
+
case "degré $2$":
|
|
364
|
+
return 2;
|
|
365
|
+
default:
|
|
366
|
+
throw new Error("Unsupported functionType: " + functionType);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
const [degreeF, degreeG] = [functionTypeF, functionTypeG].map(degreeForFunctionType);
|
|
370
|
+
function createCoeffs(degree) {
|
|
371
|
+
const c = randint(-10, 11, [0]);
|
|
372
|
+
const b = degree >= 1 ? randint(-10, 11, [0]) : 0;
|
|
373
|
+
const a = degree >= 2 ? randint(-10, 11, [0]) : 0;
|
|
374
|
+
return [c, b, a];
|
|
375
|
+
}
|
|
376
|
+
const [coeffsF, coeffsG] = [degreeF, degreeG].map(createCoeffs);
|
|
377
|
+
const ineqType = InequationSymbolConstructor.randomSymbol();
|
|
378
|
+
const identifiers = { coeffsF, coeffsG, ineqType };
|
|
379
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
380
|
+
};
|
|
381
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
382
|
+
const question = {
|
|
383
|
+
instruction: getInstruction(identifiers, opts),
|
|
384
|
+
hint: getHint(identifiers, opts),
|
|
385
|
+
correction: getCorrection(identifiers, opts),
|
|
386
|
+
startStatement: getStartStatement(identifiers, opts),
|
|
387
|
+
answer: getAnswer(identifiers, opts),
|
|
388
|
+
keys: getKeys(identifiers, opts),
|
|
389
|
+
answerFormat: "tex",
|
|
390
|
+
identifiers,
|
|
391
|
+
};
|
|
392
|
+
return question;
|
|
393
|
+
};
|
|
394
|
+
const optsDefault = {
|
|
395
|
+
inequationSolutionFormat: inequationSolutionFormat.defaultValue,
|
|
396
|
+
functionTypeF: "degré $1$",
|
|
397
|
+
functionTypeG: "degré $1$",
|
|
398
|
+
};
|
|
399
|
+
const options = [
|
|
400
|
+
inequationSolutionFormat,
|
|
401
|
+
{
|
|
402
|
+
id: "functionTypeF",
|
|
403
|
+
label: "Fonction $f$ :",
|
|
404
|
+
target: GeneratorOptionTarget.generation,
|
|
405
|
+
type: GeneratorOptionType.select,
|
|
406
|
+
values: ["constante", "degré $1$", "degré $2$"],
|
|
407
|
+
defaultValue: optsDefault.functionTypeF,
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: "functionTypeG",
|
|
411
|
+
label: "Fonction $g$ :",
|
|
412
|
+
target: GeneratorOptionTarget.generation,
|
|
413
|
+
type: GeneratorOptionType.select,
|
|
414
|
+
values: ["constante", "degré $1$", "degré $2$"],
|
|
415
|
+
defaultValue: optsDefault.functionTypeG,
|
|
416
|
+
},
|
|
417
|
+
];
|
|
418
|
+
export const expOfFEqualsExpOfGInequation = {
|
|
419
|
+
id: "expOfFEqualsExpOfGInequation",
|
|
420
|
+
connector: "\\iff",
|
|
421
|
+
label: "Résoudre une inéquation du type $e^{f(x)}<e^{g(x)}$",
|
|
422
|
+
isSingleStep: true,
|
|
423
|
+
generator: (nb, opts) => getDistinctQuestions(() => getExpOfFEqualsExpOfGInequationQuestion(opts), nb),
|
|
424
|
+
qcmTimer: 60,
|
|
425
|
+
freeTimer: 60,
|
|
426
|
+
getPropositions,
|
|
427
|
+
isAnswerValid,
|
|
428
|
+
subject: "Mathématiques",
|
|
429
|
+
hasHintAndCorrection: true,
|
|
430
|
+
getAnswer,
|
|
431
|
+
getInstruction,
|
|
432
|
+
getCorrection,
|
|
433
|
+
getHint,
|
|
434
|
+
getStartStatement,
|
|
435
|
+
getQuestionFromIdentifiers,
|
|
436
|
+
options,
|
|
437
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/calculLitteral/inequations/exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./expOfFEqualsExpOfGInequation.js";
|
|
@@ -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,
|
|
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;AAkHF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -8,6 +8,32 @@ import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
|
8
8
|
import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
9
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
10
10
|
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
11
|
+
const getHint = () => {
|
|
12
|
+
return `Utilise la formule de dérivation suivante :
|
|
13
|
+
|
|
14
|
+
$$
|
|
15
|
+
\\left(e^{u}\\right)' = u' \\times e^{u}
|
|
16
|
+
$$`;
|
|
17
|
+
};
|
|
18
|
+
const getCorrection = (identifiers) => {
|
|
19
|
+
const { a, b } = identifiers;
|
|
20
|
+
const affine = new Polynomial([b, a]);
|
|
21
|
+
return `On utilise la formule de dérivation suivante :
|
|
22
|
+
|
|
23
|
+
$$
|
|
24
|
+
\\left(e^{u}\\right)' = u' \\times e^{u}
|
|
25
|
+
$$
|
|
26
|
+
|
|
27
|
+
Ici, $u(x) = ${affine.toTree().toTex()}$.
|
|
28
|
+
|
|
29
|
+
Donc $u'(x) = ${a}$.
|
|
30
|
+
|
|
31
|
+
Ainsi,
|
|
32
|
+
|
|
33
|
+
$$
|
|
34
|
+
f'(x) = ${getAnswer(identifiers)}
|
|
35
|
+
$$`;
|
|
36
|
+
};
|
|
11
37
|
const getInstruction = (identifiers) => {
|
|
12
38
|
const { a, b } = identifiers;
|
|
13
39
|
const affine = new Polynomial([b, a]);
|
|
@@ -40,6 +66,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
40
66
|
keys: ["x", "epower", "exp"],
|
|
41
67
|
answerFormat: "tex",
|
|
42
68
|
identifiers,
|
|
69
|
+
hint: getHint(identifiers),
|
|
70
|
+
correction: getCorrection(identifiers),
|
|
43
71
|
};
|
|
44
72
|
return question;
|
|
45
73
|
};
|
|
@@ -87,4 +115,5 @@ export const expDerivativeOne = {
|
|
|
87
115
|
getAnswer,
|
|
88
116
|
getInstruction,
|
|
89
117
|
getQuestionFromIdentifiers,
|
|
118
|
+
hasHintAndCorrection: true,
|
|
90
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoIF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -2,12 +2,42 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../e
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Polynomial } from "../../../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
|
-
import { ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
5
|
+
import { exp, ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
6
6
|
import { NumberNode } from "../../../../../tree/nodes/numbers/numberNode.js";
|
|
7
|
-
import {
|
|
7
|
+
import { add } from "../../../../../tree/nodes/operators/addNode.js";
|
|
8
|
+
import { multiply, MultiplyNode, } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
9
|
import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
|
|
9
10
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
10
11
|
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
13
|
+
const getHint = () => {
|
|
14
|
+
return `La fonction proposée est un produit. On peut donc utiliser la formule de dérivation :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
(uv)' = u'v+uv'
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
const { a, b } = identifiers;
|
|
22
|
+
const affine = new Polynomial([b, a]).toTree();
|
|
23
|
+
const expo = exp("x");
|
|
24
|
+
return `$f(x)$ est de la forme $u(x)\\times v(x)$, avec $u(x) = ${affine.toTex()}$, et $v(x) = ${expo.toTex()}$.
|
|
25
|
+
|
|
26
|
+
On a donc $u'(x) = ${a}$, et $v'(x) = ${expo.toTex()}$.
|
|
27
|
+
|
|
28
|
+
On utilise alors la formule de dérivation d'un produit :
|
|
29
|
+
|
|
30
|
+
$$
|
|
31
|
+
(uv)' = u'v+uv'
|
|
32
|
+
$$
|
|
33
|
+
|
|
34
|
+
Cela donne :
|
|
35
|
+
|
|
36
|
+
${alignTex([
|
|
37
|
+
["f'(x)", "=", add(multiply(a, expo), multiply(affine, expo)).toTex()],
|
|
38
|
+
["", "=", getAnswer(identifiers)],
|
|
39
|
+
])}`;
|
|
40
|
+
};
|
|
11
41
|
const getInstruction = (identifiers) => {
|
|
12
42
|
const { a, b } = identifiers;
|
|
13
43
|
const myfunction = new MultiplyNode(new Polynomial([b, a]).toTree(), new ExpNode(new VariableNode("x")));
|
|
@@ -33,6 +63,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
33
63
|
keys: ["x", "epower", "exp"],
|
|
34
64
|
answerFormat: "tex",
|
|
35
65
|
identifiers,
|
|
66
|
+
hint: getHint(identifiers),
|
|
67
|
+
correction: getCorrection(identifiers),
|
|
36
68
|
};
|
|
37
69
|
return question;
|
|
38
70
|
};
|
|
@@ -83,4 +115,5 @@ export const expDerivativeThree = {
|
|
|
83
115
|
getInstruction,
|
|
84
116
|
getAnswer,
|
|
85
117
|
getQuestionFromIdentifiers,
|
|
118
|
+
hasHintAndCorrection: true,
|
|
86
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expDerivativeTwo.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;AAqGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -8,6 +8,22 @@ import { MultiplyNode } from "../../../../../tree/nodes/operators/multiplyNode.j
|
|
|
8
8
|
import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
|
|
9
9
|
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
10
10
|
import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
|
|
11
|
+
const getHint = () => {
|
|
12
|
+
return `La fonction exponentielle est égale à sa dérivée.`;
|
|
13
|
+
};
|
|
14
|
+
const getCorrection = (identifiers) => {
|
|
15
|
+
return `On sait que la fonction exponentielle est égale à sa dérivée, c'est à dire :
|
|
16
|
+
|
|
17
|
+
$$
|
|
18
|
+
\\left(e^x\\right)' = e^x
|
|
19
|
+
$$
|
|
20
|
+
|
|
21
|
+
On a donc :
|
|
22
|
+
|
|
23
|
+
$$
|
|
24
|
+
f'(x) = ${getAnswer(identifiers)}
|
|
25
|
+
$$`;
|
|
26
|
+
};
|
|
11
27
|
const getInstruction = (identifiers) => {
|
|
12
28
|
const { a, b } = identifiers;
|
|
13
29
|
const myfunction = new AddNode(new MultiplyNode(new NumberNode(a), new ExpNode(new VariableNode("x"))), new NumberNode(b));
|
|
@@ -37,6 +53,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
37
53
|
keys: ["x", "epower", "exp"],
|
|
38
54
|
answerFormat: "tex",
|
|
39
55
|
identifiers,
|
|
56
|
+
hint: getHint(identifiers),
|
|
57
|
+
correction: getCorrection(identifiers),
|
|
40
58
|
};
|
|
41
59
|
return question;
|
|
42
60
|
};
|
|
@@ -77,4 +95,5 @@ export const expDerivativeTwo = {
|
|
|
77
95
|
getAnswer,
|
|
78
96
|
getInstruction,
|
|
79
97
|
getQuestionFromIdentifiers,
|
|
98
|
+
hasHintAndCorrection: true,
|
|
80
99
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
c: number;
|
|
6
|
+
d: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const expOverExpDerivative: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=expOverExpDerivative.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expOverExpDerivative.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/expOverExpDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAqCrC,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;AAmUF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
|