math-exercises 2.1.15 → 2.1.16

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.
Files changed (142) hide show
  1. package/lib/exercises/exercise.d.ts +1 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  4. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
  5. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
  6. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
  7. package/lib/exercises/math/derivation/derivative/convexityTrinomials.js +1 -1
  8. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +1 -1
  9. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +1 -1
  10. package/lib/exercises/math/functions/affines/affineMeanValue.d.ts +9 -0
  11. package/lib/exercises/math/functions/affines/affineMeanValue.d.ts.map +1 -0
  12. package/lib/exercises/math/functions/affines/affineMeanValue.js +77 -0
  13. package/lib/exercises/math/functions/affines/index.d.ts +1 -0
  14. package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
  15. package/lib/exercises/math/functions/affines/index.js +1 -0
  16. package/lib/exercises/math/functions/index.d.ts +1 -0
  17. package/lib/exercises/math/functions/index.d.ts.map +1 -1
  18. package/lib/exercises/math/functions/index.js +1 -0
  19. package/lib/exercises/math/functions/integral/index.d.ts +10 -0
  20. package/lib/exercises/math/functions/integral/index.d.ts.map +1 -0
  21. package/lib/exercises/math/functions/integral/index.js +25 -0
  22. package/lib/exercises/math/functions/integral/integralAffines.d.ts +9 -0
  23. package/lib/exercises/math/functions/integral/integralAffines.d.ts.map +1 -0
  24. package/lib/exercises/math/functions/integral/integralAffines.js +72 -0
  25. package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts +10 -0
  26. package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts.map +1 -0
  27. package/lib/exercises/math/functions/integral/integralDerivatedUCosU.js +81 -0
  28. package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts +10 -0
  29. package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts.map +1 -0
  30. package/lib/exercises/math/functions/integral/integralDerivatedUSinU.js +86 -0
  31. package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts +10 -0
  32. package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts.map +1 -0
  33. package/lib/exercises/math/functions/integral/integralExpAxPlusB.js +83 -0
  34. package/lib/exercises/math/functions/integral/integralExpU.d.ts +10 -0
  35. package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -0
  36. package/lib/exercises/math/functions/integral/integralExpU.js +95 -0
  37. package/lib/exercises/math/functions/integral/integralFractions.d.ts +10 -0
  38. package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -0
  39. package/lib/exercises/math/functions/integral/integralFractions.js +109 -0
  40. package/lib/exercises/math/functions/integral/integralKCosinus.d.ts +9 -0
  41. package/lib/exercises/math/functions/integral/integralKCosinus.d.ts.map +1 -0
  42. package/lib/exercises/math/functions/integral/integralKCosinus.js +83 -0
  43. package/lib/exercises/math/functions/integral/integralKSinus.d.ts +9 -0
  44. package/lib/exercises/math/functions/integral/integralKSinus.d.ts.map +1 -0
  45. package/lib/exercises/math/functions/integral/integralKSinus.js +83 -0
  46. package/lib/exercises/math/functions/integral/integralTrinomials.d.ts +9 -0
  47. package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -0
  48. package/lib/exercises/math/functions/integral/integralTrinomials.js +78 -0
  49. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +1 -1
  50. package/lib/exercises/math/functions/parity/parityFromGraph.js +1 -1
  51. package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +1 -1
  52. package/lib/exercises/math/functions/trinoms/index.d.ts +1 -0
  53. package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
  54. package/lib/exercises/math/functions/trinoms/index.js +1 -0
  55. package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts +9 -0
  56. package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts.map +1 -0
  57. package/lib/exercises/math/functions/trinoms/trinomialMeanValue.js +77 -0
  58. package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +1 -1
  59. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
  60. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +1 -1
  61. package/lib/exercises/math/geometry/vectors/colinearity.js +1 -1
  62. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +1 -1
  63. package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +1 -1
  64. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +1 -1
  65. package/lib/exercises/math/matrices/matrixGeneralTerm.js +1 -1
  66. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts +13 -0
  67. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -0
  68. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +85 -0
  69. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts +9 -0
  70. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -0
  71. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +77 -0
  72. package/lib/exercises/math/probaStat/independancy.js +1 -1
  73. package/lib/exercises/math/probaStat/index.d.ts +3 -0
  74. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  75. package/lib/exercises/math/probaStat/index.js +3 -0
  76. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
  77. package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts +9 -0
  78. package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -0
  79. package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +74 -0
  80. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +1 -1
  81. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +1 -1
  82. package/lib/exercises/math/sequences/genericSequenceVariations.js +1 -1
  83. package/lib/exercises/math/trigonometry/arcValue.d.ts +9 -0
  84. package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -0
  85. package/lib/exercises/math/trigonometry/arcValue.js +78 -0
  86. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts +7 -0
  87. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -0
  88. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +71 -0
  89. package/lib/exercises/math/trigonometry/index.d.ts +2 -0
  90. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  91. package/lib/exercises/math/trigonometry/index.js +2 -0
  92. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  93. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  94. package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +1 -1
  95. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
  96. package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
  97. package/lib/index.d.ts +70 -0
  98. package/lib/index.d.ts.map +1 -1
  99. package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
  100. package/lib/math/trigonometry/remarkableValue.js +1 -0
  101. package/lib/math/trigonometry/remarkableValues.d.ts +1 -0
  102. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  103. package/lib/math/trigonometry/remarkableValues.js +30 -29
  104. package/lib/math/utils/combinatorics/combination.d.ts +2 -0
  105. package/lib/math/utils/combinatorics/combination.d.ts.map +1 -0
  106. package/lib/math/utils/combinatorics/combination.js +8 -0
  107. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  108. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  109. package/lib/tree/nodes/functions/arcSinNode.d.ts +19 -0
  110. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -0
  111. package/lib/tree/nodes/functions/arcSinNode.js +59 -0
  112. package/lib/tree/nodes/functions/arccosNode.d.ts +19 -0
  113. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -0
  114. package/lib/tree/nodes/functions/arccosNode.js +60 -0
  115. package/lib/tree/nodes/functions/arctanNode.d.ts +19 -0
  116. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -0
  117. package/lib/tree/nodes/functions/arctanNode.js +60 -0
  118. package/lib/tree/nodes/functions/cosNode.d.ts +3 -3
  119. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  120. package/lib/tree/nodes/functions/cosNode.js +14 -15
  121. package/lib/tree/nodes/functions/expNode.d.ts +1 -1
  122. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  123. package/lib/tree/nodes/functions/expNode.js +11 -1
  124. package/lib/tree/nodes/functions/functionNode.d.ts +8 -4
  125. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  126. package/lib/tree/nodes/functions/functionNode.js +8 -4
  127. package/lib/tree/nodes/functions/integralNode.d.ts +12 -0
  128. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -0
  129. package/lib/tree/nodes/functions/integralNode.js +16 -0
  130. package/lib/tree/nodes/functions/sinNode.d.ts +2 -2
  131. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  132. package/lib/tree/nodes/functions/sinNode.js +13 -14
  133. package/lib/tree/nodes/functions/tanNode.d.ts +19 -0
  134. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -0
  135. package/lib/tree/nodes/functions/tanNode.js +64 -0
  136. package/lib/tree/nodes/geometry/degree.d.ts +20 -0
  137. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -0
  138. package/lib/tree/nodes/geometry/degree.js +48 -0
  139. package/lib/tree/nodes/operators/operatorNode.d.ts +2 -1
  140. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  141. package/lib/tree/nodes/operators/operatorNode.js +1 -0
  142. package/package.json +1 -1
@@ -49,7 +49,7 @@ export interface Exercise<TIdentifiers = {}> {
49
49
  connector?: "=" | "\\iff" | "\\approx";
50
50
  generator: (n: number) => Question<TIdentifiers>[];
51
51
  maxAllowedQuestions?: number;
52
- answerType?: "QCM" | "free";
52
+ answerType?: "QCM" | "free" | "QCU";
53
53
  qcmTimer: number;
54
54
  freeTimer: number;
55
55
  getPropositions?: QCMGenerator<{
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5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c,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,CAAC"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf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mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,CAAC"}
@@ -109,7 +109,7 @@ exports.paritySumsAndProducts = {
109
109
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getParitySumsAndProductsQuestion, nb, 12),
110
110
  qcmTimer: 60,
111
111
  freeTimer: 60,
112
- answerType: "QCM",
112
+ answerType: "QCU",
113
113
  maxAllowedQuestions: 12,
114
114
  getPropositions,
115
115
  subject: "Mathématiques",
@@ -69,7 +69,7 @@ exports.binomialsTrinomialsProposedSolutions = {
69
69
  isSingleStep: true,
70
70
  sections: ["Équations"],
71
71
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getBinomialsTrinomialsProposedSolutionsQuestion, nb),
72
- answerType: "QCM",
72
+ answerType: "QCU",
73
73
  qcmTimer: 60,
74
74
  freeTimer: 60,
75
75
  getPropositions,
@@ -59,5 +59,5 @@ exports.verifySystemSolution = {
59
59
  getPropositions,
60
60
  isAnswerValid,
61
61
  subject: "Mathématiques",
62
- answerType: "QCM",
62
+ answerType: "QCU",
63
63
  };
@@ -89,7 +89,7 @@ exports.convexityQuadrinomials = {
89
89
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityQuadrinomialsQuestion, nb),
90
90
  qcmTimer: 60,
91
91
  freeTimer: 60,
92
- answerType: "QCM",
92
+ answerType: "QCU",
93
93
  getPropositions,
94
94
  isAnswerValid,
95
95
  subject: "Mathématiques",
@@ -37,7 +37,7 @@ exports.convexityTrinomials = {
37
37
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityTrinomialsQuestion, nb),
38
38
  qcmTimer: 60,
39
39
  freeTimer: 60,
40
- answerType: "QCM",
40
+ answerType: "QCU",
41
41
  getPropositions,
42
42
  isAnswerValid,
43
43
  subject: "Mathématiques",
@@ -97,6 +97,6 @@ exports.equaDiffCheckSolutionFirstOrder = {
97
97
  freeTimer: 60,
98
98
  getPropositions,
99
99
  isAnswerValid,
100
- answerType: "QCM",
100
+ answerType: "QCU",
101
101
  subject: "Mathématiques",
102
102
  };
@@ -116,7 +116,7 @@ exports.affineAdjustmentCompleteExercise = {
116
116
  isSingleStep: true,
117
117
  sections: ["Statistiques"],
118
118
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineAdjustmentCompleteQuestion, nb),
119
- answerType: "QCM",
119
+ answerType: "QCU",
120
120
  qcmTimer: 60,
121
121
  freeTimer: 60,
122
122
  getPropositions,
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ trinomial: number[];
4
+ leftbound: number;
5
+ rightbound: number;
6
+ };
7
+ export declare const affineMeanValue: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=affineMeanValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"affineMeanValue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineMeanValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAqGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.affineMeanValue = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const trinom_1 = require("../../../../math/polynomials/trinom");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
11
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
12
+ const closure_1 = require("../../../../tree/nodes/sets/closure");
13
+ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
14
+ const getAffineMeanValueQuestion = () => {
15
+ const a = (0, randint_1.randint)(-10, 10, [0]);
16
+ const b = (0, randint_1.randint)(-10, 10);
17
+ const trinomial = new trinom_1.Trinom(a, b, (0, randint_1.randint)(-10, 10));
18
+ const leftbound = (0, randint_1.randint)(-5, 6);
19
+ const rightbound = (0, randint_1.randint)(leftbound + 1, leftbound + 1);
20
+ const func = trinomial.derivate().toTree().toTex();
21
+ const interval = new intervalNode_1.IntervalNode(leftbound.toTree(), rightbound.toTree(), closure_1.ClosureType.FF).toTex();
22
+ const answer = new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (rightbound - leftbound).toTree()), (trinomial.calculate(rightbound) - trinomial.calculate(leftbound)).toTree())
23
+ .simplify()
24
+ .toTex();
25
+ const question = {
26
+ answer: answer,
27
+ instruction: `Soit $f(x) = ${func}$. Quelle est la valeur moyenne de $f$ sur $${interval}$ ?`,
28
+ keys: [],
29
+ answerFormat: "tex",
30
+ identifiers: {
31
+ trinomial: [trinomial.a, trinomial.b, trinomial.c],
32
+ rightbound,
33
+ leftbound,
34
+ },
35
+ };
36
+ return question;
37
+ };
38
+ const getPropositions = (n, { answer, trinomial, leftbound, rightbound }) => {
39
+ const propositions = [];
40
+ (0, exercise_1.addValidProp)(propositions, answer);
41
+ const trinomial1 = new trinom_1.Trinom(trinomial[0], trinomial[1], trinomial[2]);
42
+ const wrongAnswer1 = new addNode_1.AddNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (rightbound - leftbound).toTree()).simplify(), (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound)).toTree())
43
+ .simplify({ forbidFactorize: true })
44
+ .toTex();
45
+ const wrongAnswer2 = new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (leftbound - rightbound).toTree()), (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound)).toTree())
46
+ .simplify()
47
+ .toTex();
48
+ const wrongAnswer3 = (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound))
49
+ .toTree()
50
+ .toTex();
51
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1);
52
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2);
53
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3);
54
+ while (propositions.length < n) {
55
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).toTree().toTex());
56
+ }
57
+ return (0, exercise_1.shuffleProps)(propositions, n);
58
+ };
59
+ const isAnswerValid = (ans, { answer, trinomial, leftbound, rightbound }) => {
60
+ const trinomial1 = new trinom_1.Trinom(trinomial[0], trinomial[1], trinomial[2]);
61
+ const validanswer = new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (rightbound - leftbound).toTree()), (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound)).toTree()).simplify();
62
+ const latexs = validanswer.toAllValidTexs();
63
+ return latexs.includes(ans);
64
+ };
65
+ exports.affineMeanValue = {
66
+ id: "affineMeanValue",
67
+ label: "Calcul de la valeur moyenne d'une fonction affine",
68
+ levels: ["TermSpé"],
69
+ isSingleStep: true,
70
+ sections: ["Intégration"],
71
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineMeanValueQuestion, nb),
72
+ qcmTimer: 60,
73
+ freeTimer: 60,
74
+ getPropositions,
75
+ isAnswerValid,
76
+ subject: "Mathématiques",
77
+ };
@@ -9,4 +9,5 @@ export * from "./leadingCoeffAndOriginOrdinate";
9
9
  export * from "./affineAdjustment";
10
10
  export * from "./affineAdjustmentRsquared";
11
11
  export * from "./affineAdjustmentComplete";
12
+ export * from "./affineMeanValue";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
@@ -25,3 +25,4 @@ __exportStar(require("./leadingCoeffAndOriginOrdinate"), exports);
25
25
  __exportStar(require("./affineAdjustment"), exports);
26
26
  __exportStar(require("./affineAdjustmentRsquared"), exports);
27
27
  __exportStar(require("./affineAdjustmentComplete"), exports);
28
+ __exportStar(require("./affineMeanValue"), exports);
@@ -8,4 +8,5 @@ export * from "./exponential";
8
8
  export * from "./logarithm";
9
9
  export * from "./parity";
10
10
  export * from "./square";
11
+ export * from "./integral";
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -24,3 +24,4 @@ __exportStar(require("./exponential"), exports);
24
24
  __exportStar(require("./logarithm"), exports);
25
25
  __exportStar(require("./parity"), exports);
26
26
  __exportStar(require("./square"), exports);
27
+ __exportStar(require("./integral"), exports);
@@ -0,0 +1,10 @@
1
+ export * from "./integralAffines";
2
+ export * from "./integralTrinomials";
3
+ export * from "./integralKCosinus";
4
+ export * from "./integralKSinus";
5
+ export * from "./integralFractions";
6
+ export * from "./integralExpU";
7
+ export * from "./integralExpAxPlusB";
8
+ export * from "./integralDerivatedUSinU";
9
+ export * from "./integralDerivatedUCosU";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./integralAffines"), exports);
18
+ __exportStar(require("./integralTrinomials"), exports);
19
+ __exportStar(require("./integralKCosinus"), exports);
20
+ __exportStar(require("./integralKSinus"), exports);
21
+ __exportStar(require("./integralFractions"), exports);
22
+ __exportStar(require("./integralExpU"), exports);
23
+ __exportStar(require("./integralExpAxPlusB"), exports);
24
+ __exportStar(require("./integralDerivatedUSinU"), exports);
25
+ __exportStar(require("./integralDerivatedUCosU"), exports);
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ lowerBound: number;
4
+ upperBound: number;
5
+ trinomial: number[];
6
+ };
7
+ export declare const integralAffines: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=integralAffines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integralAffines.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralAffines.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAiFF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.integralAffines = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const trinom_1 = require("../../../../math/polynomials/trinom");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const integralNode_1 = require("../../../../tree/nodes/functions/integralNode");
9
+ const getIntegralAffinesQuestion = () => {
10
+ const trinomial = trinom_1.TrinomConstructor.random();
11
+ const affine = trinomial.derivate();
12
+ let lowerBound = (0, randint_1.randint)(-5, 5);
13
+ let upperBound = (0, randint_1.randint)(-5, 5);
14
+ while (lowerBound >= upperBound) {
15
+ lowerBound = (0, randint_1.randint)(-5, 5);
16
+ upperBound = (0, randint_1.randint)(-5, 5);
17
+ }
18
+ const integral = new integralNode_1.IntegralNode(affine.toTree(), lowerBound.toTree(), upperBound.toTree(), "x").toTex();
19
+ const answer = (trinomial.calculate(upperBound) - trinomial.calculate(lowerBound))
20
+ .toTree()
21
+ .toTex();
22
+ const question = {
23
+ answer: answer,
24
+ instruction: `Calculer : $${integral}$`,
25
+ keys: [],
26
+ answerFormat: "tex",
27
+ identifiers: {
28
+ lowerBound,
29
+ upperBound,
30
+ trinomial: [trinomial.a, trinomial.b, trinomial.c],
31
+ },
32
+ };
33
+ return question;
34
+ };
35
+ const getPropositions = (n, { answer, lowerBound, upperBound, trinomial }) => {
36
+ const propositions = [];
37
+ (0, exercise_1.addValidProp)(propositions, answer);
38
+ const trinomial1 = new trinom_1.Trinom(trinomial[0], trinomial[1], trinomial[2]);
39
+ const affine = trinomial1.derivate();
40
+ const wrongAnswer1 = (trinomial1.calculate(lowerBound) - trinomial1.calculate(upperBound))
41
+ .toTree()
42
+ .toTex();
43
+ const wrongAnswer2 = (affine.calculate(upperBound) - affine.calculate(lowerBound))
44
+ .toTree()
45
+ .toTex();
46
+ const wrongAnswer3 = (affine.calculate(lowerBound) - affine.calculate(upperBound))
47
+ .toTree()
48
+ .toTex();
49
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1);
50
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2);
51
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3);
52
+ while (propositions.length < n) {
53
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).toTree().toTex());
54
+ }
55
+ return (0, exercise_1.shuffleProps)(propositions, n);
56
+ };
57
+ const isAnswerValid = (ans, { answer }) => {
58
+ return ans === answer;
59
+ };
60
+ exports.integralAffines = {
61
+ id: "integralAffines",
62
+ label: "Calcul d'intégrales de fonctions affines",
63
+ levels: ["TermSpé"],
64
+ isSingleStep: true,
65
+ sections: ["Intégration"],
66
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntegralAffinesQuestion, nb),
67
+ qcmTimer: 60,
68
+ freeTimer: 60,
69
+ getPropositions,
70
+ isAnswerValid,
71
+ subject: "Mathématiques",
72
+ };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ aU: number;
6
+ bU: number;
7
+ };
8
+ export declare const IntegralDerivatedUCosU: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=integralDerivatedUCosU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integralDerivatedUCosU.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralDerivatedUCosU.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAmFF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegralDerivatedUCosU = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const affine_1 = require("../../../../math/polynomials/affine");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const cosNode_1 = require("../../../../tree/nodes/functions/cosNode");
9
+ const integralNode_1 = require("../../../../tree/nodes/functions/integralNode");
10
+ const sinNode_1 = require("../../../../tree/nodes/functions/sinNode");
11
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
12
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
13
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
14
+ const getIntegralDerivatedUCosUQuestion = () => {
15
+ const u = affine_1.AffineConstructor.random();
16
+ const cosU = new cosNode_1.CosNode(u.toTree());
17
+ const b = (0, randint_1.randint)(-4, 6);
18
+ const a = (0, randint_1.randint)(-5, b);
19
+ const integral = new integralNode_1.IntegralNode(new multiplyNode_1.MultiplyNode(u.derivate().toTree(), cosU), a.toTree(), b.toTree(), "x");
20
+ const correctAns = getCorrectAnswer(a, b, u);
21
+ const question = {
22
+ answer: correctAns.simplify().toTex(),
23
+ instruction: `Calculer : $${integral.toTex()}$`,
24
+ keys: ["sin", "cos"],
25
+ answerFormat: "tex",
26
+ identifiers: { a, b, aU: u.a, bU: u.b },
27
+ };
28
+ return question;
29
+ };
30
+ const getPropositions = (n, { answer, a, b, aU, bU }) => {
31
+ const propositions = [];
32
+ const u = new affine_1.Affine(aU, bU, "x");
33
+ (0, exercise_1.addValidProp)(propositions, answer);
34
+ generatePropositions(a, b, u).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
35
+ let sinA;
36
+ let sinB;
37
+ while (propositions.length < n) {
38
+ sinA = new sinNode_1.SinNode((0, randint_1.randint)(-11, 10, [0]).toTree());
39
+ sinB = new sinNode_1.SinNode((0, randint_1.randint)(-11, 10, [0]).toTree());
40
+ (0, exercise_1.tryToAddWrongProp)(propositions, new substractNode_1.SubstractNode(sinB, sinA).toTex());
41
+ }
42
+ return (0, exercise_1.shuffleProps)(propositions, n);
43
+ };
44
+ const isAnswerValid = (ans, { a, b, aU, bU }) => {
45
+ const u = new affine_1.Affine(aU, bU, "x");
46
+ const correctAns = getCorrectAnswer(a, b, u).simplify();
47
+ return correctAns.toAllValidTexs().includes(ans);
48
+ };
49
+ const getCorrectAnswer = (a, b, u) => {
50
+ const uTree = u.toTree();
51
+ const primitiveA = new sinNode_1.SinNode(uTree.evaluate({ x: a }).toTree());
52
+ const primitiveB = new sinNode_1.SinNode(uTree.evaluate({ x: b }).toTree());
53
+ return new substractNode_1.SubstractNode(primitiveB, primitiveA);
54
+ };
55
+ const generatePropositions = (a, b, u) => {
56
+ const uTree = u.toTree();
57
+ const uDerivated = u.derivate();
58
+ const sinA = new sinNode_1.SinNode(uTree.evaluate({ x: a }).toTree());
59
+ const sinB = new sinNode_1.SinNode(uTree.evaluate({ x: b }).toTree());
60
+ const firstProposition = new addNode_1.AddNode(sinB, sinA).simplify();
61
+ const secondProposition = new substractNode_1.SubstractNode(sinA, sinB).simplify();
62
+ const thirdProposition = new multiplyNode_1.MultiplyNode(uDerivated.toTree(), new sinNode_1.SinNode(uTree)).simplify();
63
+ return [
64
+ firstProposition.toTex(),
65
+ secondProposition.toTex(),
66
+ thirdProposition.toTex(),
67
+ ];
68
+ };
69
+ exports.IntegralDerivatedUCosU = {
70
+ id: "IntegralDerivatedUCosU",
71
+ label: "Calcul d'intégrales de fonctions du type $u'\\cos(u)$",
72
+ levels: ["TermSpé"],
73
+ isSingleStep: true,
74
+ sections: ["Intégration"],
75
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntegralDerivatedUCosUQuestion, nb),
76
+ qcmTimer: 60,
77
+ freeTimer: 60,
78
+ getPropositions,
79
+ isAnswerValid,
80
+ subject: "Mathématiques",
81
+ };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ aU: number;
6
+ bU: number;
7
+ };
8
+ export declare const integralDerivatedUSinU: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=integralDerivatedUSinU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integralDerivatedUSinU.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralDerivatedUSinU.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.integralDerivatedUSinU = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const affine_1 = require("../../../../math/polynomials/affine");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const cosNode_1 = require("../../../../tree/nodes/functions/cosNode");
9
+ const integralNode_1 = require("../../../../tree/nodes/functions/integralNode");
10
+ const sinNode_1 = require("../../../../tree/nodes/functions/sinNode");
11
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
12
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
13
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
14
+ const getIntegralDerivatedUSinUQuestion = () => {
15
+ const u = affine_1.AffineConstructor.random();
16
+ const b = (0, randint_1.randint)(-4, 6);
17
+ const a = (0, randint_1.randint)(-5, b);
18
+ const integral = new integralNode_1.IntegralNode(new multiplyNode_1.MultiplyNode(u.derivate().toTree(), new sinNode_1.SinNode(u.toTree())), a.toTree(), b.toTree(), "x");
19
+ const correctAns = getCorrectAnswer(a, b, u);
20
+ const question = {
21
+ answer: correctAns.simplify().toTex(),
22
+ instruction: `Calculer : $${integral.toTex()}$`,
23
+ keys: ["sin", "cos"],
24
+ answerFormat: "tex",
25
+ identifiers: { a, b, aU: u.a, bU: u.b },
26
+ };
27
+ return question;
28
+ };
29
+ const getPropositions = (n, { answer, a, b, aU, bU }) => {
30
+ const propositions = [];
31
+ const u = new affine_1.Affine(aU, bU, "x");
32
+ generatePropositions(a, b, u).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
33
+ (0, exercise_1.addValidProp)(propositions, answer);
34
+ let primitiveA;
35
+ let primitiveB;
36
+ const minusOne = (-1).toTree();
37
+ while (propositions.length < n) {
38
+ primitiveA = new multiplyNode_1.MultiplyNode(minusOne, new cosNode_1.CosNode((0, randint_1.randint)(-10, 11, [0]).toTree())).simplify();
39
+ primitiveB = new multiplyNode_1.MultiplyNode(minusOne, new cosNode_1.CosNode((0, randint_1.randint)(-10, 11, [0]).toTree())).simplify();
40
+ (0, exercise_1.tryToAddWrongProp)(propositions, new substractNode_1.SubstractNode(primitiveB, primitiveA).simplify().toTex());
41
+ }
42
+ return (0, exercise_1.shuffleProps)(propositions, n);
43
+ };
44
+ const isAnswerValid = (ans, { a, b, aU, bU }) => {
45
+ const u = new affine_1.Affine(aU, bU, "x");
46
+ const correctAns = getCorrectAnswer(a, b, u).simplify();
47
+ return correctAns.toAllValidTexs().includes(ans);
48
+ };
49
+ const getCorrectAnswer = (a, b, u) => {
50
+ const minusOne = (-1).toTree();
51
+ const uTree = u.toTree();
52
+ const primitiveA = new multiplyNode_1.MultiplyNode(minusOne, new cosNode_1.CosNode(uTree.evaluate({ x: a }).toTree())).simplify();
53
+ const primitiveB = new multiplyNode_1.MultiplyNode(minusOne, new cosNode_1.CosNode(uTree.evaluate({ x: b }).toTree())).simplify();
54
+ return new substractNode_1.SubstractNode(primitiveB, primitiveA);
55
+ };
56
+ const generatePropositions = (a, b, u) => {
57
+ const minusOne = (-1).toTree();
58
+ const uTree = u.toTree();
59
+ const uA = uTree.evaluate({ x: a }).toTree();
60
+ const uB = uTree.evaluate({ x: b }).toTree();
61
+ const sinA = new sinNode_1.SinNode(uA);
62
+ const sinB = new sinNode_1.SinNode(uB);
63
+ const primitiveA = new multiplyNode_1.MultiplyNode(minusOne, new cosNode_1.CosNode(uA)).simplify();
64
+ const primitiveB = new multiplyNode_1.MultiplyNode(minusOne, new cosNode_1.CosNode(uB)).simplify();
65
+ const firstProposition = new addNode_1.AddNode(primitiveB, primitiveA);
66
+ const secondProposition = new addNode_1.AddNode(sinB, sinA).simplify();
67
+ const thirdProposition = new substractNode_1.SubstractNode(sinB, sinA).simplify();
68
+ return [
69
+ firstProposition.toTex(),
70
+ secondProposition.toTex(),
71
+ thirdProposition.toTex(),
72
+ ];
73
+ };
74
+ exports.integralDerivatedUSinU = {
75
+ id: "integralDerivatedUSinU",
76
+ label: "Calcul d'intégrales de fonctions du type $u'\\sin(u)$",
77
+ levels: ["TermSpé"],
78
+ isSingleStep: true,
79
+ sections: ["Intégration"],
80
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntegralDerivatedUSinUQuestion, nb),
81
+ qcmTimer: 60,
82
+ freeTimer: 60,
83
+ getPropositions,
84
+ isAnswerValid,
85
+ subject: "Mathématiques",
86
+ };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ aX: number;
6
+ bX: number;
7
+ };
8
+ export declare const integralExpAxPlusB: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=integralExpAxPlusB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integralExpAxPlusB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralExpAxPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA2GF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}