Skip to content

Commit 475fad4

Browse files
committed
Fix bug 4693
1 parent f723c83 commit 475fad4

File tree

1 file changed

+28
-31
lines changed

1 file changed

+28
-31
lines changed

OpenProblemLibrary/Indiana/Indiana_setIntegrals4FTC/ur_in_4_11.pg

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ DOCUMENT(); # This should be the first executable line in the problem.
1515

1616
loadMacros(
1717
"PGstandard.pl",
18-
"PGchoicemacros.pl",
18+
"MathObjects.pl",
1919
"PGcourse.pl"
2020
);
2121

2222
TEXT(beginproblem());
2323
$showPartialCorrectAnswers = 1;
2424

25+
Context("Numeric");
26+
2527
$b = non_zero_random(1,2,1);
2628
$c = random(2,6,1);
2729
while ($b==$c) {$c = random(2,6,1)}
@@ -30,39 +32,36 @@ $m = random(2,7,1);
3032
$n = random(-3,-1,1);
3133
while ($m+$n == 1) {$n = random(-3,-1,1)}
3234

33-
TEXT(EV2(<<EOT));
35+
BEGIN_TEXT
3436
Find a function \( f \) and a number \( a \) such that
3537
\[ $b + \int_{a}^{x} \frac {f(t)} {t^{$m}} dt = $c x^{$n} \]
3638
$PAR
37-
EOT
38-
39-
HINT(EV2(<<EOT));
40-
There are two ways to solve this problem.
41-
$PAR
42-
The first (and better) way is to differentiate both sides of the above equation using the Fundamental Theorem of Calculus (Part I) on the integral. This will give an equation that can be solved for f(x). The value of the number a can be determined by no
43-
44-
rmal integration (i.e. the Evaluation Theorem) of the original equation.
45-
$PAR
46-
The second way (and a bit harder) is to simply guess the form of f(x) and do normal integration to see if you are right. The value of the number a is determined as in the preceding paragraph above.
47-
$PAR
48-
EOT
49-
50-
TEXT(EV2(<<EOT));
5139
\( f(x) = \) \{ans_rule( 20)\}
5240
$PAR
5341
\( a = \) \{ans_rule( 20)\}
54-
EOT
42+
END_TEXT
5543

5644
$d = $c*$n;
5745
$e = $m+$n-1;
46+
$f = $n-1;
47+
48+
$ans1=Compute("$d*x^$e");
49+
$ans2=Compute(($b/$c)**(1/$n));
5850

59-
$ans1="$d*x**$e" ;
60-
$ans2=($c/$b)**(-1/$n);
51+
ANS($ans1->cmp());
52+
ANS($ans2->cmp());
6153

62-
ANS(fun_cmp($ans1));
63-
ANS(num_cmp($ans2));
6454

65-
&SOLUTION(EV3(<<'EOT'));
55+
BEGIN_HINT
56+
There are two ways to solve this problem.
57+
$PAR
58+
The first (and better) way is to differentiate both sides of the above equation using the Fundamental Theorem of Calculus (Part I) on the integral. This will give an equation that can be solved for f(x). The value of the number a can be determined by integrating the original equation (i.e. the Evaluation Theorem).
59+
$PAR
60+
The second way (and a bit harder) is to simply guess the form of f(x) and integrate to see if you are right. The value of the number a is determined as in the preceding paragraph above.
61+
$PAR
62+
END_HINT
63+
64+
BEGIN_SOLUTION
6665
$SOL $BR
6766
As the hint suggests, the best way to solve this problem is to first determine the form
6867
of the function \( f(x) \) by using the first portion of the Fundamental Theorem of
@@ -73,28 +72,26 @@ below:
7372
\]
7473
Next, we differentiate both sides to get:
7574
\[
76-
\frac{f(x)}{x^{$m}} = \{$c*$n\} x^{ \{$n-1\} }
75+
\frac{f(x)}{x^{$m}} = $d x^{ $f }
7776
\]
7877
Therefore, the function desired is:
7978
\[
80-
f(x) = \{ $c*$n \} x^{ \{$n-1+$m\} }
79+
f(x) = $d x^{ $e }
8180
\]
8281
Now, to determine the value of \( a \), we need to integrate the original expression
8382
using our new information about \( f(t) \). That is, we now have:
8483
\[
8584
\begin{aligned}
86-
$b + \int_{a}^{x} \frac{ $d t^$e}{t^3} dt &= $c x^{$n} \\
87-
\int_{a}^{x} $d t^{ \{$e-3\} } dt &= $c x^{$n} - $b \\
88-
\frac{$d}{ \{$e-2 \} }\left( x^{ \{$e-2\} } - a^{ \{$e-2\} } \right) &= $c x^{$n} - $b \\
89-
$c x^{$n} - $c a^{$n} &= $c x^{$n} - $b \\
85+
$b + \int_{a}^{x} \frac{ $d t^$e}{t^$m} dt &= $c x^{$n} \\
86+
\int_{a}^{x} $d t^{ \{$f\} } dt &= $c x^{$n} - $b \\
87+
$c \left( x^{ $n } - a^{ $n } \right) &= $c x^{$n} - $b \\
9088
$c a^{$n} &= $b \\
9189
a^{$n} &= \frac{$b}{$c} \\
92-
\frac{1}{a^{\{($n==-1)?'':-$n\}}} &= \frac{$b}{$c} \\
93-
a &= \sqrt[\{($n==-1)?'':-$n\}]{\frac{$c}{$b}}
90+
a &= $ans2
9491
\end{aligned}
9592
\]
93+
END_SOLUTION
9694

97-
EOT
9895
ENDDOCUMENT(); # This should be the last executable line in the problem.
9996

10097

0 commit comments

Comments
 (0)