[npl] / trunk / NationalProblemLibrary / ASU-topics / setTrigApplications / p10.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/ASU-topics/setTrigApplications/p10.pg

Revision 366 - (download) (annotate)
Fri Aug 25 22:55:41 2006 UTC (6 years, 9 months ago) by jj
File size: 1868 byte(s)
Fixed tags.


    1 ## DESCRIPTION
2 ## Precalculus: Trigonometry
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('trigonometry')
6 ## Tagged by cmd6a 6/22/06
7
8 ## DBsubject('Trigonometry')
9 ## DBchapter('Trigonometric Functions of Angles')
10 ## DBsection('The Law of Cosines')
11 ## Date('')
12 ## Author('')
13 ## Institution('ASU')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
22 loadMacros(
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
26 "PGanswermacros.pl",
27 "PGauxiliaryFunctions.pl",
28 "PGasu.pl"
29 );
30
31 TEXT(beginproblem());
32
33 #
34 # Now we do the randomization of variables, and other computations
35 # as needed for this problem.  Sometimes we compute the answers here.
36 #
37
38 $pi = 4*arctan(1); 39 40$ang1 = random(15,80,5);   # first angle in degrees
41 $r1 =$ang1*$pi/180; # first angle in radians 42$ang2 = random(20,80,5);   # second angle in degrees
43 $r2 =$ang2*$pi/180; # second angle in radians 44$speed = random(40,60,2);
45 $t1 = random(1,3,0.1); # time from A to B 46$t2 = random(1,3,0.1);     # time from B to C
47
48 # find the answer
49
50 $r =$r1+$r2; # angle B 51$d1 = $speed*$t1;
52 $d2 =$speed*$t2; 53$distance = sqrt($d1**2+$d2**2-2*$d1*$d2*cos($r)); 54 55 56 57 BEGIN_TEXT 58 The bearing from city A to city B is S $$ang1 ^\circ$$E and the bearing 59 from city B to city C is N $$ang2 ^\circ$$E. (See picture below where 60 $$\alpha = ang1 ^\circ$$ and $$\beta = ang2 ^\circ$$. Click on the picture 61 to see it more clearly). 62$PAR
63 \{ image("pb15.gif") \}
64 $PAR 65 It takes$t1 hours for a car traveling at $speed miles per hour to go 66 from A to B and$t2 hours to go from B to C.
67 $BR 68 Find the distance between city A and city C. 69 70 71$PAR
72 $BR distance = \{ans_rule(20)\} 73 74 75 END_TEXT 76 77 ANS(num_cmp($distance));
78
79 ENDDOCUMENT();        # This should be the last executable line in the problem.


 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9