##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Evaluate an indefinite integral. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('15,16,18') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1;$a=random(-3,0,1); $b=random(1,4,1); BEGIN_TEXT Evaluate the following integral.$BR $BR $\int \frac{1}{(x+a)(x + b)} dx$$BR Answer: \{ans_rule( 60) \} $$+C$$ END_TEXT $d1=$a-$b;$soln = FEQ("(ln(x + $b))/($d1) - (ln(x+$a))/($d1) "); ANS(fun_cmp($soln,mode=>'antider',limits=>[10,100])); ENDDOCUMENT(); # This should be the last executable line in the problem. ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Use partial fractions to integrate. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('17') DOCUMENT(); loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", );$showPartialCorrectAnswers = 1; $aa = random(3,6,1);$bb = random(2,5,1); $cc = random(1,5,1);$dd = random(2,4,1); $uu = random(1, 5,1);$lin0 = $cc +$dd - $aa*$uu**2; $const0 =$cc*$uu -$bb*$uu**2-$dd*$uu;$u2 = $uu**2;$num = nicestring([$aa,$bb, $lin0,$const0], ['x^3', 'x^2', 'x', '']); TEXT(beginproblem()); BEGIN_TEXT Consider the following indefinite integral. $BR $\int \frac{num}{x^2-u2}\, dx$$BR $BR The integrand decomposes into the form: $a x + b + \frac{c}{x-uu} +\frac{d}{x+uu}$ Compute the coefficients:$BR $$a =$$ \{ ans_rule()\} $BR $$b =$$ \{ ans_rule()\}$BR $$c =$$ \{ ans_rule()\} $BR $$d =$$ \{ ans_rule()\}$BR$BR Now integrate term by term to evaluate the integral.$BR Answer: \{ ans_rule(60)\} $$+$$ $$C$$ END_TEXT ANS(num_cmp($aa)); ANS(num_cmp($bb)); ANS(num_cmp($cc)); ANS(num_cmp($dd)); ANS(fun_cmp("$aa*x^2/2+$bb*x+$cc*ln(x-$uu)+$dd*ln(x+$uu)",mode=>'antider',limits=>[$uu+1,$uu+2])); ENDDOCUMENT(); ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Evaluate a definite integral. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('18,19,20') DOCUMENT(); loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl" ); TEXT(beginproblem()); $m=random(1,3,1);$n=random(1,6,1); $a=random(-3,3,1);$c=random(1,5,1); $b=$a+$c;$p=$m+$n; $q=$n*$a+$m*$b;$l=$a+$b; $k=$a*$b;$soln="$m*ln(1.5)+$n*ln(($c+3)/($c+2))"; $r=2-$a; $s=3-$a; $num=nicestring([$p, $q], ['x', '']);$den=nicestring([1, $l,$k], ['x^2', 'x', '']); BEGIN_TEXT Evaluate the integral. $BR$BR $\int_{r}^{s} \frac{num}{den} dx$ $BR Answer: \{ans_rule(60) \} END_TEXT ANS(num_cmp($soln)); ENDDOCUMENT(); ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Evaluate an indefinite integral ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('18,19,20') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1;$a = non_zero_random(-6,6,1); $b = non_zero_random(-4,4,1);$coef1 = 2 * $a;$coef2 = $a *$a; $coef3 = -$b; $pol = nicestring([1,$coef1, $coef2], ['x^2', 'x', '']);$soln = "$coef3/(x+$a)"; BEGIN_TEXT Evaluate the indefinite integral. $BR $\int \frac {b}{pol} dx$$BR $BR Answer: \{ans_rule(30) \} $$+$$ $$C$$$BR END_TEXT ANS(fun_cmp($soln, mode=>'antider')); ENDDOCUMENT(); # This should be the last executable line in the problem. ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Evaluate the indefinite integral. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('25') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", ); TEXT(beginproblem());$showPartialCorrectAnswers = 1; $a = random(-4,4,1);$A = 0; $B = non_zero_random(-5,5,1);$C = -$B*$a; $D = non_zero_random(-5,5,1);$const = $a*$C; $coef1 = -$B; $coef2 = -$C; $soln = "$coef1/x + $coef2/(2*x^2) +$D*ln(abs(x+$a))";$num = nicestring([$D,$B, $const], ['x^3', 'x^2', '']);$den = nicestring([1, $a], ['x^4', 'x^3']); BEGIN_TEXT Evaluate the indefinite integral.$BR $BR $\int \frac{num}{den} dx$$BR Answer: \{ ans_rule(50) \} $$+C$$ END_TEXT ANS(fun_cmp($soln,mode=>'antider',limits=>[-10,6])); ENDDOCUMENT(); # This should be the last executable line in the problem. ________________________________________________________________________________ ##KEYWORDS('integrals','partial fractions', 'substitution') ##DESCRIPTION ## Evaluate an indefinite integral ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('43,44') DOCUMENT(); loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", );$showPartialCorrectAnswers = 1; $a = random(3,7,1);$b = random(4,8,1); if ($a ==$b) {$b++;} TEXT(beginproblem()); BEGIN_TEXT Evaluate the indefinite integral.$BR $\int \frac{1}{a x +b \sqrt{x}}\, dx$ $BR Answer: \{ ans_rule(40)\} $$+$$ $$C$$$BR END_TEXT ANS(fun_cmp("2*log($a*sqrt(x)+$b)/$a",mode=>'antider')); ENDDOCUMENT(); ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Evaluate a definite integral. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('15,16,18') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGnumericalmacros.pl" ); TEXT(beginproblem());$showPartialCorrectAnswers = 1; $a=random(-3,0,1);$b=random(1,4,1); $c=random(-4,4,1);$d=random(5,9,1); $e=random(5,9,1);$function = sub { my $x=shift; ($x**3 + $c)/( ($x+$d) * ($x + $e) ); };$soln=romberg($function,$a, $b); BEGIN_TEXT Evaluate the integral.$BR $BR $\int_{a}^{b} \frac{x^3 + c}{(x+d)(x+e)} dx$$BR Answer: \{ans_rule( 60) \} END_TEXT ANS(num_cmp($soln)); ENDDOCUMENT(); # This should be the last executable line in the problem. ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Use partial fraction decomposition to evaluate an integral ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('31,32') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", ); TEXT(beginproblem());$showPartialCorrectAnswers = 1; $a = non_zero_random(-5,5,1);$av = abs($a);$bs = random(2,3,1); $b =$bs * $bs; while ($b==$av) {$bs = random(2,3,1); $b =$bs * $bs; };$generator = random(0,1,1); if ($generator == 0) {$A = non_zero_random(-5,6,1); $B = non_zero_random(-5,6,1);$C = 0; while($A == -$B) {$B = non_zero_random(-5,5,1)};$soln = "$A*ln(abs(x+$a))+$B*ln(x^2+$b)/2"; $x2_coeff =$A+$B;$x_coeff = $a *$B; $const =$A * $b; } if ($generator == 1) { $A = non_zero_random(-5,5,1);$B = 0; $C = non_zero_random(-5,5,1);$temp1 = -$A*$b; $temp2 =$a*$C; while($temp1 == $temp2) {$C = non_zero_random(-5,5,1); $temp2 =$a*$C; };$soln = "$A*ln(abs(x+$a))+$C*arctan(x/$bs)/$bs";$x2_coeff = $A;$x_coeff = $C;$const = $A*$b + $a*$C; } $num = nicestring([$x2_coeff, $x_coeff,$const], ['x^2', 'x', '']); BEGIN_TEXT The form of the partial fraction decomposition of a rational function is given below. $BR$BR $\frac{num}{(x+a)(x^2+b)} = \frac{A}{x+a} + \frac{B x + C}{x^2+b}$ $BR $$A =$$ \{ ans_rule(10) \} $$B =$$ \{ ans_rule(10) \} $$C =$$ \{ ans_rule(10) \}$BR$BR Now evaluate the indefinite integral.$BR $BR $\int \frac{num}{(x+a)(x^2+b)} dx$$BR Answer: \{ ans_rule(40) \} $$+C$$ END_TEXT ANS(num_cmp($A)); ANS(num_cmp($B)); ANS(num_cmp($C)); ANS(fun_cmp($soln,mode=>'antider',limits=>[-10,6])); ENDDOCUMENT(); # This should be the last executable line in the problem. ________________________________________________________________________________ ##KEYWORDS('integrals', 'partial fractions') ##DESCRIPTION ## Use partial fraction decomp. to help evaluate an integral. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('29,39') DOCUMENT(); loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", ); $showPartialCorrectAnswers = 1;$aa = random(3,6,1); $bb = random(2,5,1);$cc = random(1,5,1); $dd = random(2,4,1);$uu = random(1, 5,1); $cub0 =$cc+$bb;$quad0 = $aa+$dd; $u2 =$uu**2; $lin0 =$bb*$u2;$const0 = $aa*$u2; TEXT(beginproblem()); $pol = nicestring([$cub0, $quad0,$lin0, $const0], ['x^3', 'x^2', 'x', '']); BEGIN_TEXT$BR Consider the following indefinite integral. $\int \frac{pol}{x^4+u2 x^2}\, dx$ $BR$BR The integrand has partial fractions decomposition: $BR $\frac{a}{x^2} + \frac{b}{x} + \frac{cx + d}{x^2+u2}$ where$BR $$a =$$ \{ ans_rule()\} $BR $$b =$$ \{ ans_rule()\}$BR $$c =$$ \{ ans_rule()\} $BR $$d =$$ \{ ans_rule()\}$BR$BR Now integrate term by term to evaluate the integral.$BR Answer: \{ ans_rule(60)\} $$+C$$ END_TEXT ANS(num_cmp($aa)); ANS(num_cmp($bb)); ANS(num_cmp($cc)); ANS(num_cmp($dd)); ANS(fun_cmp( "-$aa/x+$bb*ln(x)+($cc/2)*ln(x^2+$u2)+($dd/$uu)*arctan(x/$uu)",mode=>'antider',limits=>[1,2])); ENDDOCUMENT(); ________________________________________________________________________________ ##KEYWORDS('integrals', 'substitution') ##DESCRIPTION ## Evaluate an indefinite integral. ##ENDDESCRIPTION ## AmberHolden tagged ## Shotwell cleaned ## DBsubject('Calculus') ## DBchapter('Techniques of Integration') ## DBsection('Integration by Partial Fractions') ## Date('6/3/2002') ## Author('') ## Institution('') ## TitleText1('Calculus Early Transcendentals') ## EditionText1('4') ## AuthorText1('Stewart') ## Section1('7.4') ## Problem1('55,56') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl" );$showPartialCorrectAnswers = 1; $a = random(1,5,1);$b = 2 * $a;$c = 1 + $a**2;$ans = "1/2 * ln(x^2 + $b * x +$c)"; TEXT(beginproblem()); BEGIN_TEXT Evaluate the indefinite integral. $\int \frac{x + a}{x^2 + b x +c} \, dx$ $BR Answer: \{ans_rule( 40) \} $$+C$$ END_TEXT ANS(fun_cmp($ans, mode=>'antider')); ENDDOCUMENT(); # This should be the last executable line in the problem.