[npl] / trunk / NationalProblemLibrary / UCSB / Stewart5_4_7 / Stewart5_4_7_15.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/UCSB/Stewart5_4_7/Stewart5_4_7_15.pg

Sun Feb 6 02:23:13 2011 UTC (2 years, 3 months ago) by apizer
File size: 1024 byte(s)
`correct Stewart tags`

```    1 ## DBsubject('Calculus')
2 ## DBchapter('Applications of Differentiation')
3 ## DBsection('Optimization Problems')
4 ## KEYWORDS('Optimization','Differentiation')
5 ## TitleText1('Calculus: Early Transcendentals')
6 ## EditionText1('5')
7 ## AuthorText1('Stewart')
8 ## Section1('4.7')
9 ## Problem1('15')
10 ## Author('')
11 ## Institution('UCSB')
12
13 DOCUMENT();
14
16 "PG.pl",
17 "PGbasicmacros.pl",
18 "PGchoicemacros.pl",
20 "PGauxiliaryFunctions.pl"
21 );
22
23 TEXT(&beginproblem);
25 \$a=random(1,10,1);
26 \$b=random(1,10,1);
27 #\$c=2*\$b*\$a*\$a*\$a/15;
28 #while (\$b==\$a) \$b=random(1,10,1);
29 #\$c=random(1,10,1)*random(-1,1,2);
30
31 # Insert problem text between the \$PAR, and space for the
32 # answer, like this   \(y =\) \{ans_rule(50)\}
33 # just before the END_TEXT.
34
35 BEGIN_TEXT
36
37 \$PAR
38
39 Find the point on the line \(y=\$a x+\$b\) that is closest to the origin.
40
41 \$PAR
42
43 x = \{ans_rule(20)\}
44
45 \$PAR
46
47 y = \{ans_rule(20)\}
48
49 END_TEXT
50
51 ANS(num_cmp(-2*\$a*\$b/(2*\$a*\$a+2)));
52 ANS(num_cmp(\$a*2*\$a*\$b/(-2*\$a*\$a-2)+\$b));
53
54
55 ENDDOCUMENT();
```