math-exercises 3.0.157 → 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/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 +445 -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 +371 -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/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 +18 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +444 -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/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 +64 -15
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +71 -15
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +36 -17
- 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 +294 -0
- 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/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/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 +13 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +305 -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 +216 -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 +223 -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 +262 -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 +245 -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 +366 -0
- 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/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/equation/secondDegreeInequation.js +3 -0
- 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 +96 -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 +190 -0
- 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/pinPointFromAxialOrCentralSymmetry.js +2 -2
- 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/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/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/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/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/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/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/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/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/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/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/sequences/sequenceEvaluation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequenceEvaluation.js +22 -2
- 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/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/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 +186 -27
- 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/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/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/playground.d.ts.map +1 -1
- package/lib/playground.js +3 -1
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +2 -2
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- 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/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/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/operators/multiplyNode.js +1 -1
- 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
|
@@ -26,22 +26,51 @@ const getAnswer = (identifiers) => {
|
|
|
26
26
|
const answer = derivative.toTex();
|
|
27
27
|
return answer;
|
|
28
28
|
};
|
|
29
|
-
const
|
|
30
|
-
const a
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
const getHint = (identifiers) => {
|
|
30
|
+
const { a, b } = identifiers;
|
|
31
|
+
const affine = new Polynomial([b, a]);
|
|
32
|
+
return `Si $v$ est une fonction dérivable alors :
|
|
33
|
+
|
|
34
|
+
$$
|
|
35
|
+
(e^{v(x)})'(x) = v'(x) \\times e^{v(x)}
|
|
36
|
+
$$
|
|
37
|
+
|
|
38
|
+
Ici, on a :
|
|
39
|
+
|
|
40
|
+
$$
|
|
41
|
+
v(x) = ${affine.toTex()}
|
|
42
|
+
$$
|
|
43
|
+
|
|
44
|
+
`;
|
|
34
45
|
};
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
const getCorrection = (identifiers) => {
|
|
47
|
+
const { a, b } = identifiers;
|
|
48
|
+
const affine = new Polynomial([b, a]);
|
|
49
|
+
const texAffine = affine.toTex();
|
|
50
|
+
const texDeriv = affine.toTree().derivative().simplify().toTex();
|
|
51
|
+
return `Si $v$ est une fonction dérivable alors :
|
|
52
|
+
|
|
53
|
+
$$
|
|
54
|
+
(e^{(v(x)})'(x) = v'(x) \\times e^{v(x)}
|
|
55
|
+
$$
|
|
56
|
+
|
|
57
|
+
Ici, on a :
|
|
58
|
+
|
|
59
|
+
$$
|
|
60
|
+
v(x) = ${texAffine}
|
|
61
|
+
$$
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
v'(x) = ${texDeriv}
|
|
65
|
+
$$
|
|
66
|
+
|
|
67
|
+
Donc :
|
|
68
|
+
|
|
69
|
+
$$
|
|
70
|
+
(e^{${texAffine}})'(x) = ${texDeriv} e^{${texAffine}}
|
|
71
|
+
$$
|
|
72
|
+
|
|
73
|
+
`;
|
|
45
74
|
};
|
|
46
75
|
const getPropositions = (n, { answer, a, b }) => {
|
|
47
76
|
const propositions = [];
|
|
@@ -73,6 +102,25 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
73
102
|
return handleVEAError(err);
|
|
74
103
|
}
|
|
75
104
|
};
|
|
105
|
+
const getExpDerivative = () => {
|
|
106
|
+
const a = randint(-9, 10, [0]);
|
|
107
|
+
const b = randint(-9, 10);
|
|
108
|
+
const identifiers = { a, b };
|
|
109
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
110
|
+
};
|
|
111
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
112
|
+
const question = {
|
|
113
|
+
instruction: getInstruction(identifiers),
|
|
114
|
+
startStatement: "f'(x)",
|
|
115
|
+
answer: getAnswer(identifiers),
|
|
116
|
+
keys: ["x", "epower", "exp"],
|
|
117
|
+
answerFormat: "tex",
|
|
118
|
+
identifiers,
|
|
119
|
+
hint: getHint(identifiers),
|
|
120
|
+
correction: getCorrection(identifiers),
|
|
121
|
+
};
|
|
122
|
+
return question;
|
|
123
|
+
};
|
|
76
124
|
export const expDerivativeOne = {
|
|
77
125
|
id: "expDerivativeOne",
|
|
78
126
|
connector: "=",
|
|
@@ -87,4 +135,5 @@ export const expDerivativeOne = {
|
|
|
87
135
|
getAnswer,
|
|
88
136
|
getInstruction,
|
|
89
137
|
getQuestionFromIdentifiers,
|
|
138
|
+
hasHintAndCorrection: true,
|
|
90
139
|
};
|
|
@@ -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;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgKF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -25,22 +25,58 @@ const getAnswerNode = (identifiers) => {
|
|
|
25
25
|
const getAnswer = (identifiers) => {
|
|
26
26
|
return getAnswerNode(identifiers).simplify().toTex();
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
return question;
|
|
28
|
+
const getHint = () => {
|
|
29
|
+
return `Si $u$ et $v$ sont deux fonctions dérivables, alors :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
(uv)'(x) = u'(x)v(x) + u(x)v'(x)
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
`;
|
|
38
36
|
};
|
|
39
|
-
const
|
|
40
|
-
const a
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
const getCorrection = (identifiers) => {
|
|
38
|
+
const { a, b } = identifiers;
|
|
39
|
+
const nodeU = new Polynomial([b, a]).toTree();
|
|
40
|
+
return `Si $u$ et $v$ sont deux fonctions dérivables, alors :
|
|
41
|
+
|
|
42
|
+
$$
|
|
43
|
+
(uv)'(x) = u'(x)v(x) + u(x)v'(x)
|
|
44
|
+
$$
|
|
45
|
+
|
|
46
|
+
Ici :
|
|
47
|
+
|
|
48
|
+
$$
|
|
49
|
+
u(x) = ${nodeU.toTex()}
|
|
50
|
+
$$
|
|
51
|
+
|
|
52
|
+
$$
|
|
53
|
+
v(x) = e^x
|
|
54
|
+
$$
|
|
55
|
+
|
|
56
|
+
$$
|
|
57
|
+
u'(x) = ${nodeU.derivative().simplify().toTex()}
|
|
58
|
+
$$
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
v'(x) = e^x
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
On a donc :
|
|
65
|
+
|
|
66
|
+
$$
|
|
67
|
+
f'(x) = ${nodeU
|
|
68
|
+
.derivative()
|
|
69
|
+
.simplify()
|
|
70
|
+
.toTex()} \\times e^x + (${nodeU.toTex()}) \\times e^x
|
|
71
|
+
$$
|
|
72
|
+
|
|
73
|
+
Donc :
|
|
74
|
+
|
|
75
|
+
$$
|
|
76
|
+
f'(x) = ${getAnswer(identifiers)}
|
|
77
|
+
$$
|
|
78
|
+
|
|
79
|
+
`;
|
|
44
80
|
};
|
|
45
81
|
const getPropositions = (n, { answer, a, b }) => {
|
|
46
82
|
const propositions = [];
|
|
@@ -69,6 +105,25 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
|
69
105
|
return handleVEAError(err);
|
|
70
106
|
}
|
|
71
107
|
};
|
|
108
|
+
const getExpDerivativeThree = () => {
|
|
109
|
+
const a = randint(-9, 10, [0]);
|
|
110
|
+
const b = randint(-9, 10);
|
|
111
|
+
const identifiers = { a, b };
|
|
112
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
113
|
+
};
|
|
114
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
115
|
+
const question = {
|
|
116
|
+
instruction: getInstruction(identifiers),
|
|
117
|
+
startStatement: "f'(x)",
|
|
118
|
+
answer: getAnswer(identifiers),
|
|
119
|
+
keys: ["x", "epower", "exp"],
|
|
120
|
+
answerFormat: "tex",
|
|
121
|
+
identifiers,
|
|
122
|
+
hint: getHint(identifiers),
|
|
123
|
+
correction: getCorrection(identifiers),
|
|
124
|
+
};
|
|
125
|
+
return question;
|
|
126
|
+
};
|
|
72
127
|
export const expDerivativeThree = {
|
|
73
128
|
id: "expDerivativeThree",
|
|
74
129
|
connector: "=",
|
|
@@ -83,4 +138,5 @@ export const expDerivativeThree = {
|
|
|
83
138
|
getInstruction,
|
|
84
139
|
getAnswer,
|
|
85
140
|
getQuestionFromIdentifiers,
|
|
141
|
+
hasHintAndCorrection: true,
|
|
86
142
|
};
|
|
@@ -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;AAsGF,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));
|
|
@@ -23,23 +39,6 @@ const getAnswer = (identifiers) => {
|
|
|
23
39
|
const answer = derivative.toTex();
|
|
24
40
|
return answer;
|
|
25
41
|
};
|
|
26
|
-
const getExpDerivative = () => {
|
|
27
|
-
const a = randint(-9, 10, [0]);
|
|
28
|
-
const b = randint(-9, 10);
|
|
29
|
-
const identifiers = { a, b };
|
|
30
|
-
return getQuestionFromIdentifiers(identifiers);
|
|
31
|
-
};
|
|
32
|
-
const getQuestionFromIdentifiers = (identifiers) => {
|
|
33
|
-
const question = {
|
|
34
|
-
instruction: getInstruction(identifiers),
|
|
35
|
-
startStatement: "f'(x)",
|
|
36
|
-
answer: getAnswer(identifiers),
|
|
37
|
-
keys: ["x", "epower", "exp"],
|
|
38
|
-
answerFormat: "tex",
|
|
39
|
-
identifiers,
|
|
40
|
-
};
|
|
41
|
-
return question;
|
|
42
|
-
};
|
|
43
42
|
const getPropositions = (n, { answer, a, b }) => {
|
|
44
43
|
const propositions = [];
|
|
45
44
|
addValidProp(propositions, answer);
|
|
@@ -63,6 +62,25 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
63
62
|
return handleVEAError(err);
|
|
64
63
|
}
|
|
65
64
|
};
|
|
65
|
+
const getExpDerivative = () => {
|
|
66
|
+
const a = randint(-9, 10, [0]);
|
|
67
|
+
const b = randint(-9, 10);
|
|
68
|
+
const identifiers = { a, b };
|
|
69
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
70
|
+
};
|
|
71
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
72
|
+
const question = {
|
|
73
|
+
instruction: getInstruction(identifiers),
|
|
74
|
+
startStatement: "f'(x)",
|
|
75
|
+
answer: getAnswer(identifiers),
|
|
76
|
+
keys: ["x", "epower", "exp"],
|
|
77
|
+
answerFormat: "tex",
|
|
78
|
+
identifiers,
|
|
79
|
+
hint: getHint(identifiers),
|
|
80
|
+
correction: getCorrection(identifiers),
|
|
81
|
+
};
|
|
82
|
+
return question;
|
|
83
|
+
};
|
|
66
84
|
export const expDerivativeTwo = {
|
|
67
85
|
id: "expDerivativeTwo",
|
|
68
86
|
connector: "=",
|
|
@@ -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;AAmVF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
4
|
+
import { exp, ExpNode } from "../../../../../tree/nodes/functions/expNode.js";
|
|
5
|
+
import { add, AddNode } from "../../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { frac, FractionNode, isFractionNode, } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { multiply, MultiplyNode, } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { power } from "../../../../../tree/nodes/operators/powerNode.js";
|
|
9
|
+
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
|
|
11
|
+
const getInstructionNode = (identifiers) => {
|
|
12
|
+
const { a, b, c, d } = identifiers;
|
|
13
|
+
const nodeNum = add(multiply(a, exp("x".toTree())), b);
|
|
14
|
+
const nodeDen = add(multiply(c, exp("x".toTree())), d);
|
|
15
|
+
return frac(nodeNum, nodeDen);
|
|
16
|
+
};
|
|
17
|
+
const getPrettyFractionNode = (nodeFraction) => {
|
|
18
|
+
const nodeNum = nodeFraction.leftChild.simplify({ towardsDistribute: true });
|
|
19
|
+
const nodeDen = nodeFraction.rightChild;
|
|
20
|
+
return frac(nodeNum, nodeDen);
|
|
21
|
+
};
|
|
22
|
+
const getInstruction = (identifiers) => {
|
|
23
|
+
const nodeF = getInstructionNode(identifiers);
|
|
24
|
+
return `Déterminer la dérivée de la fonction $f$ définie par :
|
|
25
|
+
|
|
26
|
+
$$
|
|
27
|
+
f(x) = ${nodeF.toTex()}
|
|
28
|
+
$$`;
|
|
29
|
+
};
|
|
30
|
+
const getAnswerNode = (identifiers) => {
|
|
31
|
+
const nodeRaw = getInstructionNode(identifiers).derivative();
|
|
32
|
+
if (isFractionNode(nodeRaw)) {
|
|
33
|
+
const nodeFraction = nodeRaw;
|
|
34
|
+
return getPrettyFractionNode(nodeFraction);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return nodeRaw;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const getAnswer = (identifiers) => {
|
|
41
|
+
return getAnswerNode(identifiers).toTex();
|
|
42
|
+
};
|
|
43
|
+
const getHint = () => {
|
|
44
|
+
return `Si $u$ et $v$ sont deux fonctions dérivables alors, pour $x$ tel que $v(x)\\neq0$, on a :
|
|
45
|
+
|
|
46
|
+
$$
|
|
47
|
+
(\\frac{u}{v})'(x) = \\frac{u'(x)v(x)-u(x)v'(x)}{{v(x)}^2}
|
|
48
|
+
$$
|
|
49
|
+
|
|
50
|
+
`;
|
|
51
|
+
};
|
|
52
|
+
const getCorrection = (identifiers) => {
|
|
53
|
+
const nodeInstruction = getInstructionNode(identifiers);
|
|
54
|
+
const [nodeU, nodeV] = [
|
|
55
|
+
nodeInstruction.leftChild,
|
|
56
|
+
nodeInstruction.rightChild,
|
|
57
|
+
];
|
|
58
|
+
const [nodeUPrime, nodeVPrime] = [nodeU, nodeV].map((node) => node.derivative().simplify());
|
|
59
|
+
return `On doit calculer la dérivée d'un quotient.
|
|
60
|
+
|
|
61
|
+
Ici, on a :
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
u(x) = ${nodeU.toTex()}
|
|
65
|
+
$$
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
v(x) = ${nodeV.toTex()}
|
|
69
|
+
$$
|
|
70
|
+
|
|
71
|
+
On calcule :
|
|
72
|
+
|
|
73
|
+
$$
|
|
74
|
+
u'(x) = ${nodeUPrime.toTex()}
|
|
75
|
+
$$
|
|
76
|
+
|
|
77
|
+
$$
|
|
78
|
+
v'(x) = ${nodeVPrime.toTex()}
|
|
79
|
+
$$
|
|
80
|
+
|
|
81
|
+
Donc :
|
|
82
|
+
|
|
83
|
+
$$
|
|
84
|
+
(\\frac{u}{v})'(x) = ${frac(substract(multiply(nodeUPrime, nodeV), multiply(nodeU, nodeVPrime)), power(nodeV, 2)).toTex()}
|
|
85
|
+
$$
|
|
86
|
+
|
|
87
|
+
$$
|
|
88
|
+
(\\frac{u}{v})'(x) = ${frac(substract(multiply(nodeUPrime, nodeV).simplify({ towardsDistribute: true }), multiply(nodeU, nodeVPrime).simplify({ towardsDistribute: true })), power(nodeV, 2)).toTex()}
|
|
89
|
+
$$
|
|
90
|
+
|
|
91
|
+
$$
|
|
92
|
+
f'(x) = ${getAnswer(identifiers)}
|
|
93
|
+
$$
|
|
94
|
+
|
|
95
|
+
`;
|
|
96
|
+
};
|
|
97
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
98
|
+
const propositions = [];
|
|
99
|
+
addValidProp(propositions, answer);
|
|
100
|
+
const { a, b, c, d } = identifiers;
|
|
101
|
+
//student: (u/v)' = u'/v'
|
|
102
|
+
{
|
|
103
|
+
tryToAddWrongProp(propositions, frac(a, c).simplify({ decimalToFractions: true }).toTex());
|
|
104
|
+
}
|
|
105
|
+
//student: (u/v)' = (u'v+uv')/v²
|
|
106
|
+
{
|
|
107
|
+
class WrongFractionNode extends FractionNode {
|
|
108
|
+
derivative(varName) {
|
|
109
|
+
const numNode = add(multiply(this.leftChild.derivative(varName), this.rightChild), multiply(this.leftChild, this.rightChild.derivative(varName)));
|
|
110
|
+
const denNode = power(this.rightChild, 2);
|
|
111
|
+
return frac(numNode, denNode);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const wrongInstructionNode = (() => {
|
|
115
|
+
const nodeNum = add(multiply(a, exp("x".toTree())), b);
|
|
116
|
+
const nodeDen = add(multiply(c, exp("x".toTree())), d);
|
|
117
|
+
return new WrongFractionNode(nodeNum, nodeDen);
|
|
118
|
+
})();
|
|
119
|
+
const nodeRaw = wrongInstructionNode.derivative();
|
|
120
|
+
let nodeWrong;
|
|
121
|
+
if (isFractionNode(nodeRaw)) {
|
|
122
|
+
nodeWrong = getPrettyFractionNode(nodeRaw);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
nodeWrong = nodeRaw;
|
|
126
|
+
}
|
|
127
|
+
tryToAddWrongProp(propositions, nodeWrong.toTex());
|
|
128
|
+
}
|
|
129
|
+
//student: (u/v)' = -u'/v²
|
|
130
|
+
{
|
|
131
|
+
class WrongFractionNode extends FractionNode {
|
|
132
|
+
derivative(varName) {
|
|
133
|
+
const numNode = multiply(-1, this.leftChild).derivative(varName);
|
|
134
|
+
const denNode = power(this.rightChild, 2);
|
|
135
|
+
return frac(numNode, denNode);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const wrongInstructionNode = (() => {
|
|
139
|
+
const nodeNum = add(multiply(a, exp("x".toTree())), b);
|
|
140
|
+
const nodeDen = add(multiply(c, exp("x".toTree())), d);
|
|
141
|
+
return new WrongFractionNode(nodeNum, nodeDen);
|
|
142
|
+
})();
|
|
143
|
+
const nodeRaw = wrongInstructionNode.derivative();
|
|
144
|
+
let nodeWrong;
|
|
145
|
+
if (isFractionNode(nodeRaw)) {
|
|
146
|
+
nodeWrong = getPrettyFractionNode(nodeRaw);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
nodeWrong = nodeRaw;
|
|
150
|
+
}
|
|
151
|
+
tryToAddWrongProp(propositions, nodeWrong.toTex());
|
|
152
|
+
}
|
|
153
|
+
//student: exp(x)' = x.exp(x)
|
|
154
|
+
{
|
|
155
|
+
class MyAddNode extends AddNode {
|
|
156
|
+
simplify(opts, log) {
|
|
157
|
+
if (this.leftChild.evaluate() === 0 ||
|
|
158
|
+
this.rightChild.evaluate() === 0) {
|
|
159
|
+
return (0).toTree();
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
return super.simplify(opts, log);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
class MyMultiplyNode extends MultiplyNode {
|
|
167
|
+
derivative(varName) {
|
|
168
|
+
return new MyAddNode(new MyMultiplyNode(this.leftChild.derivative(varName).simplify(), this.rightChild), new MyMultiplyNode(this.leftChild, this.rightChild.derivative(varName).simplify())).simplify();
|
|
169
|
+
}
|
|
170
|
+
simplify(opts, log) {
|
|
171
|
+
if (this.leftChild.evaluate() === 0 ||
|
|
172
|
+
this.rightChild.evaluate() === 0) {
|
|
173
|
+
return (0).toTree();
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return super.simplify(opts, log);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
class WrongExpNode extends ExpNode {
|
|
181
|
+
derivative(varName = "x") {
|
|
182
|
+
const derivateSuper = new MyMultiplyNode(this.child.derivative(varName), exp(this.child));
|
|
183
|
+
return new MyMultiplyNode(varName.toTree(), derivateSuper);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const wrongInstructionNode = (() => {
|
|
187
|
+
const nodeNum = add(new MyMultiplyNode(a.toTree(), new WrongExpNode("x".toTree())), b);
|
|
188
|
+
const nodeDen = add(new MyMultiplyNode(c.toTree(), new WrongExpNode("x".toTree())), d);
|
|
189
|
+
return frac(nodeNum, nodeDen);
|
|
190
|
+
})();
|
|
191
|
+
const nodeRaw = wrongInstructionNode.derivative();
|
|
192
|
+
let nodeWrong;
|
|
193
|
+
if (isFractionNode(nodeRaw)) {
|
|
194
|
+
const nodeFraction = nodeRaw;
|
|
195
|
+
const nodeNum = nodeFraction.leftChild.simplify({});
|
|
196
|
+
const nodeDen = nodeFraction.rightChild;
|
|
197
|
+
nodeWrong = frac(nodeNum, nodeDen);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
nodeWrong = nodeRaw;
|
|
201
|
+
}
|
|
202
|
+
tryToAddWrongProp(propositions, nodeWrong.toTex());
|
|
203
|
+
}
|
|
204
|
+
return shuffleProps(propositions, n);
|
|
205
|
+
};
|
|
206
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
207
|
+
const nodeAns = parseAlgebraic(ans);
|
|
208
|
+
const nodeAnswer = parseAlgebraic(answer);
|
|
209
|
+
return [0, 1, 2, 10].every((x) => {
|
|
210
|
+
return (substract(nodeAns.evaluate({ x }), nodeAnswer.evaluate({ x })).evaluate() === 0);
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
const getExpOverExpDerivativeQuestion = () => {
|
|
214
|
+
function createRandomIdentifiers() {
|
|
215
|
+
const a = randint(-9, 10, [0]);
|
|
216
|
+
const b = randint(-9, 10, [0]);
|
|
217
|
+
const c = randint(-9, 10, [0]);
|
|
218
|
+
const d = randint(-9, 10, [c, -c, 0]);
|
|
219
|
+
const identifiers = { a, b, c, d };
|
|
220
|
+
return identifiers;
|
|
221
|
+
}
|
|
222
|
+
function isValidIdentifiers(identifiersCandidate) {
|
|
223
|
+
const { a, b, c, d } = identifiersCandidate;
|
|
224
|
+
const isInstructionNodeNotReductible = () => {
|
|
225
|
+
return a * d - b * c !== 0;
|
|
226
|
+
};
|
|
227
|
+
const isAnswerNodeNonZeroFraction = () => {
|
|
228
|
+
let isValid = false;
|
|
229
|
+
try {
|
|
230
|
+
const nodeAnswer = getAnswerNode(identifiersCandidate);
|
|
231
|
+
if (nodeAnswer && isFractionNode(nodeAnswer)) {
|
|
232
|
+
const nodeFraction = nodeAnswer;
|
|
233
|
+
const isZero = nodeFraction.leftChild.evaluate() === 0;
|
|
234
|
+
isValid = !isZero;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
catch (_) {
|
|
238
|
+
(() => { })();
|
|
239
|
+
}
|
|
240
|
+
return isValid;
|
|
241
|
+
};
|
|
242
|
+
return isInstructionNodeNotReductible() && isAnswerNodeNonZeroFraction();
|
|
243
|
+
}
|
|
244
|
+
let identifiers;
|
|
245
|
+
let counter = -1;
|
|
246
|
+
let isValid = false;
|
|
247
|
+
while (!isValid && counter < 100) {
|
|
248
|
+
counter++;
|
|
249
|
+
const identifiersCandidate = createRandomIdentifiers();
|
|
250
|
+
isValid = isValidIdentifiers(identifiersCandidate);
|
|
251
|
+
if (isValid) {
|
|
252
|
+
identifiers = identifiersCandidate;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (!isValid) {
|
|
256
|
+
const identifiersDefault = {
|
|
257
|
+
a: 1,
|
|
258
|
+
b: 2,
|
|
259
|
+
c: 2,
|
|
260
|
+
d: 3,
|
|
261
|
+
};
|
|
262
|
+
identifiers = identifiersDefault;
|
|
263
|
+
}
|
|
264
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
265
|
+
};
|
|
266
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
267
|
+
const question = {
|
|
268
|
+
instruction: getInstruction(identifiers),
|
|
269
|
+
startStatement: "f'(x)",
|
|
270
|
+
answer: getAnswer(identifiers),
|
|
271
|
+
keys: ["x", "epower"],
|
|
272
|
+
answerFormat: "tex",
|
|
273
|
+
identifiers,
|
|
274
|
+
hint: getHint(identifiers),
|
|
275
|
+
correction: getCorrection(identifiers),
|
|
276
|
+
};
|
|
277
|
+
return question;
|
|
278
|
+
};
|
|
279
|
+
export const expOverExpDerivative = {
|
|
280
|
+
id: "expOverExpDerivative",
|
|
281
|
+
connector: "=",
|
|
282
|
+
label: "Dérivée de $\\frac{a e^x + b}{c e^x + d}$",
|
|
283
|
+
isSingleStep: false,
|
|
284
|
+
generator: (nb) => getDistinctQuestions(getExpOverExpDerivativeQuestion, nb),
|
|
285
|
+
getPropositions,
|
|
286
|
+
qcmTimer: 60,
|
|
287
|
+
freeTimer: 60,
|
|
288
|
+
isAnswerValid,
|
|
289
|
+
subject: "Mathématiques",
|
|
290
|
+
getAnswer,
|
|
291
|
+
getInstruction,
|
|
292
|
+
getQuestionFromIdentifiers,
|
|
293
|
+
hasHintAndCorrection: true,
|
|
294
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/derivation/derivative/exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyFF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|