Skip to content

Commit

Permalink
Merge pull request openwebwork#594 from jirilebl/tomo
Browse files Browse the repository at this point in the history
Change a problem to MathObjects to improve output
  • Loading branch information
jwj61 authored Sep 18, 2019
2 parents 77de34b + 6023551 commit d717f3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OpenProblemLibrary/Michigan/Chap20Sec2/Q37.pg
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ surface per unit of time.

$PAR
${BBOLD}(a)$EBOLD
Suppose that the actual heat generation is \($r \mbox{W}/\mbox{km}^3\)
Suppose that the actual heat generation is \($r \mbox{W}/\mbox{km}^3\).
What is the value of \(\mbox{div }\vec F \)?
$BR
\(\mbox{div }\vec F = \) \{ ans_rule(25) \}
Expand Down
15 changes: 12 additions & 3 deletions OpenProblemLibrary/Rochester/setVectorCalculus3/ur_vc_13_3.pg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Date(6/3/2002)
## MLT(Divergence_sphere_constant_div)
## Level(2)
## MO(1)
## TitleText1('Calculus: Early Transcendentals')
## AuthorText1('Stewart')
## EditionText1('5')
Expand All @@ -29,6 +30,7 @@ DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
"MathObjects.pl",
"PGcourse.pl"
);

Expand All @@ -40,15 +42,22 @@ $b = random(1, 5, 1);
$c = random(1, 5, 1);
$d = $a**2;

Context("Vector");

$v = Compute("-y*i+x*j+$b*z*k")->reduce;
$ans = Compute("(4*$b*$c*$d*$a*pi)/3");

Context()->texStrings;
BEGIN_TEXT
A fluid has density $c and velocity field
\( \mathbf{v} = -y\mathbf{i} + x\mathbf{j} + $b\!z\mathbf{k} \).$BR
\( \mathbf{v} = $v \).$PAR
Find the rate of flow outward through the sphere
\( x^{2} + y^{2} + z^{2} = $d \)
\( x^{2} + y^{2} + z^{2} = $d \):
$PAR
\{ ans_rule(40) \}
END_TEXT
Context()->normalStrings;

ANS(num_cmp( (4*$b*$c*$d*$a*3.14159)/3 ) );
ANS($ans->cmp());

ENDDOCUMENT(); # This should be the last executable line in the problem.

0 comments on commit d717f3b

Please sign in to comment.