[npl] / trunk / NationalProblemLibrary / ma123DB / set4 / s7_8_11.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/ma123DB/set4/s7_8_11.pg

Wed Oct 12 19:45:41 2005 UTC (7 years, 7 months ago) by gage
File size: 2721 byte(s)
This commit was generated by cvs2svn to compensate for changes in r5, which
included commits to RCS files with non-trunk default branches.

    1 ##KEYWORDS('integrals', 'improper')
2 ##DESCRIPTION
3 ## Evaluate an improper integral
4 ##ENDDESCRIPTION
5
6 ## Shotwell cleaned
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Techniques of Integration')
10 ## DBsection('Improper Integrals')
11 ## Date('6/3/2002')
12 ## Author('')
13 ## Institution('')
14 ## TitleText1('Calculus Early Transcendentals')
15 ## EditionText1('4')
16 ## AuthorText1('Stewart')
17 ## Section1('7.8')
18 ## Problem1('11')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PGbasicmacros.pl",
25 "PGauxiliaryFunctions.pl"
26 );
27
28 TEXT(beginproblem());
29 $showPartialCorrectAnswers = 1; 30 31$a=non_zero_random(-8, 8);
32 $b=non_zero_random(-8, 8); 33$c=non_zero_random(-8, 8);
34 $pol = nicestring([$a, $b,$c], ['x^2', 'x', '']);
35
36 @functions=($pol, "$a x^4", "(x-$a)^2+$b");
37 $choice=random(0, 2); 38 39 BEGIN_TEXT 40 Determine whether the integral is divergent or convergent. If it is convergent, evaluate it. If not, state your answer as$BITALIC div $EITALIC . 41 42$BR $\int_{-\infty}^{\infty} (functions[choice]) dx$
43 $BR Answer: \{ans_rule( 30) \} 44$BR
45 END_TEXT
46 ANS(num_cmp('div', strings=>['div']));
47
48 if ($choice == 0) { 49 &SOLUTION(EV3(<<'EOT')); 50$SOL $BR$BR
51 52 \begin{align*} 53 \int_{-\infty}^{\infty} ( a x^2 + b x + c ) \; dx 54 &= \left \left( \frac{a x^3}{3} + \frac{b x^2}{2} + c x \right) 55 \right|_{-\infty}^{\infty} \\\\ 56 &= \lim_{x\to\infty} \left( \frac{a x^3}{3} 57 + \frac{b x^2}{2} + c x \right) 58 - \lim_{x\to -\infty} \left( \frac{a x^3}{3} 59 + \frac{b x^2}{2} + c x \right) 60 \end{align*} 61
62 Both of these clearly diverge, because they're polynomials,
63 so the integral in question diverges.
64 EOT
65 }
66 if ($choice == 1) { 67 &SOLUTION(EV3(<<'EOT')); 68$SOL $BR$BR
69 70 \begin{align*} 71 \int_{-\infty}^{\infty} a x^4 \; dx 72 &= \left \frac{a x^5}{5} \right|_{-\infty}^{\infty} \\\\ 73 &= \lim_{x\to\infty} \frac{a x^5}{5} 74 - \lim_{x\to -\infty} \frac{a x^5}{5} 75 \end{align*} 76
77 Both of these clearly diverge, because they're polynomials,
78 so the integral in question diverges.
79 EOT
80 }
81 if ($choice == 2) { 82$soln_2a = 2 * $a; 83$soln_bpa2 = $b +$a**2;
84 &SOLUTION(EV3(<<'EOT'));
85 $SOL$BR \$BR
86 87 \begin{align*} 88 \int_{-\infty}^{\infty} \left( ( x - a )^2 + b \right) \; dx 89 &= \int_{-\infty}^{\infty} ( x^2 - soln_2a x + soln_bpa2 ) \; dx \\\\ 90 &= \left \left( \frac{x^3}{3} - a x^2 + soln_bpa2 x \right) 91 \right|_{-\infty}^{\infty} \\\\ 92 &= \lim_{x\to\infty} \left( \frac{x^3}{3} - a x^2 + soln_bpa2 x \right) 93 - \lim_{x\to\infty} \left( \frac{x^3}{3} 94 - a x^2 + soln_bpa2 x \right) 95 \end{align*} 96
97 Both of these clearly diverge, because they're polynomials,
98 so the integral in question diverges.
99 EOT
100 }
101
102 ENDDOCUMENT();        # This should be the last executable line in the problem.
103