[npl] / trunk / NationalProblemLibrary / WHFreeman / Rogawski_Calculus_Early_Transcendentals_Second_Edition / 10_Infinite_Series / 10.2_Summing_an_Infinite_Series / 10.2.45.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/WHFreeman/Rogawski_Calculus_Early_Transcendentals_Second_Edition/10_Infinite_Series/10.2_Summing_an_Infinite_Series/10.2.45.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2584 - (download) (annotate)
Tue Nov 8 15:17:41 2011 UTC (2 years, 5 months ago) by aubreyja
File size: 4470 byte(s)
Rogawski problems contributed by publisher WHFreeman. These are a subset of the problems available to instructors who use the Rogawski textbook. The remainder can be obtained from the publisher.

    1 ## DBsubject('Calculus')
    2 ## DBchapter('Limits and Derivatives')
    3 ## DBsection('Definition of the Derivative')
    4 ## KEYWORDS('calculus', 'derivatives', 'slope')
    5 ## TitleText1('Calculus: Early Transcendentals')
    6 ## EditionText1('2')
    7 ## AuthorText1('Rogawski')
    8 ## Section1('10.2')
    9 ## Problem1('45')
   10 ## Author('LA Danielson')
   11 ## Institution('The College of Idaho')
   12 
   13 DOCUMENT();
   14 loadMacros("PG.pl","PGbasicmacros.pl","PGanswermacros.pl");
   15 loadMacros("Parser.pl");
   16 loadMacros("freemanMacros.pl");
   17 loadMacros("PGauxiliaryFunctions.pl");
   18 loadMacros("PGgraphmacros.pl");
   19 
   20 #$showPartialCorrectAnswers=1;
   21 $l=Real(random(1,20,1));
   22 $twol = 2 * $l;
   23 $fourl = 4 * $l;
   24 $lhalves = $l / 2;
   25 $lfourths = $l / 4;
   26 
   27 ($angle,$line,$ansfactor,$ymax,$shift) = @{ list_random(
   28                [ "\frac{\pi}{6}", Compute("(1/sqrt(3))*(x-1)+1"), 3, 3, 0 ],
   29                [ "\frac{\pi}{4}", Compute("x"), 2, 4, .05 ],
   30                [ "\frac{\pi}{3}", Compute("sqrt(3)*(x-1)+1"), 1, 5, .1 ]
   31            )};
   32 
   33 $firstdiag = (($ansfactor == 1) ? "$l" : "\frac{$l}{\sqrt{$ansfactor}}");
   34 $firstdiagflat = (($ansfactor == 1) ? "$l" : "$l/\sqrt{$ansfactor}");
   35 
   36 if($l % 2 == 0){
   37   $seconddiag = (($ansfactor == 1) ? $lhalves
   38                              : "\frac{$lhalves}{\sqrt{$ansfactor}}");
   39 } else {
   40   $seconddiag = "\frac{$firstdiagflat}{2}";
   41 }
   42 
   43 $lengthdiag = (($ansfactor == 1) ? $twol : "\frac{$twol}{\sqrt{$ansfactor}}");
   44 $totallength = (($ansfactor == 1) ? $fourl
   45                    : "$twol\left(1+\frac{1}{\sqrt{$ansfactor}}\right)");
   46 
   47 $answer = Compute("2*$l * (1 + 1/sqrt($ansfactor))");
   48 
   49  # Graph the triangle
   50   $gr = init_graph(0,0,4,$ymax,'pixels'=>[300,300]);
   51   # plot hypotenuse
   52   add_functions($gr,
   53   "$line for x in <1,3> using color:blue and weight:1");
   54 
   55   # add side adj label
   56   $gr->lb( new Label(2,.9,$l,
   57   'black','center','center'));
   58 
   59 
   60   # add theta labels
   61   $gr->lb( new Label(1.45,1.2+$shift,'a',
   62   'black','center','center'));
   63   $gr->lb( new Label(2.6,1.2+$shift,'a',
   64   'black','center','center'));
   65 
   66   # and points
   67   $gr->stamps( open_circle(1.3,1.07+$shift,'black') );
   68   $gr->stamps( open_circle(2.75,1.07+$shift,'black') );
   69 
   70   # side leg opp
   71   $gr->moveTo(3,1);
   72   $gr->lineTo(3,$line->eval(x=>3),'blue');
   73 
   74 #path in red
   75 
   76   # base leg adj
   77   $gr->moveTo(1,1);
   78   $gr->lineTo(3,1,'red');
   79 
   80   $linepower = 0;
   81   $prevy = 1;
   82   while($linepower < 4){
   83     $thisx = Compute("3-2^(-$linepower)");
   84     $thisy = $line->eval(x=>$thisx);
   85 
   86     # draw diagonal
   87     $gr->moveTo(3,$prevy);
   88     $gr->lineTo($thisx, $thisy, 'red');
   89 
   90     # then horizontal
   91     $gr->moveTo($thisx, $thisy);
   92     $gr->lineTo(3, $thisy, 'red');
   93 
   94     $prevy = $thisy;
   95     $linepower++;
   96   }
   97 
   98 
   99 Context()->texStrings;
  100 BEGIN_TEXT
  101 \{ beginproblem() \}
  102 \{ textbook_ref_exact("Rogawski ET 2e", "10.2","45") \}
  103 $PAR
  104 \{ image(insertGraph($gr), height =>300, width =>300) \}
  105 $BR
  106 Find the total length of the infinite zigzag path in the above figure
  107 $BR(each zag occurs at an angle of \(a=$angle\)).
  108 $PAR Total length of the path =  \{ans_rule()\}
  109 END_TEXT
  110 
  111 Context()->normalStrings;
  112 
  113 ANS($answer->cmp);
  114 Context()->texStrings;
  115 SOLUTION(EV3(<<'END_SOLUTION'));
  116 $PAR
  117 $SOL
  118 Let us consider the total length, \(L\), as the sum of the horizontal lengths, \(L_H\), and the diagonal lengths, \(L_D\). We compute \(L_H\) and \(L_D\) separately.
  119 $PAR
  120 Each horizontal length is the base of an isosceles triangle and is exactly 1/2 the length of the previous horizontal length, moving up the path. For example, the first (lowest) horizontal line has length \($l\), and the next lowest horizontal line has length \($lhalves\), then \($lfourths\), etc. Therefore, the total length of the horizontal segments is
  121 \[
  122 L_H = \sum_{n=0}^{\infty}$l\left(\frac{1}{2}\right)^n=\frac{$l}{1-\frac{1}{2}}=$twol.
  123 \]
  124 $PAR
  125 To calculate the lengths of the diagonal segments, notice that the first diagonal (the longest of the diagonals) has length \($firstdiag\). The next diagonal has length \($seconddiag\), and in general, each diagonal has half the length of the previous (as was the case for the horizontal segments). Therefore, the total length of the diagonal segments is
  126 \[
  127 L_D = \sum_{n=0}^{\infty}$firstdiag \left(\frac{1}{2}\right)^n = \frac{$firstdiagflat}{1-\frac{1}{2}} = $lengthdiag.
  128 \]
  129 $PAR
  130 Therefore, the total length of the path is
  131 \[
  132 L=L_H+L_D=$twol+ $lengthdiag = $totallength.
  133 \]
  134 END_SOLUTION
  135 ENDDOCUMENT();

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9