File tree Expand file tree Collapse file tree 1 file changed +10
-35
lines changed
OpenProblemLibrary/Union/setIntByParts Expand file tree Collapse file tree 1 file changed +10
-35
lines changed Original file line number Diff line number Diff line change 1616## MO(1)
1717## KEYWORDS('calculus','integration','integration by parts')
1818
19- DOCUMENT(); # This should be the first executable line in the problem.
19+ DOCUMENT(); # This should be the first executable line in the problem.
2020
21- loadMacros(
22- "PGstandard.pl",
23- "PGunion.pl",
24- "MathObjects.pl",
25- "PGcourse.pl"
26- );
21+ loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
2722
28- TEXT(beginproblem());
29-
30- ###################################
3123# Setup
3224
33- $a = random(2,4,1);
34-
35- $integrand=Formula(" x e^{$a x} ");
25+ $a = random(2, 9, 1);
26+ $integrand = Formula(" x e^{$a x} ");
3627
37- ###################################
38- # Main text
28+ Context()->flags->set(reduceConstants => 0);
29+ $antideriv = Formula("1/$a (x e^(${a}x) - 1/$a e^(${a}x))");
3930
40- Context()->texStrings;
41- BEGIN_TEXT
31+ BEGIN_PGML
4232Evaluate the indefinite integral.
43- $PAR
44- \( \displaystyle\int $integrand \, dx \)
45- = \{ans_rule(50)\} \( + C\).
46- END_TEXT
47- Context()->normalStrings;
48-
49- ###################################
50- # Answers
51-
52- $showPartialCorrectAnswers = 1;
53- Context()->flags->set(reduceConstants=>0);
54-
55- $antideriv = Formula( "1/$a (x e^(${a}x) - 1/$a e^(${a}x))");
56-
57- ANS($antideriv->cmp(upToConstant=>1));
58-
59- ###################################
6033
34+ [``\int [$integrand] \, dx ``]=
35+ [_]{$antideriv->cmp(upToConstant=>1)}{50} [` + C`].
36+ END_PGML
6137
62- ;
6338ENDDOCUMENT();
You can’t perform that action at this time.
0 commit comments