[rochester] / trunk / rochester_physics_problib / type16 / prob17.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/rochester_physics_problib/type16/prob17.pg

Wed Nov 30 16:38:48 2005 UTC (7 years, 5 months ago) by gage
File size: 4196 byte(s)
*** empty log message ***


    1
2    DOCUMENT();
3
5                "PGbasicmacros.pl",
6                "PGauxiliaryFunctions.pl",
7                "PGchoicemacros.pl",
9                "PGgraphmacros.pl",
10                "PG_CAPAmacros.pl"
11    );
12
13    TEXT(beginproblem());
14
15
16 ## *************************************
17 ##
18 ## Conservation of linear momentum
19 ## Part 1
20 ## By Frank L. H. Wolfs, Wolfs@nsrl.rochester.edu
21 ## No unauthorized commercial use
22 ## Imported Files
23 ## ${CAPA_Tools}Problem 24 ##${CAPA_GraphicsDirectory}Gtype16/prob17a.eps
25 ## Values needing defined:
26 ## prob_val (number, e.g. /LET prob_val=1)
27 ## prob_try (number, e.g. /LET prob_try=5)
28 ##
30 ## by: Patrick D. Freivald, patrick@freivald.org
31 ##
32 ## **************************************
33 ##
34 $mass_girl = random( 30.0 , 50.0 , 1.0 ) ; 35$mass_wagon = random( 5.0   , 15.0   , 1.0   )   ;
36 $mass_weights = random( 12.5 , 0.5 *$mass_girl   , 0.5   )   ;
37 $vrel = random( 2.5 , 10.0 , 0.5 ) ; 38$p_initial = 0.0   ;
39 $p_final =$p_initial   ;
40 $p_weights = 2.0 *$mass_weights * ( -1.0 * $vrel ) ; 41$p_girl = $p_final -$p_weights   ;
42 $v_girl =$p_girl /  ( $mass_girl +$mass_wagon    )   ;
43 $p_weight_1 =$mass_weights * ( -1.0 * $vrel ) ; 44$p_girl_1 = $p_final -$p_weight_1   ;
45 $v_girl_1 =$p_girl_1 /  ( $mass_girl +$mass_wagon  + $mass_weights ) ; 46$p_weight_2 = $mass_weights * ($v_girl_1  - $vrel ) ; 47$p_girl_2 = $p_girl_1 -$p_weight_2   ;
48 $v_girl_2 =$p_girl_2 /  ( $mass_girl +$mass_wagon    )   ;
49 ##
50 CAPA_import( " ${CAPA_Tools}Problem " ); 51 TEXT(CAPA_EV (<<'END_OF_TEXT')); 52 A \{ spf($mass_girl    , "%0.0f" ) \}-\{ $kg_u \} girl stands on a \{ spf($mass_wagon    , "%0.0f" ) \}-\{ $kg_u \} wagon holding two \{ spf($mass_weights    , "%0.1f" ) \}-\{ $kg_u \} weights. She throws the weights horizontally off the back of the wagon at a speed of \{ spf($vrel    , "%0.1f" ) \} \{ $mPs_u \} relative to herself.$BR
53 \{ CAPA_web( ''  , '\noindent {\centerline {\epsfxsize 2.0in \epsffile{${CAPA_GraphicsDirectory}Gtype16/prob17a.eps}}}' , '<img src =${CAPA_Graphics_URL}Gtype16/prob17a.gif align=center width=500>'  )  \}
54 $BR$BR Assuming that the wagon was at rest initially, what is the speed of the girl after she throws both weights at the same time?
55 END_OF_TEXT
56
57 ##
58
59 TEXT("$BR",ans_rule(30),"$BR");
60 ANS( CAPA_ans( $v_girl , 'format' => "%0.2e" , 'sig' => '3 PLUS 13', 'reltol' => 1 , 'wgt' =>$prob_val    ,  'tries' => $prob_try , 'unit' => 'm/s' ) ); 61 ## ************************************* 62 ## 63 ## Conservation of linear momentum 64 ## By Frank L. H. Wolfs, Wolfs@nsrl.rochester.edu 65 ## No unauthorized commercial use 66 ## Imported Files 67 ##${CAPA_Tools}Problem
68 ## ${CAPA_GraphicsDirectory}Gtype16/prob17a.eps 69 ## Values needing defined: 70 ## prob_val (number, e.g. /LET prob_val=1) 71 ## prob_try (number, e.g. /LET prob_try=5) 72 ## 73 ## Last modified 07/21/97 74 ## by: Patrick D. Freivald, patrick@freivald.org 75 ## 76 ## ************************************** 77 ## 78 CAPA_import( "${CAPA_Tools}Problem " );
79 TEXT(CAPA_EV (<<'END_OF_TEXT'));
80 $BR Assuming that the wagon was at rest initially, what is the speed with which the girl will move after she throws the weights one at a time, each with a speed of \{ spf($vrel    , "%0.1f" ) \} \{ $mPs_u \} relative to herself? 81 END_OF_TEXT 82 83 ## 84 85 TEXT("$BR",ans_rule(30),"$BR"); 86 ANS( CAPA_ans($v_girl_2   , 'format' => "%0.2e" , 'sig' => '3 PLUS 13', 'reltol' => 1   ,  'wgt' => $prob_val , 'tries' =>$prob_try    ,  'unit' => 'm/s'    ) );
87 ENDDOCUMENT();
88 #####################
89
90 ###Error: $kg_u not defined in this file 91 ###Error:$kg_u not defined in this file
92 ###Error: $kg_u not defined in this file 93 ###Error:$mPs_u not defined in this file
94 ###Error: $prob_val not defined in this file 95 ###Error:$prob_try not defined in this file
96 ###Error: $mPs_u not defined in this file 97 ###Error:$prob_val not defined in this file
98 ###Error: \$prob_try not defined in this file
99
100 #####################
101
102
103 #################################################
104 ## Processing time =  1 secs ( 0.87 usr  0.00 sys =  0.87 cpu)
105 #################################################