diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob1.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob1.pg
index b346736481..96aaf01217 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob1.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob1.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/7/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -84,4 +84,3 @@ ANS(num_cmp($ans3, strings=>["I", "-I", "DNE"]));
ANS(num_cmp($ans4, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob11.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob11.pg
index d525cc6c4c..fa8b5560d3 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob11.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob11.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/10/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -72,4 +72,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob12.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob12.pg
index 47118d7f47..290a6abad0 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob12.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob12.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/10/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -73,4 +73,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob13.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob13.pg
index 8d312aa0b6..ad66b6de16 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob13.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob13.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/10/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -73,4 +73,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob14.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob14.pg
index 0d71cad57f..ef65f1e1aa 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob14.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob14.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/10/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -73,4 +73,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob2.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob2.pg
index 53a3d031c4..e7c85ce839 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob2.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob2.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/7/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -72,4 +72,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob3.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob3.pg
index 1593010b13..ceadc052b6 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob3.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob3.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/7/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -71,4 +71,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob4.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob4.pg
index f36e400085..58596856e8 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob4.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob4.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/7/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -73,4 +73,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob8.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob8.pg
index acf3f71059..f5be23f618 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob8.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob8.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/7/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -72,4 +72,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob9.pg b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob9.pg
index 50875916e2..783fb01a35 100644
--- a/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob9.pg
+++ b/Contrib/AlfredUniv/anton8e/chapter2/2.3/prob9.pg
@@ -13,7 +13,7 @@
## DBsubject('Calculus')
## DBchapter('Limits and Derivatives')
-## DBsection('Limts at Infinity; Horizontal Asymptotes')
+## DBsection('Limits at Infinity; Horizontal Asymptotes')
## Date('6/10/2008')
## Author('Addison Frey')
## Institution('Alfred University')
@@ -33,7 +33,7 @@ loadMacros(
"MathObjects.pl",
"PGcourse.pl"
);
-
+
## Show partial correct answers
$showPartialCorrectAnswers = 1;
## Display the problem information
@@ -72,4 +72,3 @@ ANS(num_cmp($ans1, strings=>["I", "-I", "DNE"]));
ENDDOCUMENT();
-
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/12.Fluid_Dynamics_and_Medical_Applications/12-04.Viscosity_and_Laminar_Flow.Poiseuilles_Law/NU_U17_12_04_011.pg b/Contrib/BrockPhysics/College_Physics_Urone/12.Fluid_Dynamics_and_Medical_Applications/12-04.Viscosity_and_Laminar_Flow.Poiseuilles_Law/NU_U17_12_04_011.pg
index 541cca6c21..8526711c11 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/12.Fluid_Dynamics_and_Medical_Applications/12-04.Viscosity_and_Laminar_Flow.Poiseuilles_Law/NU_U17_12_04_011.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/12.Fluid_Dynamics_and_Medical_Applications/12-04.Viscosity_and_Laminar_Flow.Poiseuilles_Law/NU_U17_12_04_011.pg
@@ -61,7 +61,7 @@ $PAR
END_TEXT
BEGIN_HINT
-Begin by identifying the forces acting on the ball thorugh its descent (there are three). Recall that an object falls at its terminal speed when there is no longer an imbalance of forces in the vertical direction, and recall further that the drag force on an object in a medium denser than air is given by Stokes's law.
+Begin by identifying the forces acting on the ball through its descent (there are three). Recall that an object falls at its terminal speed when there is no longer an imbalance of forces in the vertical direction, and recall further that the drag force on an object in a medium denser than air is given by Stokes's law.
END_HINT
Context() -> normalStrings;
@@ -69,4 +69,4 @@ Context() -> normalStrings;
ANS(num_cmp("$n"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/13.Temperature_Kinetic_Theory_and_the_Gas_Laws/The_Ideal_Gas_Law/NU_U17-13-03-006.pg b/Contrib/BrockPhysics/College_Physics_Urone/13.Temperature_Kinetic_Theory_and_the_Gas_Laws/The_Ideal_Gas_Law/NU_U17-13-03-006.pg
index 05160aafdf..69be705e50 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/13.Temperature_Kinetic_Theory_and_the_Gas_Laws/The_Ideal_Gas_Law/NU_U17-13-03-006.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/13.Temperature_Kinetic_Theory_and_the_Gas_Laws/The_Ideal_Gas_Law/NU_U17-13-03-006.pg
@@ -83,7 +83,7 @@ $PAR
END_TEXT
BEGIN_HINT
-Can you solve for the number of molecules per cubic micrometre using dimensional analsyis and your answer to part (a) above?
+Can you solve for the number of molecules per cubic micrometre using dimensional analysis and your answer to part (a) above?
END_HINT
ANS(num_cmp("$NVum"));
@@ -110,4 +110,4 @@ Context() -> normalStrings;
ANS(num_cmp("$distanceum"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-02.Temperature_and_Change/NU_U17_14_02_007.pg b/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-02.Temperature_and_Change/NU_U17_14_02_007.pg
index 5f5eb0c2ec..b238126424 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-02.Temperature_and_Change/NU_U17_14_02_007.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-02.Temperature_and_Change/NU_U17_14_02_007.pg
@@ -55,7 +55,7 @@ $PAR
END_TEXT
BEGIN_HINT
-Can you express the temperature change as independant functions of the masses of copper and water? If so, you can equate and rearrange these equations.
+Can you express the temperature change as independent functions of the masses of copper and water? If so, you can equate and rearrange these equations.
END_HINT
Context() -> normalStrings;
@@ -63,4 +63,4 @@ Context() -> normalStrings;
ANS(num_cmp("$ratio"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_009.pg b/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_009.pg
index 131dbbf935..a3cd33f23d 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_009.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_009.pg
@@ -40,8 +40,8 @@ $T2 = random(90,99,1);
$T1 = random(40,49,1);
$T = $T2-$T1;
$Lv = 2340;
-$M = ($T/$Lv)*((($mg*10**-3)*$cg)+(($mc*10**-3)*$cc)); #Don't bother converting Lv - you will
- #mulitply and divide by 1000 to find grams.
+$M = ($T/$Lv)*((($mg*10**-3)*$cg)+(($mc*10**-3)*$cc)); #Don't bother converting Lv - you will
+ #multiply and divide by 1000 to find grams.
Context() -> texStrings;
BEGIN_TEXT
@@ -71,4 +71,4 @@ Context() -> normalStrings;
ANS(num_cmp("$M"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_013.pg b/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_013.pg
index d45f08f92d..2a27537550 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_013.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/14.Heat_and_Heat_Transfer/14-03.Phase_Change/NU_U17_14_03_013.pg
@@ -42,14 +42,14 @@ $T = 25;
$Q = ($mal*$cal*$T)+($ms*$cs*$T); #heat removed to bring soup and aluminum to zero Celsius
$Q1 = ($ms*$Lf)+$Q; #heat removed to freeze soup
$Q11 = 377000-$Q1; #heat remaining to further cool aluminum and frozen soup
-$Tf = (-$Q11)/(($mal*$cal)+($ms*$ci));
+$Tf = (-$Q11)/(($mal*$cal)+($ms*$ci));
Context() -> texStrings;
BEGIN_TEXT
$PAR
-If you do not answer this probelm correctly in $showHint attempts, you can get a hint.
+If you do not answer this problem correctly in $showHint attempts, you can get a hint.
$PAR
@@ -71,4 +71,4 @@ Context() -> normalStrings;
ANS(num_cmp("$Tf"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/19.Electric_Potential_and_Electric_Field/19-01.Electric_Potential_Energy_Potential_Difference/NU_U17_19_01_008.pg b/Contrib/BrockPhysics/College_Physics_Urone/19.Electric_Potential_and_Electric_Field/19-01.Electric_Potential_Energy_Potential_Difference/NU_U17_19_01_008.pg
index b1ac870351..02c898d50b 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/19.Electric_Potential_and_Electric_Field/19-01.Electric_Potential_Energy_Potential_Difference/NU_U17_19_01_008.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/19.Electric_Potential_and_Electric_Field/19-01.Electric_Potential_Energy_Potential_Difference/NU_U17_19_01_008.pg
@@ -66,7 +66,7 @@ $PAR
$PAR
-Integrated Concepts: A \($voltage\) \(\textrm{V}\) battery-operated bottle warmer heats \($massglass\) \(\textrm{g}\) of glass, \($masswater \times 10^{2}\) \(\textrm{g}\) of baby formula, and \($massalu \times 10^{2}\) \(\textrm{g}\) of aluminum from \($temp1^{\circ}\textrm{C}\) to \($temp2^{\circ}\textrm{C}\). Assume the baby forumula has the same thermal properties as water.
+Integrated Concepts: A \($voltage\) \(\textrm{V}\) battery-operated bottle warmer heats \($massglass\) \(\textrm{g}\) of glass, \($masswater \times 10^{2}\) \(\textrm{g}\) of baby formula, and \($massalu \times 10^{2}\) \(\textrm{g}\) of aluminum from \($temp1^{\circ}\textrm{C}\) to \($temp2^{\circ}\textrm{C}\). Assume the baby formula has the same thermal properties as water.
$PAR
@@ -107,4 +107,4 @@ Context() -> normalStrings;
ANS(num_cmp("$electrons"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/21.Circuits_and_DC_Instruments/21-06.DC_Circuits_Containing_Resistors_and_Capacitors/NU_U17_21_06_010.pg b/Contrib/BrockPhysics/College_Physics_Urone/21.Circuits_and_DC_Instruments/21-06.DC_Circuits_Containing_Resistors_and_Capacitors/NU_U17_21_06_010.pg
index 211490eb45..2df537ccb5 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/21.Circuits_and_DC_Instruments/21-06.DC_Circuits_Containing_Resistors_and_Capacitors/NU_U17_21_06_010.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/21.Circuits_and_DC_Instruments/21-06.DC_Circuits_Containing_Resistors_and_Capacitors/NU_U17_21_06_010.pg
@@ -48,7 +48,7 @@ BEGIN_TEXT
$PAR
$PAR
-If you do not answer this question correctly in $showHint attampts, you can get a hint.
+If you do not answer this question correctly in $showHint attempts, you can get a hint.
$PAR
$PAR
@@ -73,4 +73,4 @@ Context() -> normalStrings;
ANS(num_cmp("$timeSI"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/23.Electromagnetic_Induction_AC_Circuits_and_Electrical_Technologies/23-10.RL_Circuits/NU_U17_23_10_009.pg b/Contrib/BrockPhysics/College_Physics_Urone/23.Electromagnetic_Induction_AC_Circuits_and_Electrical_Technologies/23-10.RL_Circuits/NU_U17_23_10_009.pg
index 5559eb921e..d298ab23b2 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/23.Electromagnetic_Induction_AC_Circuits_and_Electrical_Technologies/23-10.RL_Circuits/NU_U17_23_10_009.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/23.Electromagnetic_Induction_AC_Circuits_and_Electrical_Technologies/23-10.RL_Circuits/NU_U17_23_10_009.pg
@@ -49,7 +49,7 @@ BEGIN_TEXT
$PAR
$PAR
-If you do not answer this question corrently in $showHint attempts, you can get a hint.
+If you do not answer this question currently in $showHint attempts, you can get a hint.
$PAR
$PAR
@@ -74,4 +74,4 @@ Context() -> normalStrings;
ANS(num_cmp("$time"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/25.Geometric_Optics/Dispersion_The_Rainbow_and_Prisms/NU_U17-25-05-008.pg b/Contrib/BrockPhysics/College_Physics_Urone/25.Geometric_Optics/Dispersion_The_Rainbow_and_Prisms/NU_U17-25-05-008.pg
index 49e1302764..5915a40265 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/25.Geometric_Optics/Dispersion_The_Rainbow_and_Prisms/NU_U17-25-05-008.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/25.Geometric_Optics/Dispersion_The_Rainbow_and_Prisms/NU_U17-25-05-008.pg
@@ -41,7 +41,7 @@ $theta_exit_violet_degrees = 55.23200585;
Context() -> texStrings;
BEGIN_TEXT
-\{ image( "NU_U17-25-05-008.png", width=>571, height=>307,
+\{ image( "NU_U17-25-05-008.png", width=>571, height=>307,
tex_size=>700, extra_html_tags=>'alt="Prismatic Refraction"' ) \}
$PAR
@@ -68,7 +68,7 @@ $PAR
END_TEXT
BEGIN_HINT
-Using geometry, can you relate the angle at which the light refracts into the prism (caluclated with Snell's law) to that at which it exits? It is imperative you work from a clear, precise diagram - do not be afraid to use a protractor. As a jumping-off point, try extending down the normals to the prism/light interfaces (one is shown in the figure - the dotted line) and measuring the angle formed by their intersection. What do you notice?
+Using geometry, can you relate the angle at which the light refracts into the prism (calculated with Snell's law) to that at which it exits? It is imperative you work from a clear, precise diagram - do not be afraid to use a protractor. As a jumping-off point, try extending down the normals to the prism/light interfaces (one is shown in the figure - the dotted line) and measuring the angle formed by their intersection. What do you notice?
END_HINT
Context() -> normalStrings;
@@ -77,4 +77,4 @@ ANS(num_cmp("$theta_red_exit_degrees"));
ANS(num_cmp("$theta_violet_exit_degrees"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/29.Introduction_to_Quantum_Physics/29-08.The_Particle_Wave_Duality_Reviewed/NU_U17_29_08_004.pg b/Contrib/BrockPhysics/College_Physics_Urone/29.Introduction_to_Quantum_Physics/29-08.The_Particle_Wave_Duality_Reviewed/NU_U17_29_08_004.pg
index eab0b6a7b2..5519d6152c 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/29.Introduction_to_Quantum_Physics/29-08.The_Particle_Wave_Duality_Reviewed/NU_U17_29_08_004.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/29.Introduction_to_Quantum_Physics/29-08.The_Particle_Wave_Duality_Reviewed/NU_U17_29_08_004.pg
@@ -53,7 +53,7 @@ $n = ($energySI/$energy_per_photonSI);
$timeSI = ($energySI/$powerSI);
Context() -> texStrings;
-BEGIN_TEXT
+BEGIN_TEXT
$PAR
$PAR
@@ -130,7 +130,7 @@ $PAR
END_TEXT
BEGIN_HINT
-Can you rearrange the definition of average power to solve for the time elasped?
+Can you rearrange the definition of average power to solve for the time elapsed?
END_HINT
Context() -> normalStrings;
@@ -138,4 +138,4 @@ Context() -> normalStrings;
ANS(num_cmp("$timeSI"));
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/BrockPhysics/College_Physics_Urone/4.Dynamics_Force_and_Newtons_Laws_of_Motion/Further_Applications_of_Newtons_Laws_of_Motion/NU_U17-04-07-001.pg b/Contrib/BrockPhysics/College_Physics_Urone/4.Dynamics_Force_and_Newtons_Laws_of_Motion/Further_Applications_of_Newtons_Laws_of_Motion/NU_U17-04-07-001.pg
index ffd8834595..49ed94d3fa 100644
--- a/Contrib/BrockPhysics/College_Physics_Urone/4.Dynamics_Force_and_Newtons_Laws_of_Motion/Further_Applications_of_Newtons_Laws_of_Motion/NU_U17-04-07-001.pg
+++ b/Contrib/BrockPhysics/College_Physics_Urone/4.Dynamics_Force_and_Newtons_Laws_of_Motion/Further_Applications_of_Newtons_Laws_of_Motion/NU_U17-04-07-001.pg
@@ -51,7 +51,7 @@ $PAR
Acceleration: \{ans_rule(40)\} \(\textrm{m/s}^2\)
$PAR
-Directon: \{ans_rule(40)\} degrees from the vertical
+Direction: \{ans_rule(40)\} degrees from the vertical
END_TEXT
@@ -63,4 +63,4 @@ Draw a free body diagram to assist you with evaluating the forces.
END_HINT
Context()->normalStrings;
-ENDDOCUMENT()
\ No newline at end of file
+ENDDOCUMENT()
diff --git a/Contrib/CCCS/AlgebraicLiteracy/Exponents/Evaluate_1.pg b/Contrib/CCCS/AlgebraicLiteracy/Exponents/Evaluate_1.pg
index 50e902ec83..0a832f77af 100644
--- a/Contrib/CCCS/AlgebraicLiteracy/Exponents/Evaluate_1.pg
+++ b/Contrib/CCCS/AlgebraicLiteracy/Exponents/Evaluate_1.pg
@@ -25,12 +25,12 @@ loadMacros(
"PGgraphmacros.pl",
"PGcourse.pl",
"contextFraction.pl",
-
+
);
##############################################
-#Evalute expressions with negative exponents. Answers must be fractions.
+#Evaluate expressions with negative exponents. Answers must be fractions.
Context("Fraction");
@@ -66,13 +66,13 @@ TEXT(beginproblem());
BEGIN_PGML
Evaluate each expression. Write your answers using fractions, rather than decimals.
-a) [`[$A]^{-[$n]} =`] [______]{$ans1}
+a) [`[$A]^{-[$n]} =`] [______]{$ans1}
b) [`[$C] \cdot [$B]^{-[$m]}`] [_______]{$ans2}
c) [``\frac{[$D]}{[$E]^{-[$a]}} = ``] [_______]{$ans3}
-
+
END_PGML
##############################################
@@ -83,4 +83,4 @@ END_PGML
#
#END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/CalculusTwo/07.4/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_4_252.pg b/Contrib/CCCS/CalculusTwo/07.4/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_4_252.pg
index 0a09ee18f0..82da20a01a 100644
--- a/Contrib/CCCS/CalculusTwo/07.4/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_4_252.pg
+++ b/Contrib/CCCS/CalculusTwo/07.4/CCD_CCCS_Openstax_Calc2_C1-2016-002_7_4_252.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Calculus 2, Find the points at which a polar curve has vertical or horizontal tangent lines
+## Calculus 2, Find the points at which a polar curve has vertical or horizontal tangent lines
## ENDDESCRIPTION
@@ -59,12 +59,12 @@ $theta_2h=Compute("3*(pi)/4")->reduce;
$r_1h = $r->eval(t=>$theta_1h);
$r_2h = $r->eval(t=>$theta_2h);
-##points at which slope is 0
+##points at which slope is 0
##Context("Point");
$p1h = Point($r_1h,$theta_1h);
$p2h = Point($r_2h,$theta_2h);
-##Answer horizonal
+##Answer horizontal
$L_h = List($p1h, $p2h);
##values of theta where tan line is vertical, 0<=thetareduce;
$r_1v = $r->eval(t=>$theta_1v);
$r_2v = $r->eval(t=>$theta_2v);
-##points at which slope is 0
+##points at which slope is 0
##Context("Point");
$p1v = Point($r_1v,$theta_1v);
$p2v = Point($r_2v,$theta_2v);
@@ -87,7 +87,7 @@ $L_v = List($p1v, $p2v);
BEGIN_PGML
-Using the fact that
+Using the fact that
[`\displaystyle\frac{dy}{dx}=\frac{ \frac{dy}{d\theta} }{ \frac{dx}{d\theta} } = \frac { \frac{dr}{d\theta}\sin(\theta)+r\cos(\theta) }{ \frac{dr}{d\theta}\cos(\theta)-r\sin(\theta) }`].
@@ -97,7 +97,7 @@ Only consider angles on the interval [`0\leq\theta<\pi`].
Enter your solution as a comma separated list of ordered pairs [`(a,b)`] or if there are no points on the curve at which the slope of the tangent is horizontal enter NONE.
-[_____________________________]{$L_h}[@ AnswerFormatHelp("points") @]*
+[_____________________________]{$L_h}[@ AnswerFormatHelp("points") @]*
Enter your answer as a comma separated list of polar points [`(r,\theta)`]
@@ -106,7 +106,7 @@ Only consider angles on the interval [`0\leq\theta<\pi`].
Enter your solution as a comma separated list of ordered pairs [`(a,b)`] or if there are no points on the curve at which the slope of the tangent is vertical enter NONE.
-[_____________________________]{$L_v}[@ AnswerFormatHelp("points") @]*Enter your answer as a comma separated list of polar points [`(r,\theta)`]
+[_____________________________]{$L_v}[@ AnswerFormatHelp("points") @]*Enter your answer as a comma separated list of polar points [`(r,\theta)`]
END_PGML
@@ -121,7 +121,7 @@ $theta_2h=Compute("pi/2")->reduce;
$r_1h = $r->eval(t=>$theta_1h);
$r_2h = $r->eval(t=>$theta_2h);
-##points at which slope is 0
+##points at which slope is 0
##Context("Point");
$p1h = Point($r_1h,$theta_1h);
$p2h = Point($r_2h,$theta_2h);
@@ -136,7 +136,7 @@ $theta_2v=Compute("(3*pi)/4")->reduce;
$r_1v = $r->eval(t=>$theta_1v);
$r_2v = $r->eval(t=>$theta_2v);
-##points at which slope is 0
+##points at which slope is 0
##Context("Point");
$p1v = Point($r_1v,$theta_1v);
$p2v = Point($r_2v,$theta_2v);
@@ -149,7 +149,7 @@ $L_v = List($p1v, $p2v);
BEGIN_PGML
-Using the fact that
+Using the fact that
[`\displaystyle\frac{dy}{dx}=\frac{ \frac{dx}{d\theta} }{ \frac{dy}{d\theta} } = \frac { \frac{dr}{d\theta}\sin(\theta)+r\cos(\theta) }{ \frac{dr}{d\theta}\cos(\theta)-r\sin(\theta) }`].
@@ -159,7 +159,7 @@ Only consider angles on the interval [`0\leq\theta<\pi`].
Enter your solution as a comma separated list of ordered pairs [`(a,b)`] or if there are no points on the curve at which the slope of the tangent is horizontal enter NONE.
-[_____________________________]{$L_h}[@ AnswerFormatHelp("points") @]*Enter your answer as a comma separated list of polar points [`(r,\theta)`]
+[_____________________________]{$L_h}[@ AnswerFormatHelp("points") @]*Enter your answer as a comma separated list of polar points [`(r,\theta)`]
@@ -168,7 +168,7 @@ Only consider angles on the interval [`0\leq\theta<\pi`].
Enter your solution as a comma separated list of ordered pairs [`(a,b)`] or if there are no points on the curve at which the slope of the tangent is vertical enter NONE.
-[_____________________________]{$L_v}[@ AnswerFormatHelp("points") @]*Enter your answer as a comma separated list of polar points [`(r,\theta)`]
+[_____________________________]{$L_v}[@ AnswerFormatHelp("points") @]*Enter your answer as a comma separated list of polar points [`(r,\theta)`]
END_PGML
@@ -182,4 +182,4 @@ END_PGML
COMMENT('Uses PGML.');
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Applications_Linear/Application_1.pg b/Contrib/CCCS/QuantitativeLiteracy/Applications_Linear/Application_1.pg
index bb715c6e9b..aa3594ffb3 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Applications_Linear/Application_1.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Applications_Linear/Application_1.pg
@@ -33,7 +33,7 @@ $showPartialCorrectAnswers = 1;
###########################
# Initialization
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -62,7 +62,7 @@ $ml = new_match_list();
$ml->rf_print_q(~~&pop_up_list_print_q);
$ml->ra_pop_up_list([
"No answer" => "?",
-"A" => "A", "B" => "B", "C" => "C",
+"A" => "A", "B" => "B", "C" => "C",
"D" => "D", "E" => "E", "F" => "F",
"G" => "G", "H" => "H", "I" => "I",
]);
@@ -88,7 +88,7 @@ $ml->extra(
"`$a/x`",
);
$ml->choose_extra(1);
-
+
$ml->makeLast("None of the above");
@@ -119,7 +119,7 @@ $ENV{'grader_message'} = "You can earn " .
#
# All or nothing grader
-#
+#
#install_problem_grader(~~&std_problem_grader);
#
ANS( str_cmp( $ml->ra_correct_ans ) );
@@ -144,7 +144,7 @@ Key words to look for:
*quotient* is division. The quotient of a number and [$a] is [`\frac{x}{[$a]}`].
-*twice* means mulitply by two. But attention to which word the 'twice applies to. For example:
+*twice* means multiply by two. But attention to which word the 'twice applies to. For example:
Twice the sum of a number and [$a] is [`2(x + [$a])`] because the twice applies to the entire sum.
@@ -155,4 +155,4 @@ END_PGML_SOLUTION
COMMENT('MathObject version. Uses PGML.');
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_1.pg b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_1.pg
index 31344defd1..5657e911b7 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_1.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_1.pg
@@ -29,7 +29,7 @@ loadMacros(
##############################################
-#Percent word problem
+#Percent word problem
Context("LimitedNumeric");
Context()->{format}{number} = "%.1f";
@@ -59,9 +59,9 @@ BEGIN_PGML
What percent of [$a] is [$b]? (Round your answer to the nearest tenth of a percent.)
- [________]{$ans}`%`
+ [________]{$ans}`%`
+
-
END_PGML
##############################################
@@ -77,7 +77,7 @@ We can set this problem up as a proportion or as an equation.
[``\frac{[$b]}{[$a]} = \frac{x}{100}``]
-Cross mulitply and solve:
+Cross multiply and solve:
[`[$a]x = [$b] \cdot 100`]
@@ -99,4 +99,4 @@ Move the decimal two places to the right to convert to a percent.
END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_2.pg b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_2.pg
index dd4239abbb..159fc9ecd0 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_2.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_2.pg
@@ -29,7 +29,7 @@ loadMacros(
##############################################
-#Percent word problem
+#Percent word problem
Context("LimitedNumeric");
Context()->{format}{number} = "%.1f";
@@ -59,7 +59,7 @@ BEGIN_PGML
[________]{$ans}
-
+
END_PGML
##############################################
@@ -75,7 +75,7 @@ We can set this problem up as a proportion or as an equation.
[``\frac{x}{[$b]} = \frac{[$a]}{100}``]
-Cross mulitply and solve:
+Cross multiply and solve:
[`100x = [$b] \cdot [$a]`]
@@ -94,4 +94,4 @@ Cross mulitply and solve:
END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_3.pg b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_3.pg
index 0e6c55b3f4..d88ef37b82 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_3.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_3.pg
@@ -29,7 +29,7 @@ loadMacros(
##############################################
-#Percent word problem
+#Percent word problem
Context("LimitedNumeric");
Context()->{format}{number} = "%.1f";
@@ -60,7 +60,7 @@ BEGIN_PGML
[________]{$ans}
-
+
END_PGML
##############################################
@@ -76,7 +76,7 @@ We can set this problem up as a proportion or as an equation.
[``\frac{[$b]}{x} = \frac{[$a]}{100}``]
-Cross mulitply and solve:
+Cross multiply and solve:
[`[$a]x = [$b] \cdot 100`]
@@ -94,4 +94,4 @@ Cross mulitply and solve:
END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_4.pg b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_4.pg
index 9c1791046c..0d98d2db2b 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_4.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_4.pg
@@ -29,7 +29,7 @@ loadMacros(
##############################################
-#Percent word problem
+#Percent word problem
Context("LimitedNumeric");
Context()->{format}{number} = "%.1f";
@@ -58,9 +58,9 @@ BEGIN_PGML
[$b] is what percent of [$a]? (Round your answer to the nearest tenth of a percent.)
- [________]{$ans}`%`
+ [________]{$ans}`%`
+
-
END_PGML
##############################################
@@ -76,7 +76,7 @@ We can set this problem up as a proportion or as an equation.
[``\frac{[$b]}{[$a]} = \frac{x}{100}``]
-Cross mulitply and solve:
+Cross multiply and solve:
[`[$a]x = [$b] \cdot 100`]
@@ -97,4 +97,4 @@ Move the decimal two places to the right to convert to a percent.
[`x = [$aprint]`]%
END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_5.pg b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_5.pg
index 26e10db8c4..35e20b1ec2 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_5.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_5.pg
@@ -29,7 +29,7 @@ loadMacros(
##############################################
-#Percent word problem
+#Percent word problem
Context("LimitedNumeric");
Context()->{format}{number} = "%.1f";
@@ -59,7 +59,7 @@ What is [$a]% of [$b]? (Round your answer to the nearest tenth.)
[________]{$ans}
-
+
END_PGML
##############################################
@@ -75,7 +75,7 @@ We can set this problem up as a proportion or as an equation.
[``\frac{x}{[$b]} = \frac{[$a]}{100}``]
-Cross mulitply and solve:
+Cross multiply and solve:
[`100x = [$b] \cdot [$a]`]
@@ -94,4 +94,4 @@ Cross mulitply and solve:
END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_6.pg b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_6.pg
index 70c4e2cd56..219495db69 100644
--- a/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_6.pg
+++ b/Contrib/CCCS/QuantitativeLiteracy/Percents/Percent_Word_Problem_6.pg
@@ -29,7 +29,7 @@ loadMacros(
##############################################
-#Percent word problem
+#Percent word problem
Context("LimitedNumeric");
Context()->{format}{number} = "%.1f";
@@ -60,7 +60,7 @@ BEGIN_PGML
[________]{$ans}
-
+
END_PGML
##############################################
@@ -76,7 +76,7 @@ We can set this problem up as a proportion or as an equation.
[``\frac{[$b]}{x} = \frac{[$a]}{100}``]
-Cross mulitply and solve:
+Cross multiply and solve:
[`[$a]x = [$b] \cdot 100`]
@@ -94,4 +94,4 @@ Cross mulitply and solve:
END_PGML_SOLUTION
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CUNY/CityTech/CollegeAlgebra_Trig/HigherRoots/alg-roots-perfect-mixed-mono1.pg b/Contrib/CUNY/CityTech/CollegeAlgebra_Trig/HigherRoots/alg-roots-perfect-mixed-mono1.pg
index 00447473b8..b90a3d8500 100644
--- a/Contrib/CUNY/CityTech/CollegeAlgebra_Trig/HigherRoots/alg-roots-perfect-mixed-mono1.pg
+++ b/Contrib/CUNY/CityTech/CollegeAlgebra_Trig/HigherRoots/alg-roots-perfect-mixed-mono1.pg
@@ -14,7 +14,7 @@
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl", # Standard macros for PG language
@@ -94,7 +94,7 @@ Context()->normalStrings;
#
ANS($ans->cmp->withPostFilter(AnswerHints(
- sub {
+ sub {
my ($correct,$student,$ans) = @_;
return ( $student != $correct && $student == Compute("x^$m y^$n") );
} => "Be careful with your even and odd powers!"
@@ -126,9 +126,9 @@ $PAR
But this is only correct for \( x \geq 0 \) and \( y \geq 0 \). $BR
We must also consider what happens when \(x\) and \(y\) are negative...
$BR
-\( \sqrt{x^{$m2}} \) and \( \sqrt{y^{$n2}} \) are $BITALIC always $EITALIC postitive for ALL values of \( x \) and \( y \).
+\( \sqrt{x^{$m2}} \) and \( \sqrt{y^{$n2}} \) are $BITALIC always $EITALIC positive for ALL values of \( x \) and \( y \).
$PAR
-Notice first that \( $pos \) is also positive for all values of \( $varPos \),
+Notice first that \( $pos \) is also positive for all values of \( $varPos \),
$BR
so we're correct in saying \( \sqrt{$posRad} = $pos \).
$PAR
@@ -150,4 +150,4 @@ Context()->normalStrings;
COMMENT("Funded by US DoE Title V: Opening Gateways grant.");
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/CUNY/CityTech/Precalculus/setOperationsonFunctions/functions-composition-domain-sqrt-linear.pg b/Contrib/CUNY/CityTech/Precalculus/setOperationsonFunctions/functions-composition-domain-sqrt-linear.pg
index 0716ef0c5b..d062475bb3 100644
--- a/Contrib/CUNY/CityTech/Precalculus/setOperationsonFunctions/functions-composition-domain-sqrt-linear.pg
+++ b/Contrib/CUNY/CityTech/Precalculus/setOperationsonFunctions/functions-composition-domain-sqrt-linear.pg
@@ -1,5 +1,5 @@
##DESCRIPTION
-##
+##
##ENDDESCRIPTION
##KEYWORDS('algebra', 'function', 'input', 'output', 'domain', 'rational function', 'radical function', 'operations')
@@ -15,7 +15,7 @@
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl", # Standard macros for PG language
@@ -60,7 +60,7 @@ $gB = -1*random(2,5,1);
#$gC = abs($fC)-$DoS;
$g = Formula("($gB x + $gC)")->reduce;
-# define the compositions as already simplified
+# define the compositions as already simplified
$gOffX = Formula("$gB*sqrt($fB x + $fC)+$gC")->reduce;
$fOfgX = Formula("sqrt(($fB)*($gB) x+($fB*$gC+$fC))")->reduce;
@@ -113,7 +113,7 @@ END_PGML
BEGIN_PGML_HINT
-**To find the composition**
+**To find the composition**
* What is the _function_ you want to evaluate?
* What is the _input_?
@@ -124,7 +124,7 @@ BEGIN_PGML_HINT
* Find all [`x`]'s for which you can calculate the _input_.
* Find all [`x`]'s for which the _input_ belongs to the domain of the _function_.
* Find all [`x`]'s satisfying each one of the above restrictions.
-* Do not use your algebraic simplication for the composition to find its domain.
+* Do not use your algebraic simplification for the composition to find its domain.
END_PGML_HINT
@@ -135,7 +135,7 @@ END_PGML_HINT
#
#
-$gevalf = ($gB == 0)? "$gA (f(x))^2 + $gC" :
+$gevalf = ($gB == 0)? "$gA (f(x))^2 + $gC" :
"$gA(f(x))^2 + $gB (f(x)) + $gC";
$gevalff = "$gB (f(x)) + $gC";
@@ -152,20 +152,20 @@ $anssolut = ($fRoot - $gC)/$gB;
BEGIN_PGML_SOLUTION
-a. We have that [` (g \circ f)(x) = g(f(x))`] is the evaluation of the function [`g(x)`] for the input [`f(x)`].
-
- >> [`g(x) = \displaystyle{[$g]} \quad\underset{x\;\rightarrow\; f(x)}\implies\quad g(f(x)) = \displaystyle{[$gevalff]} `] <<
-
- >> [`\quad\underset{f(x)=[$f]}=\quad \displaystyle{[$geval]} \quad =\quad \displaystyle{[$gOffX]}`] <<
-
- So [` (g \circ f)(x) = \displaystyle{[$gOffX]}`].
+a. We have that [` (g \circ f)(x) = g(f(x))`] is the evaluation of the function [`g(x)`] for the input [`f(x)`].
+
+ >> [`g(x) = \displaystyle{[$g]} \quad\underset{x\;\rightarrow\; f(x)}\implies\quad g(f(x)) = \displaystyle{[$gevalff]} `] <<
+
+ >> [`\quad\underset{f(x)=[$f]}=\quad \displaystyle{[$geval]} \quad =\quad \displaystyle{[$gOffX]}`] <<
+
+ So [` (g \circ f)(x) = \displaystyle{[$gOffX]}`].
b. We will start by finding the domains of [`f(x)`] and [`g(x)`]. For [`f(x) = [$f]`], we need
>>[`[$fC]+[$fB] x \geq 0 \quad\implies\quad x [$ineq] [$fRoot]`].<<
So the domain of [`f(x)`] is [`\left(-\infty,[$fRoot]\right]`]. The function [`g(x) = [$g]`] is a linear function, so the domain of [`g(x)`] is [`(-\infty,\infty)`].
-
+
To find the domain of [`(g \circ f)(x)=g(f(x))`], we need to find all [`x`]'s for which:
[`\qquad (i)`] the input [`f(x)`] can be evaluated, that is, [`x`] is in the domain of [`f(x)`], which is [`\left(-\infty,[$fRoot]\right]`];
@@ -173,7 +173,7 @@ b. We will start by finding the domains of [`f(x)`] and [`g(x)`]. For [`f(x) = [
[`\qquad (ii)`] the output [`g(f(x))`] can be evaluated, that is, [`f(x)`] is in the domain of [`g(x)`]. Since the domain of [`g(x)`] is [`(-\infty,\infty)`], this condition is always satisfied.
We conclude that the domain of [` (g \circ f)(x)`] is [`\left(-\infty,[$fRoot]\right]`].
-
+
c. We have that [` (f \circ g)(x) = f(g(x))`] is the evaluation of the function [`f(x)`] for the input [`g(x)`].
@@ -184,19 +184,19 @@ c. We have that [` (f \circ g)(x) = f(g(x))`] is the evaluation of the function
\quad =\quad \displaystyle{[$fOfgX]}`] <<
So [`(f\circ g)(x) = \displaystyle{[$fOfgX]}`].
-
+
d. To find the domain of [`(f \circ g)(x)=f(g(x))`], we need to find all [`x`]'s for which:
[`\qquad (i)`] the input [`g(x)`] can be evaluated, that is, [`x`] is in the domain of [`g(x)`], which is [`(-\infty,\infty)`]; and
[`\qquad (ii)`] the output [`f(g(x))`] can be evaluated, that is, [`g(x)`] is in the domain of [`f(x)`]. Since the domain of [`f(x)`] is [`\left(-\infty,[$fRoot]\right]`], we need:
-
+
>>[`g(x) [$ineq] \displaystyle{[$fRoot]} \quad\underset{g(x)= [$g]}\implies\quad [$g][$ineq] \displaystyle{[$fRoot]}`] <<
-
+
>> [`\quad\implies\quad \displaystyle{[$gB]}\cdot x \leq \displaystyle{[$fRoot - $gC]} \quad\underset{\text{change sign!}}\implies\quad x \displaystyle{[$ineqsolut]}\displaystyle{[$anssolut]} `] <<
-
+
The domain of [`(f\circ g)(x)`] is [`\left[[$fOfgRoot1], \infty\right)`].
END_PGML_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-2_EquationsOfMotion/20-P-FA-NW-003.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-2_EquationsOfMotion/20-P-FA-NW-003.pg
index 3b85c03f2f..a04b18a1c6 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-2_EquationsOfMotion/20-P-FA-NW-003.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-2_EquationsOfMotion/20-P-FA-NW-003.pg
@@ -1,29 +1,29 @@
## DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -60,7 +60,7 @@ $imgScale = .7;
$width = $imgScale*711;
$height = $imgScale*263;
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -93,7 +93,7 @@ $deceleration = random(10,15,1);
$acceleration = -$deceleration;
-#computation
+#computation
$Flift = $Fweight*cos($theta);
$FthrustA = $Fdrag + $Fweight * sin($theta);
$FthrustB = $Fdrag + $Fweight * sin($theta) + $acceleration*$Fweight/32.2;
@@ -104,7 +104,7 @@ tolerance=>.002);
##############################################################
#
-# Text
+# Text
#
#
@@ -118,12 +118,12 @@ The lift force acts in the [`y'`] direction. The weight acts in the negative [`
*a)* If [`\theta = [$thetadeg] ^{\circ}`], determine the thrust and lift forces required to maintain this speed and trajectory.
-[`F_T=`] [_____]{"$FthrustA"} [`lb`]
-[`F_L=`] [_____]{"$Flift"} [`lb`]
+[`F_T=`] [_____]{"$FthrustA"} [`lb`]
+[`F_L=`] [_____]{"$Flift"} [`lb`]
-*b)* Suppose the plane then starts deccelerating at [`[$deceleration]`] [`ft/s^2`] because an engine fails. What thrust force would the plane be attaining in this scenario?
+*b)* Suppose the plane then starts decelerating at [`[$deceleration]`] [`ft/s^2`] because an engine fails. What thrust force would the plane be attaining in this scenario?
-[`F_T=`] [_____]{"$FthrustB"} [`lb`]
+[`F_T=`] [_____]{"$FthrustB"} [`lb`]
END_PGML
@@ -136,4 +136,4 @@ END_PGML_SOLUTION
##############################################################
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-6_EoMCylindricalComponents/21-P-FA-GD-009.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-6_EoMCylindricalComponents/21-P-FA-GD-009.pg
index 25967ef698..e8951e0ab0 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-6_EoMCylindricalComponents/21-P-FA-GD-009.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-FA-13-6_EoMCylindricalComponents/21-P-FA-GD-009.pg
@@ -5,29 +5,29 @@
##DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -46,7 +46,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -60,7 +60,7 @@ loadMacros(
#"source.pl", # allows code to be displayed on certain sites.
#"PGcourse.pl", # Customization file for the course
);
-
+
TEXT(beginproblem());
##############################################################
@@ -104,7 +104,7 @@ tolType=>'relative');
##############################################################
#
-# PGML
+# PGML
#
#
@@ -112,7 +112,7 @@ BEGIN_PGML
You decide to go down the silde at your old elementary school. The slide is a spiral of constant radius [`[$r]`] [`m`] and you descend at a constant velocity.
-Your position as you descend the slide, measured from the top, is given by [`\theta = [$A]t`] [`rad`] and [`z = [$B]t`] [`m`], where t is the time elasped in [`seconds`].
+Your position as you descend the slide, measured from the top, is given by [`\theta = [$A]t`] [`rad`] and [`z = [$B]t`] [`m`], where t is the time elapsed in [`seconds`].
You have a mass of [`[$m]`] [`kg`] and your butt will be sore once you reach the bottom, if the force on you exceeds [`[$F]`] [`N`].
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-015.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-015.pg
index 9def401b99..8e29d1958b 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-015.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-015.pg
@@ -5,29 +5,29 @@
##DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -46,7 +46,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -60,7 +60,7 @@ loadMacros(
#"source.pl", # allows code to be displayed on certain sites.
#"PGcourse.pl", # Customization file for the course
);
-
+
TEXT(beginproblem());
@@ -99,7 +99,7 @@ tolType=>'relative');
##############################################################
#
-# PGML
+# PGML
#
#
@@ -107,7 +107,7 @@ BEGIN_PGML
You have been a castaway in your life raft for at least a week. Unfortunately, you have also been paddling in a circle of radius [`[$rB]`] [`m`] at [`[$vB]`] [`m/s`], because you only have one paddle.
-You hear a motor boat and you stop paddling, causing your raft to deccelerate at a rate of [`[$aBt]`] [`m/s^2`]. The motor boat is travelling in a circular path of radius [`[$rA]`] [`m`] at a distance of [`[$d]`] [`m`] away from you.
+You hear a motor boat and you stop paddling, causing your raft to decelerate at a rate of [`[$aBt]`] [`m/s^2`]. The motor boat is travelling in a circular path of radius [`[$rA]`] [`m`] at a distance of [`[$d]`] [`m`] away from you.
The boat is moving at [`[$vA]`] [`m/s`], and its speed is increasing at a rate of [`[$aAt]`] [`m/s^2`].
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-016.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-016.pg
index 2e385cbacc..ae75c0c5f5 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-016.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-10_RelativeMotion/21-P-KM-GD-016.pg
@@ -5,29 +5,29 @@
##DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -46,7 +46,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -60,7 +60,7 @@ loadMacros(
#"source.pl", # allows code to be displayed on certain sites.
#"PGcourse.pl", # Customization file for the course
);
-
+
TEXT(beginproblem());
@@ -91,7 +91,7 @@ tolType=>'relative');
##############################################################
#
-# PGML
+# PGML
#
#
@@ -99,7 +99,7 @@ BEGIN_PGML
There has been a break out at the Pliocene Park (Jurassic Park's less successful competitor park) and there are prehistoric mammals running amok! You are minding your own business, as you spot two mammoths running toward a large T-intersection.
-The larger mammoth (Labelled [`V`]) is running along the [`y`]-axis at approximately [`[$vV]`] [`km/h`], while the smaller mammoth (labelled [`C`]) is barreling toward the interection.
+The larger mammoth (Labelled [`V`]) is running along the [`y`]-axis at approximately [`[$vV]`] [`km/h`], while the smaller mammoth (labelled [`C`]) is barreling toward the intersection.
You notice a speed warning sign flashing at the smaller mammoth, reading [`[$vC]`] [`km/h`].
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-6_CurvilinearMotion/20-P-KM-AF-012.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-6_CurvilinearMotion/20-P-KM-AF-012.pg
index 1ac148c4b9..325c0d9d34 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-6_CurvilinearMotion/20-P-KM-AF-012.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-KM-12-6_CurvilinearMotion/20-P-KM-AF-012.pg
@@ -1,33 +1,33 @@
##DESCRIPTION
-## Vecotr components and breakdown in cartesian coordinates and transfer to position vectors
+## Vector components and breakdown in cartesian coordinates and transfer to position vectors
##ENDDESCRIPTION
##DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -58,7 +58,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -102,14 +102,14 @@ tolType=>'relative');
##############################################################
#
-# PGML
+# PGML
#
#
BEGIN_PGML
-If the particle starts at the origin and moves at a speed of [`v = [$A]`][`m/s`], what is the cartesian components if the it makes the angle [`\theta = [$B]^\circ`] to the [`x`]-axis in the [`x-y`] plane.
-and the angle [`\alpha = [$C]^\circ`] to the [`z`]- axis.
+If the particle starts at the origin and moves at a speed of [`v = [$A]`][`m/s`], what is the cartesian components if the it makes the angle [`\theta = [$B]^\circ`] to the [`x`]-axis in the [`x-y`] plane.
+and the angle [`\alpha = [$C]^\circ`] to the [`z`]- axis.
END_PGML
@@ -140,7 +140,7 @@ Context()->texStrings;
$BR
END_TEXT
Context()->normalStrings;
-
+
ANS($v->cmp);
ANS($p->cmp);
##############################################################
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-3_PrincipleOfWE/21-P-WE-AG-025.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-3_PrincipleOfWE/21-P-WE-AG-025.pg
index 417392d004..a3a14783d6 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-3_PrincipleOfWE/21-P-WE-AG-025.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-3_PrincipleOfWE/21-P-WE-AG-025.pg
@@ -1,33 +1,33 @@
##DESCRIPTION
-## Find the speed of a post package at the bottom of a conveyer belt and the max distance away the delivery truck can park
+## Find the speed of a post package at the bottom of a conveyor belt and the max distance away the delivery truck can park
##ENDDESCRIPTION
##DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -46,7 +46,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -94,7 +94,7 @@ tolType=>'relative');
##############################################################
#
-# PGML
+# PGML
#
#
diff --git a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-4_PowerAndEfficiency/21-P-WE-AG-033.pg b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-4_PowerAndEfficiency/21-P-WE-AG-033.pg
index ebafd499ea..5ecdb4f0ff 100644
--- a/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-4_PowerAndEfficiency/21-P-WE-AG-033.pg
+++ b/Contrib/DouglasCollege/Physics/Particle Dynamics/OER-Mechanics-P-WE-14-4_PowerAndEfficiency/21-P-WE-AG-033.pg
@@ -1,33 +1,33 @@
##DESCRIPTION
-## How fast is a conveyer belt lifting sulphur?
+## How fast is a conveyor belt lifting sulphur?
##ENDDESCRIPTION
##DESCRIPTION
##
## Created in collaboration between Douglas College Department of Physics and Astronomy
-## and the University of British Columbia (UBC) Department of Mechanical Engineering.
+## and the University of British Columbia (UBC) Department of Mechanical Engineering.
##
## Project led by Agnes d'Entremont and Jennifer Kirkey
##
## Contact: agnes.dentremont@mech.ubc.ca
## kirkeyj@douglascollege.ca
-##
##
-## This work, including related images, is licensed under the
+##
+## This work, including related images, is licensed under the
## Creative Commons Attribution 4.0 International (CC BY 4.0)
##
##
-## This work was supported by funding from the BCcampus
+## This work was supported by funding from the BCcampus
## Hewlett Foundation Funding (https://bccampus.ca/2021/04/07/hewlett-foundation-funding-announcement/).
## Common Core Curriculum Engineering Grant (https://www.bccat.ca/articulation/committees/engineering).
## ZTC (Zero Textbook Cost) Project for STEM (https://bccampus.ca/projects/open-education/zed-cred-z-degrees/ztc-open-educational-resources-for-stem/).
-## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
+## UBC OER Fund Implementation Grant (https://oerfund.open.ubc.ca/oer-implementation-grants/).
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
-## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
-## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
-## and the people of the Treaty 7 region of Southern Alberta.
+## territory of many peoples - specifically the Musqueam (xʷməθkʷəy̓əm), Squamish (Sḵwx̱wú7mesh),
+## Tsleil-Waututh (səl̓ilwətaɁɬ), QayQayt, Kwikwetlem, Kwantlen, Ktunaxa, Tsawwassen (sc̓əwaθenaɁɬ təməxʷ),
+## Chemainus (Stz'uminus), Stó:lō (S’ólh Téméxw), Kwanlin Dün, Niitsitapi (Blackfoot),
+## and the people of the Treaty 7 region of Southern Alberta.
##
## ENDDESCRIPTION
##
@@ -46,7 +46,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -93,7 +93,7 @@ tolType=>'relative');
##############################################################
#
-# PGML
+# PGML
#
#
@@ -101,7 +101,7 @@ BEGIN_PGML
[@ image( "21-P-WE-AG-033.png", width=>$width, height=>$height) @]*
-Port Moody has a very large sulphur processing facility. The sulphur is kept in large containers and transported around the site via long conveyer belts. Today, they are loading a ship, which means that the sulphur needs to be placed on the ship at a constant rate of [`[$R]\:\frac{kg}{min}`]. It takes [`[$T]\:minutes`] for the sulphur to get from the container to the ship up a [`[$thetad]\:degree`] slope. Given that the average power consumed by the electric motor running the conveyer shown above is [`[$P]\:watts`] and that the motor is [`[$E]%`] efficient, what is the constant speed at which the conveyer is moving?
+Port Moody has a very large sulphur processing facility. The sulphur is kept in large containers and transported around the site via long conveyor belts. Today, they are loading a ship, which means that the sulphur needs to be placed on the ship at a constant rate of [`[$R]\:\frac{kg}{min}`]. It takes [`[$T]\:minutes`] for the sulphur to get from the container to the ship up a [`[$thetad]\:degree`] slope. Given that the average power consumed by the electric motor running the conveyor shown above is [`[$P]\:watts`] and that the motor is [`[$E]%`] efficient, what is the constant speed at which the conveyor is moving?
[`v=`][_____]{"$v"}[`m/s`]
diff --git a/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_48_ia.pg b/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_48_ia.pg
index 615fd2b9d8..4de855f95a 100644
--- a/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_48_ia.pg
+++ b/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_48_ia.pg
@@ -4,14 +4,14 @@
## DBsubject('Intermediate Algebra')
## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
-## DBsection('Rational Expressions and Functions: Multipying and Dividing')
+## DBsection('Rational Expressions and Functions: Multiplying and Dividing')
## KEYWORDS('rational', 'expressions', 'exponents')
## Author('Rick Lynch')
## Institution('University of Missouri-Columbia')
###########################################################################
-# initialization
+# initialization
###########################################################################
DOCUMENT();
loadMacros(
@@ -28,7 +28,7 @@ $showPartialCorrectAnswers = 1;
###########################################################################
-# setup contexts and variables
+# setup contexts and variables
###########################################################################
Context("Numeric");
@vars = ("x","y","z","s","t");
@@ -49,7 +49,7 @@ Context()->operators->undefine("^","*","+","-");
###########################################################################
-# state the problem
+# state the problem
###########################################################################
Context()->texStrings;
BEGIN_TEXT
@@ -66,7 +66,7 @@ END_TEXT
###########################################################################
-# check the answer
+# check the answer
###########################################################################
ANS(Compute($ans)->cmp());
@@ -87,7 +87,7 @@ if ($attempts_modp == 0 && $actualAttempts != 0) {
END_TEXT
}
Context()->normalStrings;
-PeriodicStatus();
+PeriodicStatus();
COMMENT('Features Periodic Rerandomization');
ENDDOCUMENT();
diff --git a/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_58_ia.pg b/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_58_ia.pg
index f0f4c7bfbe..315198d5b3 100644
--- a/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_58_ia.pg
+++ b/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_58_ia.pg
@@ -4,7 +4,7 @@
## DBsubject('Intermediate Algebra')
## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
-## DBsection('Rational Expressions and Functions: Multipying and Dividing')
+## DBsection('Rational Expressions and Functions: Multiplying and Dividing')
## KEYWORDS('rational', 'expressions', 'exponents')
## Author('Rick Lynch, Patrick Spencer')
## Institution('University of Missouri-Columbia')
diff --git a/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_three_parts_02_ia.pg b/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_three_parts_02_ia.pg
index 43c5c802ad..cca432b95e 100644
--- a/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_three_parts_02_ia.pg
+++ b/Contrib/Mizzou/Algebra/exponents_integers/exp_ints_three_parts_02_ia.pg
@@ -4,14 +4,14 @@
## DBsubject('Intermediate Algebra')
## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
-## DBsection('Rational Expressions and Functions: Multipying and Dividing')
+## DBsection('Rational Expressions and Functions: Multiplying and Dividing')
## KEYWORDS('rational', 'expressions', 'exponents')
## Author('Rick Lynch')
## Institution('University of Missouri-Columbia')
###########################################################################
-# initialization
+# initialization
###########################################################################
DOCUMENT();
loadMacros(
@@ -28,7 +28,7 @@ $showPartialCorrectAnswers = 1;
###########################################################################
-# setup contexts and variables
+# setup contexts and variables
###########################################################################
Context("Numeric");
$a = random(2,9);
@@ -54,7 +54,7 @@ $ans3 = $answers[$c13+$c3];
###########################################################################
-# state the problem
+# state the problem
###########################################################################
Context()->texStrings;
BEGIN_TEXT
@@ -69,7 +69,7 @@ END_TEXT
###########################################################################
-# check the answer
+# check the answer
###########################################################################
Context("Numeric")->operators->undefine("*","+","-");
LimitedPowers::OnlyPositiveIntegers();
@@ -94,7 +94,7 @@ if ($attempts_modp == 0 && $actualAttempts != 0) {
END_TEXT
}
Context()->normalStrings;
-PeriodicStatus();
+PeriodicStatus();
COMMENT('Features Periodic Rerandomization');
ENDDOCUMENT();
diff --git a/Contrib/Mizzou/Algebra/rational_expressions_canceling/cancel_04_ia.pg b/Contrib/Mizzou/Algebra/rational_expressions_canceling/cancel_04_ia.pg
index dec8be1357..aded27cea6 100644
--- a/Contrib/Mizzou/Algebra/rational_expressions_canceling/cancel_04_ia.pg
+++ b/Contrib/Mizzou/Algebra/rational_expressions_canceling/cancel_04_ia.pg
@@ -4,7 +4,7 @@
## DBsubject('Intermediate Algebra')
## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
-## DBsection('Rational Expressions and Functions: Multipying and Dividing')
+## DBsection('Rational Expressions and Functions: Multiplying and Dividing')
## KEYWORDS('rational','expressions')
## Author('Rick Lynch')
## Institution('University of Missouri-Columbia')
@@ -30,7 +30,7 @@ $showPartialCorrectAnswers = 1;
###########################################################################
-# setup contexts and variables
+# setup contexts and variables
###########################################################################
Context("Numeric");
@vars = ("x","y","z","s","r","t","a","b","c");
@@ -81,8 +81,8 @@ $multians = MultiAnswer($numans, $denans)->with(
my ( $correct, $student, $self ) = @_;
my ( $f1stu, $f2stu ) = @{$student};
my ( $f1, $f2 ) = @{$correct};
-
- if ( ( $f1==$f1stu && $f2==$f2stu) ||
+
+ if ( ( $f1==$f1stu && $f2==$f2stu) ||
(-$f1==$f1stu && -$f2==$f2stu) ) {
return [1,1];
} elsif ( $f1==$f1stu || -$f1==$f1stu) {
@@ -112,7 +112,7 @@ $dispfrac = ColumnTable(
###########################################################################
-# state the problem
+# state the problem
###########################################################################
Context()->texStrings;
BEGIN_TEXT
@@ -125,7 +125,7 @@ END_TEXT
###########################################################################
-# check the answer
+# check the answer
###########################################################################
ANS($multians->cmp());
@@ -142,7 +142,7 @@ if ($attempts_modp == 0 && $actualAttempts != 0) {
END_TEXT
}
Context()->normalStrings;
-PeriodicStatus();
+PeriodicStatus();
COMMENT('Features Periodic Rerandomization');
ENDDOCUMENT();
diff --git a/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_01_ia.pg b/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_01_ia.pg
index 6449c1df2b..53e8e6deb9 100644
--- a/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_01_ia.pg
+++ b/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_01_ia.pg
@@ -4,14 +4,14 @@
## DBsubject('Intermediate Algebra')
## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
-## DBsection('Rational Expressions and Functions: Multipying and Dividing')
+## DBsection('Rational Expressions and Functions: Multiplying and Dividing')
## KEYWORDS('rational','expressions')
## Author('Rick Lynch')
## Institution('University of Missouri-Columbia')
###########################################################################
-# initialization
+# initialization
###########################################################################
DOCUMENT();
loadMacros(
@@ -27,7 +27,7 @@ $showPartialCorrectAnswers = 1;
###########################################################################
-# setup contexts and variables
+# setup contexts and variables
###########################################################################
Context("Numeric");
Context()->strings->add(A=>{}, B=>{}, C=>{}, D=>{}, E=>{});
@@ -74,7 +74,7 @@ $ans = List(@ans);
###########################################################################
-# state the problem
+# state the problem
###########################################################################
Context()->texStrings;
BEGIN_TEXT
@@ -99,7 +99,7 @@ END_TEXT
###########################################################################
-# check the answer
+# check the answer
###########################################################################
ANS($ans->cmp());
@@ -120,7 +120,7 @@ if ($attempts_modp == 0 && $actualAttempts != 0) {
END_TEXT
}
Context()->normalStrings;
-PeriodicStatus();
+PeriodicStatus();
COMMENT('Features Periodic Rerandomization');
ENDDOCUMENT();
diff --git a/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_02_ia.pg b/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_02_ia.pg
index 9018459930..78833e8311 100644
--- a/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_02_ia.pg
+++ b/Contrib/Mizzou/Algebra/rational_expressions_equiv_forms/equiv_forms_02_ia.pg
@@ -4,14 +4,14 @@
## DBsubject('Intermediate Algebra')
## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
-## DBsection('Rational Expressions and Functions: Multipying and Dividing')
+## DBsection('Rational Expressions and Functions: Multiplying and Dividing')
## KEYWORDS('rational','expressions')
## Author('Rick Lynch')
## Institution('University of Missouri-Columbia')
###########################################################################
-# initialization
+# initialization
###########################################################################
DOCUMENT();
loadMacros(
@@ -28,7 +28,7 @@ $showPartialCorrectAnswers = 1;
###########################################################################
-# setup contexts and variables
+# setup contexts and variables
###########################################################################
Context("Numeric");
Context()->strings->add(A=>{}, B=>{}, C=>{}, D=>{}, E=>{}, F=>{});
@@ -71,14 +71,14 @@ $ansneither = List(@ansneither);
###########################################################################
-# state the problem
+# state the problem
###########################################################################
Context()->texStrings;
BEGIN_TEXT
Which of the following expressions are equal to \(1\), \(-1\), or to neither of those? List the corresponding letter(s), separated by commas if there are more than one.
$PAR
$BCENTER
-\{
+\{
BeginTable().
AlignedRow(["A.", "\($choices[$ch[0]]\)", " B.", "\($choices[$ch[1]]\)", "C.", "\($choices[$ch[2]]\)"]).
TableSpace(30,50).
@@ -96,7 +96,7 @@ END_TEXT
###########################################################################
-# check the answer
+# check the answer
###########################################################################
ANS($ansp1->cmp());
ANS($ansn1->cmp());
@@ -119,7 +119,7 @@ if ($attempts_modp == 0 && $actualAttempts != 0) {
END_TEXT
}
Context()->normalStrings;
-PeriodicStatus();
+PeriodicStatus();
COMMENT('Features Periodic Rerandomization');
ENDDOCUMENT();
diff --git a/Contrib/UBC/ECON/ECON325/hw05/hw05_q06.pg b/Contrib/UBC/ECON/ECON325/hw05/hw05_q06.pg
index 920708326b..b5af4c893c 100644
--- a/Contrib/UBC/ECON/ECON325/hw05/hw05_q06.pg
+++ b/Contrib/UBC/ECON/ECON325/hw05/hw05_q06.pg
@@ -2,7 +2,7 @@
##KEYWORDS('Random variable'; 'normal'; 'find the probability a normal
##variable is less than a given value, the probability a normal variable lies
##within a given value of the mean, and the value a normal variables exceeds
-##with a given probability'.)
+##with a given probability'.)
# DESCRIPTION
## DBsubject('Probability')
## DBchapter('Continuous distributions')
@@ -98,13 +98,13 @@ Let \(X\) be a normal random variable with mean \($m[0]\) units and standard dev
to two decimal places.
$BR
$BR
-$BBOLD(a) $EBOLD What is the probability that \(X\) will be less than \($x1[0]\) units, \(P(X < $x1[0]) \)? \{ ans_rule(7) \}
+$BBOLD(a) $EBOLD What is the probability that \(X\) will be less than \($x1[0]\) units, \(P(X < $x1[0]) \)? \{ ans_rule(7) \}
$BR
$BR
-$BBOLD(b) $EBOLD What is the probability that \(X\) will be within \($x2[0]\) units of the mean? \{ ans_rule(7) \}
+$BBOLD(b) $EBOLD What is the probability that \(X\) will be within \($x2[0]\) units of the mean? \{ ans_rule(7) \}
$BR
$BR
-$BBOLD(c) $EBOLD The probability is \($p[0]\) that \(X\) will be more than how many units? \{ ans_rule(7) \}
+$BBOLD(c) $EBOLD The probability is \($p[0]\) that \(X\) will be more than how many units? \{ ans_rule(7) \}
END_TEXT
#########################################################
## Answers evaluation (Required)
@@ -123,18 +123,18 @@ $BBOLD (a) $EBOLD Standardising X, we have
$BR
$BR
$BCENTER
-\(
-P (X < $x1[0]) =P(\frac{X- $m[0]}{$s[0]} < \frac{$x1[0]- $m[0]}{$s[0]}) = P( Z < \frac{$x1[0] - $m[0] }{$s[0]} ) =$q1ans.
+\(
+P (X < $x1[0]) =P(\frac{X- $m[0]}{$s[0]} < \frac{$x1[0]- $m[0]}{$s[0]}) = P( Z < \frac{$x1[0] - $m[0] }{$s[0]} ) =$q1ans.
\)
$ECENTER
$BR
via tables or software.
-$BR
+$BR
$BR
-$BBOLD (b) $EBOLD Similiar to above,
+$BBOLD (b) $EBOLD Similar to above,
$BCENTER
-\(
+\(
P ( $m[0] - $x2[0] < X < $m[0] + $x2[0]) = P(X <$m[0]+$x2[0] ) - P(X < $m[0] -$x2[0] ) =
P(\frac{X- $m[0]}{ $s[0] } < \frac{$x2[0]}{$s[0]}) -
P(\frac{X- $m[0]}{ $s[0] } < \frac{-$x2[0]}{$s[0]}) =$q2ans.
@@ -149,25 +149,25 @@ $BBOLD (c) $EBOLD We seek the value \(c\) such that
$BR
$BR
$BCENTER
-\(
-P(X > c ) =$p[0].
+\(
+P(X > c ) =$p[0].
\)
$ECENTER
$BR
$BR
Standardising,
$BCENTER
-\(
-P ( Z = \frac{ X-$m[0]}{ $s[0] } > \frac{ c-$m[0]}{ $s[0]} ) =$p[0].
+\(
+P ( Z = \frac{ X-$m[0]}{ $s[0] } > \frac{ c-$m[0]}{ $s[0]} ) =$p[0].
\)
$ECENTER
$BR
-Now the \( (1 - $p[0]) \)th percentile of the standard normal distribution is \( $quan[0] \), via tables or software. Hence
+Now the \( (1 - $p[0]) \)th percentile of the standard normal distribution is \( $quan[0] \), via tables or software. Hence
$BR
$BR
$BCENTER
-\(
-c = $s[0] \times $quan[0] + $m[0] =$q3ans.
+\(
+c = $s[0] \times $quan[0] + $m[0] =$q3ans.
\)
$ECENTER
END_SOLUTION
diff --git a/Contrib/UBC/MECH/MECH2/Fluids/2017_Leftovers/UBC-FLU-17-002.pg b/Contrib/UBC/MECH/MECH2/Fluids/2017_Leftovers/UBC-FLU-17-002.pg
index 0774590d00..ac01d5ed09 100644
--- a/Contrib/UBC/MECH/MECH2/Fluids/2017_Leftovers/UBC-FLU-17-002.pg
+++ b/Contrib/UBC/MECH/MECH2/Fluids/2017_Leftovers/UBC-FLU-17-002.pg
@@ -8,14 +8,14 @@
## Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
##
##
-## We gratefully acknowledge the financial support for this
+## We gratefully acknowledge the financial support for this
## project provided by UBC Vancouver students via the Teaching
## and Learning Enhancement Fund. We also gratefully acknowledge
## additional funding support from BCcampus, the UBC Department of
-## Mechanical Engineering, and the UBC Applied Science Dean’s Office.
+## Mechanical Engineering, and the UBC Applied Science Dean’s Office.
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of the Musqueam people.
+## territory of the Musqueam people.
##
##ENDDESCRIPTION
@@ -38,7 +38,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -77,7 +77,7 @@ tolerance=>.02);
##############################################################
#
-# PGML
+# PGML
#
#
@@ -85,12 +85,12 @@ BEGIN_PGML
[@ image( "UBC-FLU-17-002.png", width=>[$width], height=>[$height]) @]*
-A semicircular trough with a diamter of [`A = [$A]`] [`m`] is filled with pure water with a density of [`1000 kg/m^3`]. Two symetric parts are hinged together at the bottom edge and connected with a cable on the top edge. Assume that the width of the tank is [`\frac{8}{3A}`] into the page. Calculate the tension in the cable.
+A semicircular trough with a diameter of [`A = [$A]`] [`m`] is filled with pure water with a density of [`1000 kg/m^3`]. Two symetric parts are hinged together at the bottom edge and connected with a cable on the top edge. Assume that the width of the tank is [`\frac{8}{3A}`] into the page. Calculate the tension in the cable.
-[`F_T`] = [______]{"$tension"} [`N`]
+[`F_T`] = [______]{"$tension"} [`N`]
END_PGML
##############################################################
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/UBC/MECH/MECH2/Fluids/Mech2_2016-2017/UBC-FLU-17-084.pg b/Contrib/UBC/MECH/MECH2/Fluids/Mech2_2016-2017/UBC-FLU-17-084.pg
index 0a56a91d89..2dd632547b 100644
--- a/Contrib/UBC/MECH/MECH2/Fluids/Mech2_2016-2017/UBC-FLU-17-084.pg
+++ b/Contrib/UBC/MECH/MECH2/Fluids/Mech2_2016-2017/UBC-FLU-17-084.pg
@@ -8,14 +8,14 @@
## Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
##
##
-## We gratefully acknowledge the financial support for this
+## We gratefully acknowledge the financial support for this
## project provided by UBC Vancouver students via the Teaching
## and Learning Enhancement Fund. We also gratefully acknowledge
## additional funding support from BCcampus, the UBC Department of
-## Mechanical Engineering, and the UBC Applied Science Dean’s Office.
+## Mechanical Engineering, and the UBC Applied Science Dean’s Office.
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of the Musqueam people.
+## territory of the Musqueam people.
##
##ENDDESCRIPTION
@@ -49,7 +49,7 @@ $mc = RadioButtons(
"There is a gain in elevation",
"The flow passes through a pump",
"The potential energy of the flow increases",
-"The flow velocity decreases",
+"The flow velocity decreases",
"The flow velocity increases"
]
,"The flow passes through a pump", # correct option
@@ -69,7 +69,7 @@ ANS( $mc->cmp() );
Context()->texStrings;
SOLUTION(EV3(<<'END_SOLUTION'));
$PAR SOLUTION $PAR
-Given that head expresses energy per weight of fluid, the energy (and head) will only go up if we add energy to the flow. It takes a pump or other similar device to acheive this. Without adding energy, head will stay constant (if there are no losses) or go down (if there are losses), even if there are velocity, pressure, or elevation changes.
+Given that head expresses energy per weight of fluid, the energy (and head) will only go up if we add energy to the flow. It takes a pump or other similar device to achieve this. Without adding energy, head will stay constant (if there are no losses) or go down (if there are losses), even if there are velocity, pressure, or elevation changes.
END_SOLUTION
Context()->normalStrings;
diff --git a/Contrib/UBC/MECH/MECH2/SolidMech/2017_Leftovers/UBC-SM-17-015.pg b/Contrib/UBC/MECH/MECH2/SolidMech/2017_Leftovers/UBC-SM-17-015.pg
index ddaddb0323..abbff48a57 100644
--- a/Contrib/UBC/MECH/MECH2/SolidMech/2017_Leftovers/UBC-SM-17-015.pg
+++ b/Contrib/UBC/MECH/MECH2/SolidMech/2017_Leftovers/UBC-SM-17-015.pg
@@ -8,14 +8,14 @@
## Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
##
##
-## We gratefully acknowledge the financial support for this
+## We gratefully acknowledge the financial support for this
## project provided by UBC Vancouver students via the Teaching
## and Learning Enhancement Fund. We also gratefully acknowledge
## additional funding support from BCcampus, the UBC Department of
-## Mechanical Engineering, and the UBC Applied Science Dean’s Office.
+## Mechanical Engineering, and the UBC Applied Science Dean’s Office.
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of the Musqueam people.
+## territory of the Musqueam people.
##
##ENDDESCRIPTION
@@ -39,7 +39,7 @@
DOCUMENT();
-loadMacros(
+loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
@@ -72,7 +72,7 @@ $imgScale =0.3;
$width = $imgScale*2544;
$height = $imgScale*778;
-#computation
+#computation
$q = (2*$w2 + $w3 + 9*$w4 - 2*$w1)/7;
$p = 2*$w1 + $w2 + $w4 - $q;
@@ -84,25 +84,25 @@ tolerance=>.05);
##############################################################
#
-# PGML
-#
+# PGML
+#
#
BEGIN_PGML
[@ image( "UBC-SM-17-015.png", width=>[$width], height=>[$height]) @]*
-Find the reactions at supports [`P`] and [`Q`] for the beam shown in the figure given the following parmeters:
-[`w_1=[$w1]`] [`kN/m`]
-[`w_2=[$w2]`] [`kN`]
-[`w_3=[$w3]`] [`kNm`]
-[`w_4=[$w4]`] [`kN`]
+Find the reactions at supports [`P`] and [`Q`] for the beam shown in the figure given the following parameters:
+[`w_1=[$w1]`] [`kN/m`]
+[`w_2=[$w2]`] [`kN`]
+[`w_3=[$w3]`] [`kNm`]
+[`w_4=[$w4]`] [`kN`]
-[`P`] = [_____]{"$p"} [`kN`]
-[`Q`] = [_____]{"$q"} [`kN`]
+[`P`] = [_____]{"$p"} [`kN`]
+[`Q`] = [_____]{"$q"} [`kN`]
END_PGML
##############################################################
-ENDDOCUMENT();
\ No newline at end of file
+ENDDOCUMENT();
diff --git a/Contrib/UBC/MECH/MECH375/HW1/HW1_Balance.pg b/Contrib/UBC/MECH/MECH375/HW1/HW1_Balance.pg
index d708000241..699d24543f 100644
--- a/Contrib/UBC/MECH/MECH375/HW1/HW1_Balance.pg
+++ b/Contrib/UBC/MECH/MECH375/HW1/HW1_Balance.pg
@@ -40,8 +40,8 @@ $q = random(1,2.5,0.5);
$T1 = random(25,45,5);
$T2 = 200;
$eps = random(0.2,0.4,0.05);
-$qr = $eps*$sigma*((273+$T2)**4 -(273+$T1)**4);
-$dq = $q*1000 - $qr;
+$qr = $eps*$sigma*((273+$T2)**4 -(273+$T1)**4);
+$dq = $q*1000 - $qr;
$dT = $T2 - $T1;
$h = $dq/$dT;
@@ -51,7 +51,7 @@ BEGIN_TEXT
\{ image("Fig_HW1_Balance.png", width=>300, height=>150, tex_size=>600) \}
$PAR
-Surface of a mechanical device is supplied with power \(q''=\) $q kW/m\(^2\) in a room with air temperature of \(T_{air} =\) $T1 \(^\circ\)C. To avoid mecanical malfunction, the surface temperature should not exceed $T2 \(^\circ\)C. Assuring the surface emissivity is \(\varepsilon=\) $eps,
+Surface of a mechanical device is supplied with power \(q''=\) $q kW/m\(^2\) in a room with air temperature of \(T_{air} =\) $T1 \(^\circ\)C. To avoid mechanical malfunction, the surface temperature should not exceed $T2 \(^\circ\)C. Assuring the surface emissivity is \(\varepsilon=\) $eps,
$PAR
a) compute the heat transfer per unit area due to radiation when the surface is at the critical temperature $BR
$PAR
@@ -87,15 +87,15 @@ ANS( $yesno->cmp() );
### SOLUTION
BEGIN_SOLUTION
-a) \(q''_{rad} = \epsilon \sigma \left(T_s^4 - T_{sur}^4\right)=
+a) \(q''_{rad} = \epsilon \sigma \left(T_s^4 - T_{sur}^4\right)=
$eps \times (5.67\times 10^{-8}) \left(($T1+273)^4 -($T2+273)^4\right)= $qr \) W/m\(^2\).
$PAR
b) \( q'' = q''_{rad} + q''_{conv} \Rightarrow h\Delta T + q''_{rad} = q'' \Rightarrow h = \frac{q''-q''_{rad}}{\Delta T}\)
-$PAR $BR
+$PAR $BR
\( h = \frac{$q\times 1000 -$qr}{$T2-$T1} = \) $h W/m\(^2\).K
-$PAR $BR
-Since the required value of the convection coefficient is rather small, we most likely do not need a fan.
+$PAR $BR
+Since the required value of the convection coefficient is rather small, we most likely do not need a fan.
END_SOLUTION
diff --git a/Contrib/UBC/MECH/MECH375/HW2/HW2_1DProfile.pg b/Contrib/UBC/MECH/MECH375/HW2/HW2_1DProfile.pg
index 8f74c2cec4..b5fab25c1e 100644
--- a/Contrib/UBC/MECH/MECH375/HW2/HW2_1DProfile.pg
+++ b/Contrib/UBC/MECH/MECH375/HW2/HW2_1DProfile.pg
@@ -50,13 +50,13 @@ BEGIN_TEXT
$PAR
-It is estimated that temperature profile inside a wall with thickness of \(L=\) $L m under steady state condition is given by a quadratic equation like: \( T = ax^3 + bx^2 +c\),
-where \( x \) is the coordinate (as shown) and \(a \), \(b\) and \(c\) are costants to be found. \( T\) is in celsius and \( x \) is in meter. The left and right wall temperature is \(T_1= $T1^\circ\)C and \(T_2= $T2^\circ\)C. The conductivity of the wall is \( k_{wall} = \) $k W/m.K. The volumetric heat generation at the left wall ( \(x=0\) ) is measured to be \(S_{0} = \) $S0 W/m\(^3\).
+It is estimated that temperature profile inside a wall with thickness of \(L=\) $L m under steady state condition is given by a quadratic equation like: \( T = ax^3 + bx^2 +c\),
+where \( x \) is the coordinate (as shown) and \(a \), \(b\) and \(c\) are constants to be found. \( T\) is in celsius and \( x \) is in meter. The left and right wall temperature is \(T_1= $T1^\circ\)C and \(T_2= $T2^\circ\)C. The conductivity of the wall is \( k_{wall} = \) $k W/m.K. The volumetric heat generation at the left wall ( \(x=0\) ) is measured to be \(S_{0} = \) $S0 W/m\(^3\).
$PAR
a) Use the boundary condition at the left wall to find \(c = \) \{ans_rule(10)\} \(^\circ\)C $BR
b) Use the boundary condition at the right wall, and other information given, find \(b = \) \{ans_rule(10)\} \(^\circ\)C/m\(^2\) and \(a = \) \{ans_rule(10)\} \(^\circ\)C/m\(^3\). $BR
-c) Now that the profile of temperature is fully derived, use the 1D convection heat equation to find volumetric heat generation at the right wall ( \(x=$L\) ): \(S_{L} = \) \{ans_rule(10)\} \(^\circ\) W/m\(^3\).
+c) Now that the profile of temperature is fully derived, use the 1D convection heat equation to find volumetric heat generation at the right wall ( \(x=$L\) ): \(S_{L} = \) \{ans_rule(10)\} \(^\circ\) W/m\(^3\).
$PAR
END_TEXT
@@ -85,11 +85,11 @@ We also can find an expression for \(S\) (heat generation per unit volume) using
$PAR
\( k \frac{d^2 T}{d x^2} + S=0 \Rightarrow S = -k \frac{d^2 T}{d x^2} = -k(6ax + 2b) \)
$PAR
-therefore at \(x=0: S(x=0) = S_0 \Rightarrow -k(2b) = $S0 \Rightarrow b = $b~^\circ\)C/m\(^2\). If we substitute this in Eq1, we get \( a= $a~^\circ\)C/m\(^3\).
+therefore at \(x=0: S(x=0) = S_0 \Rightarrow -k(2b) = $S0 \Rightarrow b = $b~^\circ\)C/m\(^2\). If we substitute this in Eq1, we get \( a= $a~^\circ\)C/m\(^3\).
$PAR
Now we can calculate heat generation at the other end:
\(S_L = -k(6aL + 2b) = -$k\left(6($a)($L) + 2($b) \right) = $SL\).
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
# This should be the last executable line in the problem.
diff --git a/Contrib/UBC/MECH/MECH375/HW3/HW3_Annular.pg b/Contrib/UBC/MECH/MECH375/HW3/HW3_Annular.pg
index 6f5e3c98f8..dc2f62a89f 100644
--- a/Contrib/UBC/MECH/MECH375/HW3/HW3_Annular.pg
+++ b/Contrib/UBC/MECH/MECH375/HW3/HW3_Annular.pg
@@ -62,16 +62,16 @@ $qadd = $qf+$q2 - $q1;
BEGIN_TEXT
-$N annular aluminum (\(k_{al} = $k\) W/m.K) fins are mounted on a $L-m long pipe with outer diameter $D1 cm.
+$N annular aluminum (\(k_{al} = $k\) W/m.K) fins are mounted on a $L-m long pipe with outer diameter $D1 cm.
The fins have a diameter $D2 cm and $t-mm thick and are equally spaced. Due to carrying a hot liquid, the outside surface
of the pipe is at $T1 \(^\circ\)C. Air blows on the pipe and fin at temperature $T2 \(^\circ\)C. The convective heat transfer coefficient is \(h=$h\) W/m\(^2\).K.
What is the additional heat transfer due to insertion of fins?
$PAR
-In order to be consistent with the grader, please take into accout the outer surface of the fin in your surface area. i.e.
+In order to be consistent with the grader, please take into account the outer surface of the fin in your surface area. i.e.
\(A_{fin}= N\left(\pi D t+ 2\frac{\pi}{4}(D_2^2-D_1^2)\right) \)
-$PAR
+$PAR
\(q_{additional}=\) \{ans_rule(10)\} W $BR
$PAR
@@ -92,26 +92,26 @@ ANS(num_cmp($qadd, tolType => 'relative', tolerance => 15));
BEGIN_SOLUTION
if there is no fin, we have
-\( A_{nofin} = \pi DL = \pi ($D1 \times 10^{-2}) $L = $A1 \) m\(^2\).
-$PAR
+\( A_{nofin} = \pi DL = \pi ($D1 \times 10^{-2}) $L = $A1 \) m\(^2\).
+$PAR
\( q_{nofin} = h A_{nofin} (T_{s} - T_\infty) = $h ($A1) ($T1-$T2) = $q1\) W.
$PAR
Now considering the fins. we fist calculate heat transfer from the unfinned area:
-\( A_{unfinned} = A_{nofin} - N A_{c} = A_{nofin} - N \pi D t= $A1 - $N\left(\pi($D1\times 10^{-2})($t\times 10^{-3}) \right) = $A2 \) m\(^2\).
-$PAR
+\( A_{unfinned} = A_{nofin} - N A_{c} = A_{nofin} - N \pi D t= $A1 - $N\left(\pi($D1\times 10^{-2})($t\times 10^{-3}) \right) = $A2 \) m\(^2\).
+$PAR
\( q_{unfinned} = h A_{unfinned} (T_{s} - T_\infty) = $h ($A2) ($T1-$T2) = $q2\) W.
$PAR
Now we calculate heat transfer from the fins. We need to use the figure provided in the handouts for annular fins.
$PAR
-\(L_c = r_2 - r_1 + t/2 = \frac{1}{2}\left[ ($D2- $D1) \times 10^{-2} + $t\times 10^{-3}\right] = $Lc\) m.
+\(L_c = r_2 - r_1 + t/2 = \frac{1}{2}\left[ ($D2- $D1) \times 10^{-2} + $t\times 10^{-3}\right] = $Lc\) m.
$PAR
\(A_p = L_c t = ($Lc)($t\times 10^{-3}) = $Ap\) m\(^2\).
$PAR
-We calculate \( L_c^{3/2} (h/A_p)^{1/2} = $tmp\) and
-\( \frac{r_{2c}}{r_1} = \frac{r_2 + t/2}{r_1} = \frac{$D2 \times 10^{-2} + $t \times 10^{-3}}{$D1} = $tmp2\).
+We calculate \( L_c^{3/2} (h/A_p)^{1/2} = $tmp\) and
+\( \frac{r_{2c}}{r_1} = \frac{r_2 + t/2}{r_1} = \frac{$D2 \times 10^{-2} + $t \times 10^{-3}}{$D1} = $tmp2\).
and we find \(\eta= $eta\) (from the figure).
$PAR
-\( A_{fin} = N\left(\pi D t + 2 \frac{\pi}{4} (D_2^2-D_1^2)\right) =
+\( A_{fin} = N\left(\pi D t + 2 \frac{\pi}{4} (D_2^2-D_1^2)\right) =
$N\left(\pi($D2\times 10^{-2})($t\times 10^{-3} + 0.5\pi($D2^2-$D1^2)\times 10^{-4}\right) = $Af\) m\(^2\).
$PAR
\(q_{fin} = \eta h A_{fin}(T_{s}-T_\infty) = $eta($h)($Af)($T1 - $T2) = $qf\) W.
@@ -121,5 +121,5 @@ $PAR
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
# This should be the last executable line in the problem.
diff --git a/Contrib/UBC/MECH/MECH375/HW4/HW4_bestpipe.pg b/Contrib/UBC/MECH/MECH375/HW4/HW4_bestpipe.pg
index 4fdc315dd7..7d461762af 100644
--- a/Contrib/UBC/MECH/MECH375/HW4/HW4_bestpipe.pg
+++ b/Contrib/UBC/MECH/MECH375/HW4/HW4_bestpipe.pg
@@ -42,7 +42,7 @@ BEGIN_TEXT
\{ image("Fig_HW4_bestpipe.png", width=>450, height=>150, tex_size=>600) \}
$PAR
-It is required to pump some hot liquid inside a duct. The duct is burried in a large body of soil. The surface area of the duct is required to be equal to \( A \), but the shape is still not determined. Two available options are semi-circle and square. If we model the conduction in the soil as a 2D problem, we may need to
+It is required to pump some hot liquid inside a duct. The duct is buried in a large body of soil. The surface area of the duct is required to be equal to \( A \), but the shape is still not determined. Two available options are semi-circle and square. If we model the conduction in the soil as a 2D problem, we may need to
find the shape factor corresponding to each design.
$PAR
diff --git a/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe.pg b/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe.pg
index ecfa64ba84..42bd2337b6 100644
--- a/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe.pg
+++ b/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe.pg
@@ -45,10 +45,10 @@ $q = $S * $k*($T2-$T1);
BEGIN_TEXT
-A very long pipe with outer diameter $D cm is carrying hot water and is burried $H m
+A very long pipe with outer diameter $D cm is carrying hot water and is buried $H m
under ground. The pipe outside temperature is $T2 \(^\circ\)C. Conductivity of soil is $k W/m.K and its average temperature is $T1 \(^\circ\)C.
$PAR
-a) If we model the conduction problem in the soil as a 2D problem, what is coresponding shape factor per unit length of the pipe?
+a) If we model the conduction problem in the soil as a 2D problem, what is corresponding shape factor per unit length of the pipe?
\(S/L=\) \{ans_rule(10)\} $BR
$PAR
@@ -75,25 +75,25 @@ ANS(num_cmp($q, tolType => 'absolute', tolerance => 1));
### SOLUTION
BEGIN_SOLUTION
$PAR SOLUTION $PAR
-a)
+a)
$PAR
$PAR
-From/Refer case 2 Table 4.1
+From/Refer case 2 Table 4.1
$PAR
\[ z = $H (m) > \frac {3\times$D(cm)}{2} \]
$PAR
\[ S = \frac{ 2 \pi L }{ \ln\frac{4 z}{D} } \]
$PAR
-\[ \frac{S}{L} = \frac{2 \pi}{ \ln\frac{4\times$H}{$D\times 10^{-2}} } = $S/1 \]
+\[ \frac{S}{L} = \frac{2 \pi}{ \ln\frac{4\times$H}{$D\times 10^{-2}} } = $S/1 \]
$PAR
b)
$PAR
\[ q = S k (T_2 - T_1) \]
$PAR
- \[ q' = \frac{q}{L} = \frac{S}{L} k (T_2 - T_1) = $q [W/m] \]
+ \[ q' = \frac{q}{L} = \frac{S}{L} k (T_2 - T_1) = $q [W/m] \]
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
# This should be the last executable line in the problem.
diff --git a/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe2.pg b/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe2.pg
index 58dd79edcb..5d764097df 100644
--- a/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe2.pg
+++ b/Contrib/UBC/MECH/MECH375/HW4/HW4_burriedpipe2.pg
@@ -52,7 +52,7 @@ $q = ($T2-$T1)/($Rins+$Rsoil);
BEGIN_TEXT
-Consider a $L-m long pipe with outer diameter $D cm that is carrying hot water and is burried $H m under ground. A $t-cm thick layer of glass wool (\(k_{gw} = $k2\)W/m.K) is wrapped around the pipe. The pipe outside temperature is $T2 \(^\circ\)C. Assume conductivity of soil is $k W/m.K and its average temperature is $T1 \(^\circ\)C.
+Consider a $L-m long pipe with outer diameter $D cm that is carrying hot water and is buried $H m under ground. A $t-cm thick layer of glass wool (\(k_{gw} = $k2\)W/m.K) is wrapped around the pipe. The pipe outside temperature is $T2 \(^\circ\)C. Assume conductivity of soil is $k W/m.K and its average temperature is $T1 \(^\circ\)C.
$PAR
a) What is the thermal resistance due to the insulator?
@@ -63,7 +63,7 @@ b) What is the thermal resistance due to 2D conduction in the soil?
$PAR
c) What is the rate of heat transfer?
-
+
\(q=\) \{ans_rule(10)\} W $BR
$PAR
@@ -82,28 +82,28 @@ ANS(num_cmp($Rins, tolType => 'relative', tolerance => 5));
ANS(num_cmp($Rsoil, tolType => 'relative', tolerance => 5));
ANS(num_cmp($q, tolType => 'relative', tolerance => 5));
-### SOLUTION
-BEGIN_SOLUTION
+### SOLUTION
+BEGIN_SOLUTION
$PAR SOLUTION $PAR
a)
$PAR
\[ R_{ins} = \frac{\ln\frac{r_2}{r_1}}{2 \pi k L} = \frac{\ln($D2/$D)} {2$Pi($k2)($L)} = $Rins \]
-$PAR
-b)
+$PAR
+b)
$PAR
\[ R_{soil} = \frac{1}{S k} \]
-$PAR
+$PAR
\[ S = \frac{2 \pi L}{\ln\frac{4 z}{D}} = \frac{2\pi($L)}{ln\left(\frac{4\times$H}{$D2\times 10^{-2}}\right)} = $S \]
-$PAR
+$PAR
\[ R_{soil} = \frac{1}{$S\times$k} = $Rsoil \]
$PAR
c)
-$PAR
+$PAR
\[ R_{total} = R_{ins} + R_{soil} \]
$PAR
\[ q = \frac{\Delta T}{R_{total}} = \frac{$T2-$T1}{$Rtotal} = $q\]
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
# This should be the last executable line in the problem.
diff --git a/Contrib/UBC/MECH/MECH375/HW4/HW4_thermocouple.pg b/Contrib/UBC/MECH/MECH375/HW4/HW4_thermocouple.pg
index e270b0ba64..e9e28b4a0c 100644
--- a/Contrib/UBC/MECH/MECH375/HW4/HW4_thermocouple.pg
+++ b/Contrib/UBC/MECH/MECH375/HW4/HW4_thermocouple.pg
@@ -54,7 +54,7 @@ BEGIN_TEXT
\{ image("Fig_HW4_thermocouple.png", width=>300, height=>370, tex_size=>600) \}
$PAR
-A thin wire with conductivity of $k2 W/m.K and diameter $D mm is mounted on a large rock with conductivity $k W/m.K. The sorrounding air has a temperature $T \(^\circ\)C and the convection heat coefficient is $h W/m\(^2\).K. Due to some unknown reasons, the rock has a large temperature. We would like to measure the wire temperature at the joint \(T_j\) and use it to find the (average) temperature inside the rock \(T_O\). Because of thermal resistance at the base of the wire, the junction temperature \(T_j\) would differ from the rock temperature \(T_O\). Our goal is to estimate this difference. To do so, we may assume the wire is like a fin.
+A thin wire with conductivity of $k2 W/m.K and diameter $D mm is mounted on a large rock with conductivity $k W/m.K. The surrounding air has a temperature $T \(^\circ\)C and the convection heat coefficient is $h W/m\(^2\).K. Due to some unknown reasons, the rock has a large temperature. We would like to measure the wire temperature at the joint \(T_j\) and use it to find the (average) temperature inside the rock \(T_O\). Because of thermal resistance at the base of the wire, the junction temperature \(T_j\) would differ from the rock temperature \(T_O\). Our goal is to estimate this difference. To do so, we may assume the wire is like a fin.
$PAR
a) Which one of these three options better represents the thermal circuit of the system?
@@ -66,13 +66,13 @@ $PAR
b) What is the thermal resistance of the fin? (assume the fin is very long).
\(R_{fin}=\) \{ans_rule(10)\} \(^\circ\)C/W $BR
$PAR
-c) What is the thermal resistance of the rock?
+c) What is the thermal resistance of the rock?
(Hint: approximate the resistance to the heat transfer as a disk on a semi-infinite medium.)
\(R_{fin}=\) \{ans_rule(10)\} \(^\circ\)C/W $BR
$PAR
d) What temperature does the thermocouple measure, when \(T_O= $T2^\circ\)C?
-$PAR
+$PAR
\(T_j=\) \{ans_rule(10)\} \(^\circ\)C$BR
$PAR
@@ -96,15 +96,15 @@ ANS(num_cmp($Tf, tolType => 'absolute', tolerance => 0.5));
### SOLUTION
BEGIN_SOLUTION
$PAR SOLUTION $PAR
-$PAR
-b)
$PAR
-For infinite fins we have
+b)
+$PAR
+For infinite fins we have
\[ q_f = \sqrt{h P A_c k} (\theta_b) \]
$PAR
-The perimeter and cross sectional area of the fin are
+The perimeter and cross sectional area of the fin are
$PAR
-\( P = \pi D = $p \) m and \(A = \pi/4 D^2 = $Ac \) m\(^2\).
+\( P = \pi D = $p \) m and \(A = \pi/4 D^2 = $Ac \) m\(^2\).
$PAR
\[ R_f = \frac{\theta_b}{q_f} = \frac{1}{\sqrt{h P A_c k}} = \frac{1}{\sqrt{($h)($p)($Ac)($k2)}} = $Rf \]
$PAR
@@ -115,7 +115,7 @@ $PAR
The wire tip can be thought of as a disk on a semi-infinite medium, therefore \( S= 2D\)
$PAR
\( R_{block} = \frac{1}{$k*2*($D/1000)} = $Rb~^\circ\)C/W.
-Writing the energy balance,
+Writing the energy balance,
$PAR
\( \frac{T_j-T_\infty}{R_{fin}} = \frac{T_o- T_j}{R_{rock}} \Rightarrow \)
$PAR
@@ -124,5 +124,5 @@ $PAR
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
# This should be the last executable line in the problem.
diff --git a/Contrib/UBC/MECH/MECH375/HW6/HW6_Experiment.pg b/Contrib/UBC/MECH/MECH375/HW6/HW6_Experiment.pg
index 229ce18a9a..11bf9ddd60 100644
--- a/Contrib/UBC/MECH/MECH375/HW6/HW6_Experiment.pg
+++ b/Contrib/UBC/MECH/MECH375/HW6/HW6_Experiment.pg
@@ -49,12 +49,12 @@ $Lc = $V/$A;
$b = ln($h2/$h1)/ln($U2/$U1);
$a = $h1 /$U1**$b;
$h3 = $a*$U3**$b;
-$q3 = $h3*$A*$dT;
+$q3 = $h3*$A*$dT;
BEGIN_TEXT
$PAR
-An object with surface area \(A=$A\) m\(^2\) and volume of \(V=$V\) m\(^3\) is placed in a cross flow.
+An object with surface area \(A=$A\) m\(^2\) and volume of \(V=$V\) m\(^3\) is placed in a cross flow.
In order to estimate the value of convection heat transfer coefficient for this object, we run two sets of experiments and following results are registered:
$PAR
EXPERIMENT 1: When \(U_1 = $U1\) m/s, we find \(\bar{h}_1 = $h1 \) W/m\(^2\).K.
@@ -63,19 +63,19 @@ EXPERIMENT 2: When \(U_2 = $U2\) m/s, we find \(\bar{h}_2 = $h2 \) W/m\(^2\).K.
$PAR
Assume the following form of correlation is suggested:
-\( Nu = CRe^m Pr^n \), where \(C, m\) and \(n\) are constants.
+\( Nu = CRe^m Pr^n \), where \(C, m\) and \(n\) are constants.
$PAR
a) What is a relevant length scale for this object? \(L_c=\) \{ans_rule(10)\} m. $BR
$PAR
-b) Re-write the above correlation in the form of \( h = \Psi U^m\). Can you tell what parameters are encapsulated in \(\Psi\)?
+b) Re-write the above correlation in the form of \( h = \Psi U^m\). Can you tell what parameters are encapsulated in \(\Psi\)?
$PAR
Using the experimental data you have available, find the value of \(\Psi\) and \(m\) $BR $PAR
-\(\Psi=\) \{ans_rule(10)\} W/m\(^2\).K / (m/s)\(^m\) and \(m=\) \{ans_rule(10)\}
+\(\Psi=\) \{ans_rule(10)\} W/m\(^2\).K / (m/s)\(^m\) and \(m=\) \{ans_rule(10)\}
$PAR
c)Use this to evaluate \( h \) when \(U_3 = $U3\) m/s. \(h_3=\) \{ans_rule(10)\} W/m\(^2\).K. $BR
$PAR
-d) Compute the rate of convection heat transfer when the temperature of the object is \($dT^\circ\)C warmer than the sorrounding air.
+d) Compute the rate of convection heat transfer when the temperature of the object is \($dT^\circ\)C warmer than the surrounding air.
\(q_3=\) \{ans_rule(10)\} W. $BR
$PAR
@@ -111,15 +111,15 @@ $PAR
$PAR
$PAR
-c) \[ h_3= \Psi U_3^{m} = $a($U3)^{$b} = $h3 \]
+c) \[ h_3= \Psi U_3^{m} = $a($U3)^{$b} = $h3 \]
$PAR
$PAR
-d ) \[ q_3 = h A (T-T_\infty) = ($h3)($A)($dT) = $q3 \]
+d ) \[ q_3 = h A (T-T_\infty) = ($h3)($A)($dT) = $q3 \]
$PAR
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/Contrib/UBC/MECH/MECH375/HW6/HW6_flatplate.pg b/Contrib/UBC/MECH/MECH375/HW6/HW6_flatplate.pg
index 9b23ed663b..686400b664 100644
--- a/Contrib/UBC/MECH/MECH375/HW6/HW6_flatplate.pg
+++ b/Contrib/UBC/MECH/MECH375/HW6/HW6_flatplate.pg
@@ -37,9 +37,9 @@ TEXT(beginproblem());
$L = random(0.5,2,0.5);
$U = random(0.25,1,0.25);
$T2 = random(10,50,5);
-$T1 = 127*2 - $T2;
+$T1 = 127*2 - $T2;
$Tf = 127;
-# we set the average temperature to 400K.
+# we set the average temperature to 400K.
# Read properties at this temperature.
# the flow is laminar
@@ -71,8 +71,8 @@ BEGIN_TEXT
$PAR
Hot blocks of steel enter a dye to form thinner plates. The plates are then exposed to air to cool down.
-One of these plates is $L-m wide and is at \(T=$T1^\circ\)C. The sorrounding air has speed of \(U=$U\) m/s and temperature of
-\(T_{air}=$T2^\circ\)C.
+One of these plates is $L-m wide and is at \(T=$T1^\circ\)C. The surrounding air has speed of \(U=$U\) m/s and temperature of
+\(T_{air}=$T2^\circ\)C.
$PAR
a) What is a reasonable temperature at which the properties of air shall be read? \{ans_rule(10)\}\(^\circ\)C. $BR
$PAR
@@ -119,17 +119,17 @@ ANS(num_cmp($q2, tolType => 'relative', tolerance => 10));
### SOLUTION
BEGIN_SOLUTION
$PAR SOLUTION $PAR
-a)
+a)
\( T_{film} = \frac{T_s + T_{\infty}}{2} = \frac{$T1 + $T2}{2} = $Tf \)
$PAR
b) Properties of air at \(T_{film}\) are as follows:
$PAR
-\(\rho = $rho \) kg/m\(^{3}\),
-\(\nu = $nu \) m\(^{2}\).s,
+\(\rho = $rho \) kg/m\(^{3}\),
+\(\nu = $nu \) m\(^{2}\).s,
\(\mu = 2.3\times 10^{-5}\) Pa.s,
\(k = $k\) W/m.K, \(Pr = $Pr \)
$PAR
-\[ Re = \frac{\rho U D}{\mu } =\frac{U L}{\nu }= \frac{($U)($L)}{$nu} = $ReL \]
+\[ Re = \frac{\rho U D}{\mu } =\frac{U L}{\nu }= \frac{($U)($L)}{$nu} = $ReL \]
$PAR
c) Because \(Re < 50000\), then flow is laminar.
$PAR
@@ -137,13 +137,13 @@ d) \( Nu = 0.664 Re^\frac{1}{2} Pr^{\frac{1}{3}} = 0.644($ReL)^\frac{1}{2}($Pr)
$PAR
e) \( h = \frac{Nu k}{L} = ($NuL)($k)/$L = $h \) W/m\(^2\).K
$PAR
-f) \( q = h L (T - T_{\infty} ) = ($h)($T1-$T2)($L) = $q \) W/L
+f) \( q = h L (T - T_{\infty} ) = ($h)($T1-$T2)($L) = $q \) W/L
$PAR
-g) Yes
+g) Yes
$PAR
-h) \(Re_{new} = ($U2)($L)/$nu = $ReL2 \), therefore the flow is mixed
+h) \(Re_{new} = ($U2)($L)/$nu = $ReL2 \), therefore the flow is mixed
$PAR
-i)
+i)
\( Nu_{new} = \left(0.037 Re^\frac{4}{5} -871\right) Pr^\frac{1}{3} =\left(0.037($ReL2^\frac{4}{5})-871\right)($Pr^\frac{1}{3}) = $NuL2 \)
$PAR
\( h = \frac{Nu k}{L} = ($NuL2)($k)/$L = $h2 \) W/m\(^2\).K
@@ -153,5 +153,5 @@ $PAR
END_SOLUTION
-ENDDOCUMENT();
+ENDDOCUMENT();
# This should be the last executable line in the problem.
diff --git a/Contrib/UBC/MTRL/APSC278/2-Characterizing_mechanical_properties_of_materials/2.05.01.pg b/Contrib/UBC/MTRL/APSC278/2-Characterizing_mechanical_properties_of_materials/2.05.01.pg
index 49dc4ebf88..0d6143c805 100644
--- a/Contrib/UBC/MTRL/APSC278/2-Characterizing_mechanical_properties_of_materials/2.05.01.pg
+++ b/Contrib/UBC/MTRL/APSC278/2-Characterizing_mechanical_properties_of_materials/2.05.01.pg
@@ -1,7 +1,7 @@
##DESCRIPTION
-##
-## Questions created by: Nisa Sadaah and Pegah Pourabdollah. Questions reviewed and coded by: Daniel Hawker, Mohammad Reza Karimi, Mohammadali Shahsavari, Shuheng Li, and Gabrielle Lam. Images created by Yeedo Chun.
-## Project led by Gabrielle Lam.
+##
+## Questions created by: Nisa Sadaah and Pegah Pourabdollah. Questions reviewed and coded by: Daniel Hawker, Mohammad Reza Karimi, Mohammadali Shahsavari, Shuheng Li, and Gabrielle Lam. Images created by Yeedo Chun.
+## Project led by Gabrielle Lam.
##
## Contact: gabrielle.lam@ubc.ca
##
@@ -9,12 +9,12 @@
## Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
##
##
-## We gratefully acknowledge the financial support for this
+## We gratefully acknowledge the financial support for this
## project provided by UBC Vancouver students via the Teaching
## and Learning Enhancement Fund.
##
## This work was completed on the traditional, ancestral, and unceded
-## territory of the Musqueam people.
+## territory of the Musqueam people.
##
##ENDDESCRIPTION
@@ -24,11 +24,11 @@
## Institution('University of British Columbia')
## Author(UBC Materials Engineering)
## Date(12-07-2022)
-## Level(2)
+## Level(2)
## KEYWORDS('mechanical properties')
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl", # Standard macros for PG language
@@ -58,7 +58,7 @@ $showPartialCorrectAnswers = 1;
#
#Buttons for multiple choice questions are added here
$q_1 = RadioButtons(
- ["The 2% offset method can be used to estimate the yield stress because the material demonstrates homogenous yielding.","The 0.002 offset method can be used to estimate the yield stress because the material demonstrates heterogeneous yielding.","The yield stress is approximately 1600 MPa, according to the 0.2% offset method.","The yield stress cannot be determined."],
+ ["The 2% offset method can be used to estimate the yield stress because the material demonstrates homogeneous yielding.","The 0.002 offset method can be used to estimate the yield stress because the material demonstrates heterogeneous yielding.","The yield stress is approximately 1600 MPa, according to the 0.2% offset method.","The yield stress cannot be determined."],
"The yield stress is approximately 1600 MPa, according to the 0.2% offset method.", # correct answer
);
@@ -71,7 +71,7 @@ Context()->texStrings;
BEGIN_TEXT
2.05.01
$BR $BR
-The figure below shows a stress-strain curve for an unknown metal alloy obtained experimentally from a uniaxial tensile test. Which of the following conclusions can be drawn from the graph shown?
+The figure below shows a stress-strain curve for an unknown metal alloy obtained experimentally from a uniaxial tensile test. Which of the following conclusions can be drawn from the graph shown?
$BR
END_TEXT
@@ -98,4 +98,4 @@ END_TEXT
WEIGHTED_ANS( $q_1->cmp(), 100 );
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q02.pg b/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q02.pg
index 1dee19be3f..63bef93474 100644
--- a/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q02.pg
+++ b/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q02.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## KEYWORDS('Statistics','Sampling')
@@ -93,7 +93,7 @@ $ans1 = 9;
BEGIN_TEXT
-A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commerical, some saw a 60-second commercial, others a 90-second commerical. The same commerical was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich from the set {"Don't want to eat", "Neutral", "Want to eat"}.
+A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commercial, some saw a 60-second commercial, others a 90-second commercial. The same commercial was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich from the set {"Don't want to eat", "Neutral", "Want to eat"}.
$BR$BR
(a) \{ $mc[0]->print_q \}
diff --git a/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q05.pg b/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q05.pg
index d60a657ae7..1284fc4779 100644
--- a/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q05.pg
+++ b/Contrib/UBC/STAT/Archive_old_questions/STAT200/hw04/hw04-q05.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## KEYWORDS('Statistics','Sampling')
@@ -77,7 +77,7 @@ $ans1 = 6;
BEGIN_TEXT
-A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commerical, others a 90-second commerical. The same commerical was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
+A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commercial, others a 90-second commercial. The same commercial was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
$BR$BR
(a) \{ $mc[0]->print_q \}
diff --git a/Contrib/UBC/STAT/Archive_old_questions/STAT203/hw07/hw07-q02.pg b/Contrib/UBC/STAT/Archive_old_questions/STAT203/hw07/hw07-q02.pg
index c90257c5d5..9591c109fd 100644
--- a/Contrib/UBC/STAT/Archive_old_questions/STAT203/hw07/hw07-q02.pg
+++ b/Contrib/UBC/STAT/Archive_old_questions/STAT203/hw07/hw07-q02.pg
@@ -84,7 +84,7 @@ $ans1 = 9;
BEGIN_TEXT
-A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commerical, some saw a 60-second commercial, others a 90-second commerical. The same commerical was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich from the set {"Don't want to eat", "Neutral", "Want to eat"}.
+A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commercial, some saw a 60-second commercial, others a 90-second commercial. The same commercial was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich from the set {"Don't want to eat", "Neutral", "Want to eat"}.
$BR$BR
(a) \{ $mc[0]->print_q \}
diff --git a/Contrib/UBC/STAT/Archive_old_questions/STAT203_2016W1/HW07/hw07-q1.pg b/Contrib/UBC/STAT/Archive_old_questions/STAT203_2016W1/HW07/hw07-q1.pg
index 201394d4ba..39213a1a19 100644
--- a/Contrib/UBC/STAT/Archive_old_questions/STAT203_2016W1/HW07/hw07-q1.pg
+++ b/Contrib/UBC/STAT/Archive_old_questions/STAT203_2016W1/HW07/hw07-q1.pg
@@ -6,7 +6,7 @@
## ENDDESCRIPTION
## KEYWORDS('Experimental design', 'factors', 'treatments')
## Tagged by Nelson Chen. May 18, 2016.
-##Attempts: Three.
+##Attempts: Three.
#
# First comes some stuff that appears at the beginning of every problem
@@ -72,7 +72,7 @@ $ans1 = 6;
BEGIN_TEXT
-A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commerical, others a 90-second commerical. The same commerical was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
+A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commercial, others a 90-second commercial. The same commercial was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
$BR$BR
(a) \{ $mc[0]->print_q \}
diff --git a/Contrib/UBC/STAT/STAT200_Revised2016/HW04/hw04-q05.pg b/Contrib/UBC/STAT/STAT200_Revised2016/HW04/hw04-q05.pg
index 201394d4ba..39213a1a19 100644
--- a/Contrib/UBC/STAT/STAT200_Revised2016/HW04/hw04-q05.pg
+++ b/Contrib/UBC/STAT/STAT200_Revised2016/HW04/hw04-q05.pg
@@ -6,7 +6,7 @@
## ENDDESCRIPTION
## KEYWORDS('Experimental design', 'factors', 'treatments')
## Tagged by Nelson Chen. May 18, 2016.
-##Attempts: Three.
+##Attempts: Three.
#
# First comes some stuff that appears at the beginning of every problem
@@ -72,7 +72,7 @@ $ans1 = 6;
BEGIN_TEXT
-A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commerical, others a 90-second commerical. The same commerical was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
+A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commercial, others a 90-second commercial. The same commercial was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
$BR$BR
(a) \{ $mc[0]->print_q \}
diff --git a/Contrib/UBC/STAT/STAT203_2017W1/HW07/hw07-q1.pg b/Contrib/UBC/STAT/STAT203_2017W1/HW07/hw07-q1.pg
index 201394d4ba..39213a1a19 100644
--- a/Contrib/UBC/STAT/STAT203_2017W1/HW07/hw07-q1.pg
+++ b/Contrib/UBC/STAT/STAT203_2017W1/HW07/hw07-q1.pg
@@ -6,7 +6,7 @@
## ENDDESCRIPTION
## KEYWORDS('Experimental design', 'factors', 'treatments')
## Tagged by Nelson Chen. May 18, 2016.
-##Attempts: Three.
+##Attempts: Three.
#
# First comes some stuff that appears at the beginning of every problem
@@ -72,7 +72,7 @@ $ans1 = 6;
BEGIN_TEXT
-A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commerical, others a 90-second commerical. The same commerical was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
+A study investigated the effect of the length and the repetition of TV advertisements on students' desire to eat at a Sub-U-Like sandwich franchise. Sixty students watched a 50-minute television program that showed at least one commercial for Sub-U-Like during advertisement breaks. Some students saw a 30-second commercial, others a 90-second commercial. The same commercial was shown one, three, or five times during the program. After the viewing, each student was asked to rate their craving for a Sub-U-Like sandwich on a scale of 0 to 10.
$BR$BR
(a) \{ $mc[0]->print_q \}
diff --git a/Contrib/UBC/STAT/STAT300/hw06/stat300_hw06_q02.pg b/Contrib/UBC/STAT/STAT300/hw06/stat300_hw06_q02.pg
index 14e640fd57..dc95666536 100644
--- a/Contrib/UBC/STAT/STAT300/hw06/stat300_hw06_q02.pg
+++ b/Contrib/UBC/STAT/STAT300/hw06/stat300_hw06_q02.pg
@@ -13,7 +13,7 @@
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -176,7 +176,7 @@ $BCENTER
\(
\begin{array}{c c}
& \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{Company } \\
-\text{Crust type} &
+\text{Crust type} &
\begin{array}{c | c c}
& \text{Domino's} & \text{Eagle Boys} \\ \hline
\text{Deep pan} & $Dd[0],\: $Dd[1],\: $Dd[2],\: $Dd[3],\: $Dd[4] & $EBd[0],\: $EBd[1],\: $EBd[2],\: $EBd[3],\: $EBd[4] \\
@@ -235,14 +235,14 @@ $ECENTER
$BR
$BR
-Value for \(\text{(i)}\)
+Value for \(\text{(i)}\)
$BR
\{ ans_rule(12) \}
$BR
$BR
-Value for \(\text{(ii)}\)
+Value for \(\text{(ii)}\)
$BR
-\{ ans_rule(12) \}
+\{ ans_rule(12) \}
$BR
$BR
@@ -315,7 +315,7 @@ summary1\{$DOLLAR\}F
$EITALIC
$BR
$BR
-The above give the degrees of freedom, the sums of squares, the mean squares and the F statistic repectively. All of these are vectors, so for example, the error SS is taken via
+The above give the degrees of freedom, the sums of squares, the mean squares and the F statistic respectively. All of these are vectors, so for example, the error SS is taken via
$BR
$BR
$BITALIC
diff --git a/Contrib/UBC/STAT/STAT300/hw08/stat300_hw08_q02.pg b/Contrib/UBC/STAT/STAT300/hw08/stat300_hw08_q02.pg
index f2b673ebfa..cd07da592f 100644
--- a/Contrib/UBC/STAT/STAT300/hw08/stat300_hw08_q02.pg
+++ b/Contrib/UBC/STAT/STAT300/hw08/stat300_hw08_q02.pg
@@ -13,7 +13,7 @@
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -136,8 +136,8 @@ $ans_c = join ", ", rserve_eval('round(sum(temp$coefficients[,1] * c(1, 700, 700
$ans_d = join ", ", rserve_eval('round(sum(temp$coefficients[2:3,1] * c(1, 2*400)),4)');
# Part e
-rserve_eval('sum_200 <- round(sum(RegModel2$coef * c(1, 200, 200^2)), 3);
-sum_100 <- round(sum(RegModel2$coef * c(1, 100, 100^2)), 3);
+rserve_eval('sum_200 <- round(sum(RegModel2$coef * c(1, 200, 200^2)), 3);
+sum_100 <- round(sum(RegModel2$coef * c(1, 100, 100^2)), 3);
pivot = 100;
if( sum_200 > sum_100 ) pivot = 200;
sum_e = max(sum_100, sum_200);
@@ -179,7 +179,7 @@ West, R.W. and Kodell, R.L. (2005): Changepoint alternatives to the NOAEL.$BITAL
# Part a
$qu_a = "
-Suppose a model of the form
+Suppose a model of the form
$BR
$BR
$BCENTER
@@ -246,7 +246,7 @@ Assuming the above model is a good fit for the data, estimate the mean weight ga
# Part d
$qu_d = "
-What is the estimated$BITALIC rate of change$EITALIC of weight with repect to increase in aconiazide dose at dose level 400mg per kg of bodyweight per day? Give your answer to three decimal places.
+What is the estimated$BITALIC rate of change$EITALIC of weight with respect to increase in aconiazide dose at dose level 400mg per kg of bodyweight per day? Give your answer to three decimal places.
";
# Part e
@@ -355,14 +355,14 @@ $BR
$BBOLD Part a) $EBOLD
$BR
$BR
-The correct plot is plot $letter[$inv[$k]]
+The correct plot is plot $letter[$inv[$k]]
$BR
$BR
$BBOLD Part b) $EBOLD
$BR
$BR
-The fitted value at the origin is $ans_b
+The fitted value at the origin is $ans_b
$BR
$BR
@@ -376,7 +376,7 @@ $BR
$BBOLD Part d) $EBOLD
$BR
$BR
-For a model of the form
+For a model of the form
$BR
$BR
\[
@@ -384,7 +384,7 @@ Y = \beta_0 + \beta_{1}X + \beta_{2}X^2 + \epsilon
\]
$BR
$BR
-the rate of change of \(Y\) with \(X\) depends on the value of \(X\). Specifically, the rate of change at \(X = x\) is \(\beta_1 + 2\beta_{2}x\). For the model here, the rate of change of \(Y\) when \(X=400\) is
+the rate of change of \(Y\) with \(X\) depends on the value of \(X\). Specifically, the rate of change at \(X = x\) is \(\beta_1 + 2\beta_{2}x\). For the model here, the rate of change of \(Y\) when \(X=400\) is
$BR
$BR
\[
diff --git a/Contrib/UBC/STAT/STAT443/443HM6/stat443_hw06_01.pg b/Contrib/UBC/STAT/STAT443/443HM6/stat443_hw06_01.pg
index 154529777b..94f2d1f1aa 100644
--- a/Contrib/UBC/STAT/STAT443/443HM6/stat443_hw06_01.pg
+++ b/Contrib/UBC/STAT/STAT443/443HM6/stat443_hw06_01.pg
@@ -1,6 +1,6 @@
## DBsubject('Statistics')
## DBchapter('Time Series')
-## DBsection('Spectral analysis')
+## DBsection('Spectral analysis')
## level(4)
#########################################################
@@ -103,7 +103,7 @@ where \(Z(t)\) is Normally distributed white noise with standard deviation $sigm
$BR
$BR
$BBOLD Part (a) $EBOLD
-Linked above is a realisation of \(X\left( t\right),\) for \(t=1,2,\dots, 500.\) Using the command \({spec.pgram,}\) with \({log="no"}\) but otherwise taking default options, compute and plot the raw periodogram for the time series. Name your periodogram \({spec1}\). The vector \({spec1}\)$\({freq}\) gives the (approximate) Fourier frequencies at which the periodogram is computed, though these frequencies should be multiplied by \(2\pi\) to be consistent with definations given for spectral densities. Moreover, the periodogram values given by R are \(\pi\) times those given by the defination adopted. Compute the absolute difference between the raw periodogram from R (divided by \(\pi\)) and the spectral density of \(X\left( t\right) \) at the pth frequency where p = $p, giving your answer to three decimal places.
+Linked above is a realisation of \(X\left( t\right),\) for \(t=1,2,\dots, 500.\) Using the command \({spec.pgram,}\) with \({log="no"}\) but otherwise taking default options, compute and plot the raw periodogram for the time series. Name your periodogram \({spec1}\). The vector \({spec1}\)$\({freq}\) gives the (approximate) Fourier frequencies at which the periodogram is computed, though these frequencies should be multiplied by \(2\pi\) to be consistent with definitions given for spectral densities. Moreover, the periodogram values given by R are \(\pi\) times those given by the definition adopted. Compute the absolute difference between the raw periodogram from R (divided by \(\pi\)) and the spectral density of \(X\left( t\right) \) at the pth frequency where p = $p, giving your answer to three decimal places.
$BR
@@ -143,13 +143,13 @@ For the MA(1)
\[
X\left( t\right) =Z\left( t\right) +\beta Z\left( t-1\right)
\]
-the acf is
+the acf is
\[
\begin{align*}
-\rho \left( k\right) =\left \lbrace
+\rho \left( k\right) =\left \lbrace
\begin{array}{ccc}
-1 & & k=0 \\
-\frac{\beta }{1+\beta ^{2}} & & k=\pm 1 \\
+1 & & k=0 \\
+\frac{\beta }{1+\beta ^{2}} & & k=\pm 1 \\
0 & & \text{otherwise.}
\end{array}
\right.
@@ -163,20 +163,20 @@ f\left( \omega \right) =\frac{\left( \left( 1+\beta ^{2}\right) \sigma
1+\beta ^{2}}\right).
\end{align*}
\]
-To find the raw periodogram, not on the log scale,
+To find the raw periodogram, not on the log scale,
\[
spec1 <- spec.pgram(x1, log="no")
\]
-The above provides a plot by default. The plot will be noisy, and likely not closely resemble the theoretical spectrum. As indicated, \(spec1\)$\(freq\) lists the frequencies at which R computes the periodogram (and these may not exactly coincide with Fourier frequencies for \(n = 500\) due to tapering). At the pth frequency, the periodogram is
-$BCENTER
+The above provides a plot by default. The plot will be noisy, and likely not closely resemble the theoretical spectrum. As indicated, \(spec1\)$\(freq\) lists the frequencies at which R computes the periodogram (and these may not exactly coincide with Fourier frequencies for \(n = 500\) due to tapering). At the pth frequency, the periodogram is
+$BCENTER
\(I <- spec1\)$\(spec[p]\).
$ECENTER
-This is to be compared to \(f(\omega)\) at
-$BCENTER
-\(\omega = spec1\)$\(freq[p]\).
+This is to be compared to \(f(\omega)\) at
+$BCENTER
+\(\omega = spec1\)$\(freq[p]\).
$ECENTER
-An absolute di¤erence can be evaluated as follows:
-$BCENTER
+An absolute di¤erence can be evaluated as follows:
+$BCENTER
\(
\Big| \frac{\left( \left( 1+\beta ^{2}\right) \sigma^{2}\right) }{\pi }\left( 1+\frac{2\beta \cos \left( 2\pi \omega \right) }{1+\beta ^{2}}\right) - \frac{I}{\pi}\Big| = $data[0]
\)
diff --git a/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_04.pg b/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_04.pg
index 29c8e62242..63b12ca0ee 100644
--- a/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_04.pg
+++ b/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_04.pg
@@ -2,7 +2,7 @@
# DESCRIPTION
## DBsubject('Statistics')
## DBchapter('Time Series')
-## DBsection('Bivariate Series')
+## DBsection('Bivariate Series')
## level(4)
#########################################################
@@ -47,7 +47,7 @@ Context()->texStrings;
BEGIN_TEXT
The data plotted below are the (adjusted) amounts (in $\(10^6\) ) saved in personal checking accounts in Canadian banks for months between 1976 and 2004 inclusive.
$BCENTER
-\{ image( "Exam10q8PCAplot.png", width=>350, height=>350,
+\{ image( "Exam10q8PCAplot.png", width=>350, height=>350,
tex_size=>700) \}
$ECENTER
$BR
@@ -60,9 +60,9 @@ $BR
$BR
$BBOLD Part (b) $EBOLD
-Below are plotted the firrst differences of the PCA series above.
+Below are plotted the first differences of the PCA series above.
$BCENTER
-\{ image( "Exam10q8PCAdiff.png", width=>350, height=>350,
+\{ image( "Exam10q8PCAdiff.png", width=>350, height=>350,
tex_size=>700) \}
$ECENTER
Which nonstationary feature(s) does the above series exhibit?
@@ -75,12 +75,12 @@ $BR
$BBOLD Part (c) $EBOLD
Below are plotted the sample autocorrelation and partial autocorrelation functions of a modified version of the PCA series.
$BCENTER
-\{ image( "Exam10q8PCAacf.png", width=>350, height=>350,
+\{ image( "Exam10q8PCAacf.png", width=>350, height=>350,
tex_size=>700) \}
-\{ image( "Exam10q8PCApacf.png", width=>350, height=>350,
+\{ image( "Exam10q8PCApacf.png", width=>350, height=>350,
tex_size=>700) \}
$ECENTER
-Comments on the above plots
+Comments on the above plots
$BR
\{ ans_rule(20) \}
$BR
@@ -111,7 +111,7 @@ Context()->texStrings;
BEGIN_SOLUTION
$BR
$BBOLD Part (a) $EBOLD
-The series exhibits a change in behaviour around 1994, when the apparent trend appears to increase dramatically. Models encountered will not handle such situations.
+The series exhibits a change in behaviour around 1994, when the apparent trend appears to increase dramatically. Models encountered will not handle such situations.
$BR
$BR
diff --git a/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_05.pg b/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_05.pg
index e155805356..ef78edcf96 100644
--- a/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_05.pg
+++ b/Contrib/UBC/STAT/STAT443/Final_Practice/stat443_05.pg
@@ -2,7 +2,7 @@
# DESCRIPTION
## DBsubject('Statistics')
## DBchapter('Time Series')
-## DBsection('Bivariate Series')
+## DBsection('Bivariate Series')
## level(4)
#########################################################
@@ -39,7 +39,7 @@ Context()->texStrings;
BEGIN_TEXT
This question concerns the model
\[ X(t) = 0.5X(t-1) + Z(t) - Z(t-1) + Z(t-2) \]
-in which \(Z(t)\) is white noise whith mean 0 and variance \(\sigma^2\). It is assumed that \(E(X(t)) = 0\) for all t.
+in which \(Z(t)\) is white noise with mean 0 and variance \(\sigma^2\). It is assumed that \(E(X(t)) = 0\) for all t.
$BR
$BBOLD Part (a) $EBOLD
@@ -50,7 +50,7 @@ $BR
$BR
$BBOLD Part (b) $EBOLD
-Show the following:
+Show the following:
\[ E(X(t)Z(t)) = \sigma^2 \]
\[ E(X(t)Z(t-1)) = -0.5\sigma^2 \]
\[ E(X(t)Z(t-2)) = 0.75\sigma^2 \]
@@ -60,7 +60,7 @@ $BR
$BR
$BBOLD Part (c) $EBOLD
-With \( \gamma(k) = E( X(t)X(t-k) ), \) show that
+With \( \gamma(k) = E( X(t)X(t-k) ), \) show that
\[ \gamma(0) = 0.5\gamma(1) + 2.25 \sigma^2, \]
\[ \gamma(1) = 0.5\gamma(0) - 1.5\sigma^2. \]
$BR
@@ -69,7 +69,7 @@ $BR
$BR
$BBOLD Part (d) $EBOLD
-Find the variance of \(X(t)\) in terms of \(\sigma^2\), and the autocorrelation function of \(X(t)\) at lag 1.
+Find the variance of \(X(t)\) in terms of \(\sigma^2\), and the autocorrelation function of \(X(t)\) at lag 1.
$BR
\{ ans_rule(6) \}
$BR
@@ -97,12 +97,12 @@ $BCENTER
\[
\begin{array}{c|ccc}
t & x(t) & \hat{x}(t) \\ \hline
-2 & -0.13 & 0.12 \\
+2 & -0.13 & 0.12 \\
\vdots & \vdots & \vdots \\
-57 & -2.00 & 1.02 \\
-58 & -0.51 & 1.91 \\
+57 & -2.00 & 1.02 \\
+58 & -0.51 & 1.91 \\
59 & -1.04 & -0.85 \\
-60 & -5.22 & -2.75
+60 & -5.22 & -2.75
\end{array}
\]
$ECENTER
@@ -145,40 +145,40 @@ Context()->texStrings;
BEGIN_SOLUTION
$BR
$BBOLD Part (a) $EBOLD
-Yes.
+Yes.
$BR
$BR
$BBOLD Part (b) $EBOLD
-Now
+Now
\[
-X\left( t\right) Z\left( t\right) =0.5X\left( t-1\right) Z\left( t\right) +Z\left( t\right) ^{2}-Z\left( t-1\right) Z\left( t\right) +Z\left(t-2\right) Z\left( t\right) ,
+X\left( t\right) Z\left( t\right) =0.5X\left( t-1\right) Z\left( t\right) +Z\left( t\right) ^{2}-Z\left( t-1\right) Z\left( t\right) +Z\left(t-2\right) Z\left( t\right) ,
\]
-and so taking expectations,
+and so taking expectations,
\[
-E\left( X\left( t\right) Z\left( t\right) \right) =0+\sigma ^{2}-0-0=\sigma^{2}.
+E\left( X\left( t\right) Z\left( t\right) \right) =0+\sigma ^{2}-0-0=\sigma^{2}.
\]
-Furthermore,
+Furthermore,
\[
\begin{eqnarray*}
X\left( t\right) Z\left( t-1\right) =0.5X\left( t-1\right) Z\left(t-1\right) +Z\left( t\right) Z\left( t-1\right) - \\
-Z\left( t-1\right)^{2}+Z\left( t-2\right) Z\left( t-1\right)
+Z\left( t-1\right)^{2}+Z\left( t-2\right) Z\left( t-1\right)
\end{eqnarray*}
\]
-and so
+and so
\[
-E\left( X\left( t\right) Z\left( t-1\right) \right) =0.5\sigma ^{2}+0-\sigma^{2}+0=-0.5\sigma ^{2}.
+E\left( X\left( t\right) Z\left( t-1\right) \right) =0.5\sigma ^{2}+0-\sigma^{2}+0=-0.5\sigma ^{2}.
\]
-Finally,
+Finally,
\[
\begin{eqnarray*}
X\left( t\right) Z\left( t-2\right) &=&0.5X\left( t-1\right) Z\left(t-2\right) +Z\left( t\right) Z\left( t-2\right) \\
&&\qquad -Z\left( t-1\right) Z\left( t-2\right) +Z\left( t-2\right) ^{2}
\end{eqnarray*}
\]
-and hence,
+and hence,
\[
-E\left( X\left( t\right) Z\left( t-2\right) \right) =0.5\left( -0.5\sigma^{2}\right) +0-0+\sigma ^{2}=0.75\sigma^{2}.
+E\left( X\left( t\right) Z\left( t-2\right) \right) =0.5\left( -0.5\sigma^{2}\right) +0-0+\sigma ^{2}=0.75\sigma^{2}.
\]
$BR
@@ -192,7 +192,7 @@ t-k\right) \right)\), show that
\gamma \left( 1\right) &=&0.5\gamma \left( 0\right) -1.5\sigma ^{2}.
\end{eqnarray*}
\]
-Clearly,
+Clearly,
\[
\begin{eqnarray*}
X\left( t\right) X\left( t-k\right) &=&0.5X\left( t-1\right) X\left(
@@ -201,7 +201,7 @@ t-k\right) +Z\left( t\right) X\left( t-k\right) \\
t-k\right)
\end{eqnarray*}
\]
-and so
+and so
\[
\begin{eqnarray*}
X\left( t\right) X\left( t-k\right) &=&0.5X\left( t-1\right) X\left(
@@ -223,7 +223,7 @@ Using the results from (b), we find
$BR
$BR
$BBOLD Part (d) $EBOLD
-Find the variance of \(X\left( t\right)\) in terms of \(\sigma ^{2},\) and the autocorrelation function of \(X\left( t\right)\) at lag 1.
+Find the variance of \(X\left( t\right)\) in terms of \(\sigma ^{2},\) and the autocorrelation function of \(X\left( t\right)\) at lag 1.
Solving the two equations above, we find
\[
\begin{eqnarray*}
@@ -231,7 +231,7 @@ Solving the two equations above, we find
0.5\gamma \left( 0\right) &=&\gamma \left( 1\right) =1.5\sigma ^{2}.
\end{eqnarray*}
\]
-Therefore,
+Therefore,
\[
\begin{eqnarray*}
\gamma \left( 0\right) &=&2\sigma ^{2}, \\
@@ -239,9 +239,9 @@ Therefore,
^{2}=-0.5\sigma ^{2}
\end{eqnarray*}
\]
-and so
+and so
\[
-\rho \left( 1\right) =\frac{\gamma \left( 1\right) }{\gamma \left( 0\right) }=-0.25.
+\rho \left( 1\right) =\frac{\gamma \left( 1\right) }{\gamma \left( 0\right) }=-0.25.
\]
$BR
@@ -255,7 +255,7 @@ The model can be written in the form
&=&Z\left( t\right) -Z\left( t-1\right) +Z\left( t-2\right) .
\end{eqnarray*}
\]
-Now
+Now
\[
\begin{eqnarray*}
\left( 1-0.5B\right) \sum_{j=0}^{\infty }\psi _{j}Z\left( t-j\right)
@@ -306,7 +306,7 @@ so here the intervals are
\[
-0.33\pm 1.98
\]
-i.e., \(\left( -2.31,1.65\right)\) and
+i.e., \(\left( -2.31,1.65\right)\) and
\[
-2.64\pm 1.96\times 1.01\sqrt{1+0.5^{2}}=-2.64\pm
2.213\,\,
diff --git a/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_04.pg b/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_04.pg
index 29c8e62242..63b12ca0ee 100644
--- a/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_04.pg
+++ b/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_04.pg
@@ -2,7 +2,7 @@
# DESCRIPTION
## DBsubject('Statistics')
## DBchapter('Time Series')
-## DBsection('Bivariate Series')
+## DBsection('Bivariate Series')
## level(4)
#########################################################
@@ -47,7 +47,7 @@ Context()->texStrings;
BEGIN_TEXT
The data plotted below are the (adjusted) amounts (in $\(10^6\) ) saved in personal checking accounts in Canadian banks for months between 1976 and 2004 inclusive.
$BCENTER
-\{ image( "Exam10q8PCAplot.png", width=>350, height=>350,
+\{ image( "Exam10q8PCAplot.png", width=>350, height=>350,
tex_size=>700) \}
$ECENTER
$BR
@@ -60,9 +60,9 @@ $BR
$BR
$BBOLD Part (b) $EBOLD
-Below are plotted the firrst differences of the PCA series above.
+Below are plotted the first differences of the PCA series above.
$BCENTER
-\{ image( "Exam10q8PCAdiff.png", width=>350, height=>350,
+\{ image( "Exam10q8PCAdiff.png", width=>350, height=>350,
tex_size=>700) \}
$ECENTER
Which nonstationary feature(s) does the above series exhibit?
@@ -75,12 +75,12 @@ $BR
$BBOLD Part (c) $EBOLD
Below are plotted the sample autocorrelation and partial autocorrelation functions of a modified version of the PCA series.
$BCENTER
-\{ image( "Exam10q8PCAacf.png", width=>350, height=>350,
+\{ image( "Exam10q8PCAacf.png", width=>350, height=>350,
tex_size=>700) \}
-\{ image( "Exam10q8PCApacf.png", width=>350, height=>350,
+\{ image( "Exam10q8PCApacf.png", width=>350, height=>350,
tex_size=>700) \}
$ECENTER
-Comments on the above plots
+Comments on the above plots
$BR
\{ ans_rule(20) \}
$BR
@@ -111,7 +111,7 @@ Context()->texStrings;
BEGIN_SOLUTION
$BR
$BBOLD Part (a) $EBOLD
-The series exhibits a change in behaviour around 1994, when the apparent trend appears to increase dramatically. Models encountered will not handle such situations.
+The series exhibits a change in behaviour around 1994, when the apparent trend appears to increase dramatically. Models encountered will not handle such situations.
$BR
$BR
diff --git a/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_05.pg b/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_05.pg
index e155805356..ef78edcf96 100644
--- a/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_05.pg
+++ b/Contrib/UBC/STAT/STAT443_subscripts/Final_Practice/stat443_05.pg
@@ -2,7 +2,7 @@
# DESCRIPTION
## DBsubject('Statistics')
## DBchapter('Time Series')
-## DBsection('Bivariate Series')
+## DBsection('Bivariate Series')
## level(4)
#########################################################
@@ -39,7 +39,7 @@ Context()->texStrings;
BEGIN_TEXT
This question concerns the model
\[ X(t) = 0.5X(t-1) + Z(t) - Z(t-1) + Z(t-2) \]
-in which \(Z(t)\) is white noise whith mean 0 and variance \(\sigma^2\). It is assumed that \(E(X(t)) = 0\) for all t.
+in which \(Z(t)\) is white noise with mean 0 and variance \(\sigma^2\). It is assumed that \(E(X(t)) = 0\) for all t.
$BR
$BBOLD Part (a) $EBOLD
@@ -50,7 +50,7 @@ $BR
$BR
$BBOLD Part (b) $EBOLD
-Show the following:
+Show the following:
\[ E(X(t)Z(t)) = \sigma^2 \]
\[ E(X(t)Z(t-1)) = -0.5\sigma^2 \]
\[ E(X(t)Z(t-2)) = 0.75\sigma^2 \]
@@ -60,7 +60,7 @@ $BR
$BR
$BBOLD Part (c) $EBOLD
-With \( \gamma(k) = E( X(t)X(t-k) ), \) show that
+With \( \gamma(k) = E( X(t)X(t-k) ), \) show that
\[ \gamma(0) = 0.5\gamma(1) + 2.25 \sigma^2, \]
\[ \gamma(1) = 0.5\gamma(0) - 1.5\sigma^2. \]
$BR
@@ -69,7 +69,7 @@ $BR
$BR
$BBOLD Part (d) $EBOLD
-Find the variance of \(X(t)\) in terms of \(\sigma^2\), and the autocorrelation function of \(X(t)\) at lag 1.
+Find the variance of \(X(t)\) in terms of \(\sigma^2\), and the autocorrelation function of \(X(t)\) at lag 1.
$BR
\{ ans_rule(6) \}
$BR
@@ -97,12 +97,12 @@ $BCENTER
\[
\begin{array}{c|ccc}
t & x(t) & \hat{x}(t) \\ \hline
-2 & -0.13 & 0.12 \\
+2 & -0.13 & 0.12 \\
\vdots & \vdots & \vdots \\
-57 & -2.00 & 1.02 \\
-58 & -0.51 & 1.91 \\
+57 & -2.00 & 1.02 \\
+58 & -0.51 & 1.91 \\
59 & -1.04 & -0.85 \\
-60 & -5.22 & -2.75
+60 & -5.22 & -2.75
\end{array}
\]
$ECENTER
@@ -145,40 +145,40 @@ Context()->texStrings;
BEGIN_SOLUTION
$BR
$BBOLD Part (a) $EBOLD
-Yes.
+Yes.
$BR
$BR
$BBOLD Part (b) $EBOLD
-Now
+Now
\[
-X\left( t\right) Z\left( t\right) =0.5X\left( t-1\right) Z\left( t\right) +Z\left( t\right) ^{2}-Z\left( t-1\right) Z\left( t\right) +Z\left(t-2\right) Z\left( t\right) ,
+X\left( t\right) Z\left( t\right) =0.5X\left( t-1\right) Z\left( t\right) +Z\left( t\right) ^{2}-Z\left( t-1\right) Z\left( t\right) +Z\left(t-2\right) Z\left( t\right) ,
\]
-and so taking expectations,
+and so taking expectations,
\[
-E\left( X\left( t\right) Z\left( t\right) \right) =0+\sigma ^{2}-0-0=\sigma^{2}.
+E\left( X\left( t\right) Z\left( t\right) \right) =0+\sigma ^{2}-0-0=\sigma^{2}.
\]
-Furthermore,
+Furthermore,
\[
\begin{eqnarray*}
X\left( t\right) Z\left( t-1\right) =0.5X\left( t-1\right) Z\left(t-1\right) +Z\left( t\right) Z\left( t-1\right) - \\
-Z\left( t-1\right)^{2}+Z\left( t-2\right) Z\left( t-1\right)
+Z\left( t-1\right)^{2}+Z\left( t-2\right) Z\left( t-1\right)
\end{eqnarray*}
\]
-and so
+and so
\[
-E\left( X\left( t\right) Z\left( t-1\right) \right) =0.5\sigma ^{2}+0-\sigma^{2}+0=-0.5\sigma ^{2}.
+E\left( X\left( t\right) Z\left( t-1\right) \right) =0.5\sigma ^{2}+0-\sigma^{2}+0=-0.5\sigma ^{2}.
\]
-Finally,
+Finally,
\[
\begin{eqnarray*}
X\left( t\right) Z\left( t-2\right) &=&0.5X\left( t-1\right) Z\left(t-2\right) +Z\left( t\right) Z\left( t-2\right) \\
&&\qquad -Z\left( t-1\right) Z\left( t-2\right) +Z\left( t-2\right) ^{2}
\end{eqnarray*}
\]
-and hence,
+and hence,
\[
-E\left( X\left( t\right) Z\left( t-2\right) \right) =0.5\left( -0.5\sigma^{2}\right) +0-0+\sigma ^{2}=0.75\sigma^{2}.
+E\left( X\left( t\right) Z\left( t-2\right) \right) =0.5\left( -0.5\sigma^{2}\right) +0-0+\sigma ^{2}=0.75\sigma^{2}.
\]
$BR
@@ -192,7 +192,7 @@ t-k\right) \right)\), show that
\gamma \left( 1\right) &=&0.5\gamma \left( 0\right) -1.5\sigma ^{2}.
\end{eqnarray*}
\]
-Clearly,
+Clearly,
\[
\begin{eqnarray*}
X\left( t\right) X\left( t-k\right) &=&0.5X\left( t-1\right) X\left(
@@ -201,7 +201,7 @@ t-k\right) +Z\left( t\right) X\left( t-k\right) \\
t-k\right)
\end{eqnarray*}
\]
-and so
+and so
\[
\begin{eqnarray*}
X\left( t\right) X\left( t-k\right) &=&0.5X\left( t-1\right) X\left(
@@ -223,7 +223,7 @@ Using the results from (b), we find
$BR
$BR
$BBOLD Part (d) $EBOLD
-Find the variance of \(X\left( t\right)\) in terms of \(\sigma ^{2},\) and the autocorrelation function of \(X\left( t\right)\) at lag 1.
+Find the variance of \(X\left( t\right)\) in terms of \(\sigma ^{2},\) and the autocorrelation function of \(X\left( t\right)\) at lag 1.
Solving the two equations above, we find
\[
\begin{eqnarray*}
@@ -231,7 +231,7 @@ Solving the two equations above, we find
0.5\gamma \left( 0\right) &=&\gamma \left( 1\right) =1.5\sigma ^{2}.
\end{eqnarray*}
\]
-Therefore,
+Therefore,
\[
\begin{eqnarray*}
\gamma \left( 0\right) &=&2\sigma ^{2}, \\
@@ -239,9 +239,9 @@ Therefore,
^{2}=-0.5\sigma ^{2}
\end{eqnarray*}
\]
-and so
+and so
\[
-\rho \left( 1\right) =\frac{\gamma \left( 1\right) }{\gamma \left( 0\right) }=-0.25.
+\rho \left( 1\right) =\frac{\gamma \left( 1\right) }{\gamma \left( 0\right) }=-0.25.
\]
$BR
@@ -255,7 +255,7 @@ The model can be written in the form
&=&Z\left( t\right) -Z\left( t-1\right) +Z\left( t-2\right) .
\end{eqnarray*}
\]
-Now
+Now
\[
\begin{eqnarray*}
\left( 1-0.5B\right) \sum_{j=0}^{\infty }\psi _{j}Z\left( t-j\right)
@@ -306,7 +306,7 @@ so here the intervals are
\[
-0.33\pm 1.98
\]
-i.e., \(\left( -2.31,1.65\right)\) and
+i.e., \(\left( -2.31,1.65\right)\) and
\[
-2.64\pm 1.96\times 1.01\sqrt{1+0.5^{2}}=-2.64\pm
2.213\,\,
diff --git a/Contrib/UBC/STAT/STAT443_subscripts/HW06/stat443_hw06_01.pg b/Contrib/UBC/STAT/STAT443_subscripts/HW06/stat443_hw06_01.pg
index a6fbb2bedf..aecc949712 100644
--- a/Contrib/UBC/STAT/STAT443_subscripts/HW06/stat443_hw06_01.pg
+++ b/Contrib/UBC/STAT/STAT443_subscripts/HW06/stat443_hw06_01.pg
@@ -104,7 +104,7 @@ where \(Z_t\) is Normally distributed white noise with standard deviation $sigma
$BR
$BR
$BBOLD Part (a) $EBOLD
-Linked above is a realisation of \(X_t,\) for \(t=1,2,\dots, 500.\) Using the command \({spec.pgram,}\) with \({log="no"}\) but otherwise taking default options, compute and plot the raw periodogram for the time series. Name your periodogram \({spec1}\). The vector \({spec1}\)$\({freq}\) gives the (approximate) Fourier frequencies at which the periodogram is computed, though these frequencies should be multiplied by \(2\pi\) to be consistent with definations given for spectral densities. Moreover, the periodogram values given by R are \(\pi\) times those given by the defination adopted. Compute the absolute difference between the raw periodogram from R (divided by \(\pi\)) and the spectral density of \(X_t \) at the pth frequency where p = $p, giving your answer to three decimal places.
+Linked above is a realisation of \(X_t,\) for \(t=1,2,\dots, 500.\) Using the command \({spec.pgram,}\) with \({log="no"}\) but otherwise taking default options, compute and plot the raw periodogram for the time series. Name your periodogram \({spec1}\). The vector \({spec1}\)$\({freq}\) gives the (approximate) Fourier frequencies at which the periodogram is computed, though these frequencies should be multiplied by \(2\pi\) to be consistent with definitions given for spectral densities. Moreover, the periodogram values given by R are \(\pi\) times those given by the definition adopted. Compute the absolute difference between the raw periodogram from R (divided by \(\pi\)) and the spectral density of \(X_t \) at the pth frequency where p = $p, giving your answer to three decimal places.
$BR
@@ -144,13 +144,13 @@ For the MA(1)
\[
X_t =Z_t +\beta Z_{t-1}
\]
-the acf is
+the acf is
\[
\begin{align*}
-\rho \left( k\right) =\left \lbrace
+\rho \left( k\right) =\left \lbrace
\begin{array}{ccc}
-1 & & k=0 \\
-\frac{\beta }{1+\beta ^{2}} & & k=\pm 1 \\
+1 & & k=0 \\
+\frac{\beta }{1+\beta ^{2}} & & k=\pm 1 \\
0 & & \text{otherwise.}
\end{array}
\right.
@@ -164,20 +164,20 @@ f\left( \omega \right) =\frac{\left( \left( 1+\beta ^{2}\right) \sigma
1+\beta ^{2}}\right).
\end{align*}
\]
-To find the raw periodogram, not on the log scale,
+To find the raw periodogram, not on the log scale,
\[
spec1 <- spec.pgram(x1, log="no")
\]
-The above provides a plot by default. The plot will be noisy, and likely not closely resemble the theoretical spectrum. As indicated, \(spec1\)$\(freq\) lists the frequencies at which R computes the periodogram (and these may not exactly coincide with Fourier frequencies for \(n = 500\) due to tapering). At the pth frequency, the periodogram is
-$BCENTER
+The above provides a plot by default. The plot will be noisy, and likely not closely resemble the theoretical spectrum. As indicated, \(spec1\)$\(freq\) lists the frequencies at which R computes the periodogram (and these may not exactly coincide with Fourier frequencies for \(n = 500\) due to tapering). At the pth frequency, the periodogram is
+$BCENTER
\(I <- spec1\)$\(spec[p]\).
$ECENTER
-This is to be compared to \(f(\omega)\) at
-$BCENTER
-\(\omega = spec1\)$\(freq[p]\).
+This is to be compared to \(f(\omega)\) at
+$BCENTER
+\(\omega = spec1\)$\(freq[p]\).
$ECENTER
-An absolute di¤erence can be evaluated as follows:
-$BCENTER
+An absolute di¤erence can be evaluated as follows:
+$BCENTER
\(
\Big| \frac{\left( \left( 1+\beta ^{2}\right) \sigma^{2}\right) }{\pi }\left( 1+\frac{2\beta \cos \left( 2\pi \omega \right) }{1+\beta ^{2}}\right) - \frac{I}{\pi}\Big| = $data[0]
\)
diff --git a/Contrib/UBC/setrRates/p1.pg b/Contrib/UBC/setrRates/p1.pg
index 1191d71573..633ec2a091 100644
--- a/Contrib/UBC/setrRates/p1.pg
+++ b/Contrib/UBC/setrRates/p1.pg
@@ -1,4 +1,4 @@
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -23,7 +23,7 @@ $PAR
In terms of \(x\), and \(y\), \(\frac{dy}{dx} = \) \{ans_rule(40)\}
$PAR
In terms of \(x\) and \(y\), \(\frac{d^2y}{dx^2} = \) \{ans_rule(40)\}
-$BR $BBOLD Note: $EBOLD You will not receive any marks if you simply isolate for \(y\), and then differentiate. You must use the rules of implicit differentiation and simplyfy as much as possible.
+$BR $BBOLD Note: $EBOLD You will not receive any marks if you simply isolate for \(y\), and then differentiate. You must use the rules of implicit differentiation and simplify as much as possible.
END_TEXT
Context()->normalStrings;
@@ -52,4 +52,4 @@ $BR\(=-\frac{$a2 x}{y^5}\)
END_SOLUTION
Context()->normalStrings;
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg
index 3333dbb407..7115380900 100644
--- a/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg
+++ b/Contrib/Westmont/ActiveCalculus/Preview_8_3/preview_8_3_all.pg
@@ -27,7 +27,7 @@ loadMacros(
# install_problem_grader(~~&std_problem_grader);
# 0 does not show correct answers and 1 does show them
-$showPartialCorrectAnswers = 1;
+$showPartialCorrectAnswers = 1;
######################################
@@ -49,10 +49,10 @@ TEXT(beginproblem());
Context()->texStrings;
BEGIN_TEXT
-Have you ever wondered how your calculator can produce a numeric approximation for
-complicated numbers like \(e\), \(\pi\) or \(\ln(2)\)? After all, the only operations a
-calculator can really perform are addition, subtraction, multiplication, and division,
-the operations that make up polynomials. This activity provides the first steps in
+Have you ever wondered how your calculator can produce a numeric approximation for
+complicated numbers like \(e\), \(\pi\) or \(\ln(2)\)? After all, the only operations a
+calculator can really perform are addition, subtraction, multiplication, and division,
+the operations that make up polynomials. This activity provides the first steps in
understanding how this process works. Throughout the activity, let \(f(x) = e^x\).
$PAR
@@ -60,19 +60,19 @@ $BBOLD Part (a) $EBOLD $PAR
The tangent line to \(f = e^x\) at \(x=0\) is \(L(x) =\) \{ans_rule(10)\}.
$PAR
-The formula \(L(x)\) can be used to appriximate \(e\) since \(L(1) \approx f(1) = e\). In particular,
+The formula \(L(x)\) can be used to approximate \(e\) since \(L(1) \approx f(1) = e\). In particular,
\(L(1)=\)\{ans_rule(10)\}.
$PAR
$BBOLD Part (b) $EBOLD $PAR
-The linearization of \(e^x\) does not provide a good approximation to \(e\)
-since 1 is not very close to 0. To obtain a better approximation, we alter our approach a bit.
-Instead of using a straight line to approximate \(e\), we put an appropriate bend in our estimating
-function to make it better fit the graph of \(e^x\) for \(x\) close to 0. With the linearization,
+The linearization of \(e^x\) does not provide a good approximation to \(e\)
+since 1 is not very close to 0. To obtain a better approximation, we alter our approach a bit.
+Instead of using a straight line to approximate \(e\), we put an appropriate bend in our estimating
+function to make it better fit the graph of \(e^x\) for \(x\) close to 0. With the linearization,
we had both \(f(x)\) and \(f'(x)\) \{#'# syntax color issue\}
-share the same value as the linearization at \(x=0\). We will now use a quadratic approximation
-\(P_2(x)\) to \(f(x) = e^x\) centered at \(x=0\) which has the property that \(P_2(0) = f(0)\),
+share the same value as the linearization at \(x=0\). We will now use a quadratic approximation
+\(P_2(x)\) to \(f(x) = e^x\) centered at \(x=0\) which has the property that \(P_2(0) = f(0)\),
\(P'_2(0) = f'(0)\), and \(P''_2(0) = f''(0)\).
$PAR
@@ -82,14 +82,14 @@ $PAR
\(P'_2(0)=\) \{ans_rule(10)\}, this should equal \(f'(0)=\) \{ans_rule(10)\};$BR
\(P''_2(0)=\) \{ans_rule(10)\}, this should equal \(f''(0)=\)\{ans_rule(10)\}.$PAR
- Now that you have shown the equalities above, use \(P_2(x)\) to approximate \(e\) by observing that
+ Now that you have shown the equalities above, use \(P_2(x)\) to approximate \(e\) by observing that
\(P_2(1) \approx f(1)\). In particular \(P_2(1) =\)\{ans_rule(10)\}.
$PAR
- (ii) We can continue approximating \(e\) with polynomials of larger degree whose higher
- derivatives agree with those of \(f\) at 0. This turns out to make the polynomials fit the graph
- of \(f\) better for more values of \(x\) around 0. For example, let
- \(P_3(x) = 1+x+\frac{x^2}{2}+\frac{x^3}{6}\). Show that \(P_3(0) = f(0)\), \(P'_3(0) = f'(0)\),
+ (ii) We can continue approximating \(e\) with polynomials of larger degree whose higher
+ derivatives agree with those of \(f\) at 0. This turns out to make the polynomials fit the graph
+ of \(f\) better for more values of \(x\) around 0. For example, let
+ \(P_3(x) = 1+x+\frac{x^2}{2}+\frac{x^3}{6}\). Show that \(P_3(0) = f(0)\), \(P'_3(0) = f'(0)\),
\(P''_3(0) = f''(0)\), and \(P'''_3(0) = f'''(0)\) by completing the following:
$PAR
@@ -97,7 +97,7 @@ $PAR
\(P'_3(0)=\) \{ans_rule(10)\}, \(f'(0)=\) \{ans_rule(10)\};$BR
\(P''_3(0)=\) \{ans_rule(10)\}, \(f''(0)=\)\{ans_rule(10)\}.$PAR
- Now use \(P_3(x)\) to approximate \(e\) in a way
+ Now use \(P_3(x)\) to approximate \(e\) in a way
similar to how you did so with \(P_2(x)\) above. In particular, \(P_3(1) = \)\{ans_rule(10)\}.
$PAR
@@ -119,7 +119,7 @@ ANS( $one -> cmp );
ANS( $one -> cmp );
ANS( $one -> cmp );
ANS( $one -> cmp );
-ANS( $one -> cmp );
+ANS( $one -> cmp );
ANS( $P2one -> cmp );
# Answers to (b.ii)
@@ -128,7 +128,7 @@ ANS( $one -> cmp );
ANS( $one -> cmp );
ANS( $one -> cmp );
ANS( $one -> cmp );
-ANS( $one -> cmp );
+ANS( $one -> cmp );
ANS( $P3one -> cmp );
@@ -188,4 +188,3 @@ ENDDOCUMENT();
# \end{activitySolution}
-
diff --git a/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg
index 2475d5b8ad..52af4e1b76 100644
--- a/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg
+++ b/Contrib/Westmont/ActiveCalculus/Preview_8_4/preview_8_4_all.pg
@@ -27,7 +27,7 @@ loadMacros(
# install_problem_grader(~~&std_problem_grader);
# 0 does not show correct answers and 1 does show them
-$showPartialCorrectAnswers = 1;
+$showPartialCorrectAnswers = 1;
######################################
@@ -52,9 +52,9 @@ Context()->texStrings;
BEGIN_TEXT
-It can be shown how to approximate the number \(e\) with linear, quadratic,
-and other polynomial approximations. We use a similar approach in this activity to obtain linear
-and quadratic approximations to \(\ln(2)\). Along the way, we encounter a type of series that is
+It can be shown how to approximate the number \(e\) with linear, quadratic,
+and other polynomial approximations. We use a similar approach in this activity to obtain linear
+and quadratic approximations to \(\ln(2)\). Along the way, we encounter a type of series that is
different than most of the ones we have seen so far. Throughout this activity, let \(f(x) = \ln(1+x)\).
$PAR
@@ -62,19 +62,19 @@ $BBOLD Part (a) $EBOLD $PAR
The tangent line to \(f = \ln(1+x)\) at \(x=0\) is \(L(x) =\) \{ans_rule(10)\}.
$PAR
-The formula \(L(x)\) can be used to appriximate \(\ln(2)\) since \(L(1) \approx f(1) = \ln(2)\). In particular,
+The formula \(L(x)\) can be used to approximate \(\ln(2)\) since \(L(1) \approx f(1) = \ln(2)\). In particular,
\(L(1)=\)\{ans_rule(10)\}.
$PAR
$BBOLD Part (b) $EBOLD $PAR
-The linearization of \(\ln(1+x)\) does not provide a very good approximation to \(\ln(2)\) since 1 is
-not that close to 0. To obtain a better approximation, we alter our approach; instead of using a
-straight line to approximate \(\ln(2)\), we use a quadratic function to account for the concavity of
-\(\ln(1+x)\) for \(x\) close to 0. With the linearization, both the function's value and slope agree
-with the linearization's value and slope at \(x=0\). We will now make a quadratic approximation
-\(P_2(x)\) to \(f(x) = \ln(1+x)\) centered at \(x=0\) with the property that \(P_2(0) = f(0)\),
-\(P'_2(0) = f'(0)\), and \(P''_2(0) = f''(0)\).
+The linearization of \(\ln(1+x)\) does not provide a very good approximation to \(\ln(2)\) since 1 is
+not that close to 0. To obtain a better approximation, we alter our approach; instead of using a
+straight line to approximate \(\ln(2)\), we use a quadratic function to account for the concavity of
+\(\ln(1+x)\) for \(x\) close to 0. With the linearization, both the function's value and slope agree
+with the linearization's value and slope at \(x=0\). We will now make a quadratic approximation
+\(P_2(x)\) to \(f(x) = \ln(1+x)\) centered at \(x=0\) with the property that \(P_2(0) = f(0)\),
+\(P'_2(0) = f'(0)\), and \(P''_2(0) = f''(0)\).
(i) Let $P_2(x) = x - \frac{x^2}{2}$. Compute the following: $PAR
@@ -82,15 +82,15 @@ with the linearization's value and slope at \(x=0\). We will now make a quadrati
\(P'_2(0)=\) \{ans_rule(10)\}, this should equal \(f'(0)=\) \{ans_rule(10)\};$BR
\(P''_2(0)=\) \{ans_rule(10)\}, this should equal \(f''(0)=\)\{ans_rule(10)\}.$PAR
- Now that you have shown the equalities above, use \(P_2(x)\) to approximate \(\ln(2)\) by observing that
+ Now that you have shown the equalities above, use \(P_2(x)\) to approximate \(\ln(2)\) by observing that
\(P_2(1) \approx f(1)\). In particular \(P_2(1) =\)\{ans_rule(10)\}.
$PAR
-
- (ii) We can continue approximating \(\ln(2)\) with polynomials of larger degree whose derivatives
- agree with those of \(f\) at 0. This makes the polynomials fit the graph of \(f\) better for more
- values of \(x\) around 0. For example, let \(P_3(x) = x - \frac{x^2}{2}+\frac{x^3}{3}\). Show that
- \(P_3(0) = f(0)\), \(P'_3(0) = f'(0)\), \(P''_3(0) = f''(0)\), and \(P'''_3(0) = f'''(0)\) by completing
+
+ (ii) We can continue approximating \(\ln(2)\) with polynomials of larger degree whose derivatives
+ agree with those of \(f\) at 0. This makes the polynomials fit the graph of \(f\) better for more
+ values of \(x\) around 0. For example, let \(P_3(x) = x - \frac{x^2}{2}+\frac{x^3}{3}\). Show that
+ \(P_3(0) = f(0)\), \(P'_3(0) = f'(0)\), \(P''_3(0) = f''(0)\), and \(P'''_3(0) = f'''(0)\) by completing
the following:
$PAR
@@ -99,13 +99,13 @@ with the linearization's value and slope at \(x=0\). We will now make a quadrati
\(P''_3(0)=\) \{ans_rule(10)\}, \(f''(0)=\)\{ans_rule(10)\}.$PAR
- Now use \(P_3(x)\) to approximate \(\ln(2)\) in a way
+ Now use \(P_3(x)\) to approximate \(\ln(2)\) in a way
similar to how you did so with \(P_2(x)\) above. In particular, \(P_3(1) = \)\{ans_rule(10)\}.
$PAR
\{
- # (iii) If we used a degree 4 or degree 5 polynomial to approximate \(\ln(1+x)\), what approximations
- # of \(\ln(2)\) do you think would result? Use the preceding questions to conjecture a pattern that
+ # (iii) If we used a degree 4 or degree 5 polynomial to approximate \(\ln(1+x)\), what approximations
+ # of \(\ln(2)\) do you think would result? Use the preceding questions to conjecture a pattern that
# holds, and state the degree 4 and degree 5 approximation.
# $PAR
\}
@@ -128,7 +128,7 @@ ANS( $zero -> cmp );
ANS( $one -> cmp );
ANS( $one -> cmp );
ANS( $negOne -> cmp );
-ANS( $negOne -> cmp );
+ANS( $negOne -> cmp );
ANS( $P2one -> cmp );
# Answers to (b.ii)
@@ -137,7 +137,7 @@ ANS( $zero -> cmp );
ANS( $one -> cmp );
ANS( $one -> cmp );
ANS( $negOne -> cmp );
-ANS( $negOne -> cmp );
+ANS( $negOne -> cmp );
ANS( $P3one -> cmp );
@@ -193,6 +193,3 @@ END_SOLUTION
Context()->normalStrings;
ENDDOCUMENT();
-
-
-
diff --git a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_1.pg b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_1.pg
index de0a9b9ce5..59c06d2fb6 100644
--- a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_1.pg
+++ b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_1.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## Tagged by dgt5v
@@ -29,7 +29,7 @@ TEXT(beginproblem());
$mc = new_multiple_choice();
-$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commerical; others a 90-second commerical. The same commerical was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What are the subjects of this experiment?", "60 students");
+$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commercial; others a 90-second commercial. The same commercial was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What are the subjects of this experiment?", "60 students");
$mc->extra("effect of length and repetion of TV ads", "40-minute television program", "craving for Del Taco on a scale of 0 to 10", "1, 3, or 5 commercials during the 40-minute television program");
BEGIN_TEXT
@@ -43,4 +43,3 @@ ANS(radio_cmp($mc->correct_ans));
ENDDOCUMENT(); # This should be the last executable line in the problem.
-
diff --git a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_2.pg b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_2.pg
index 0b8b8499fb..aa98f21d38 100644
--- a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_2.pg
+++ b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_2.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## Tagged by dgt5v
@@ -29,7 +29,7 @@ TEXT(beginproblem());
$mc = new_multiple_choice();
-$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commerical; others a 90-second commerical. The same commerical was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What are the factors?", "length and repetition of TV ads");
+$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commercial; others a 90-second commercial. The same commercial was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What are the factors?", "length and repetition of TV ads");
$mc->extra("60 students", "40-minute television program", "craving for Del Taco on a scale of 0 to 10", "1, 3, or 5 commercials during the 40-minute television program");
BEGIN_TEXT
@@ -43,4 +43,3 @@ ANS(radio_cmp($mc->correct_ans));
ENDDOCUMENT(); # This should be the last executable line in the problem.
-
diff --git a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_3.pg b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_3.pg
index d776b2c008..68290bf8b1 100644
--- a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_3.pg
+++ b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_3.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## Tagged by dgt5v
@@ -29,7 +29,7 @@ TEXT(beginproblem());
$mc = new_multiple_choice();
-$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commerical; others a 90-second commerical. The same commerical was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What are the levels of the length factor?", "30-second and 90-second commericals");
+$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commercial; others a 90-second commercial. The same commercial was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What are the levels of the length factor?", "30-second and 90-second commercials");
$mc->extra("60 students", "40-minute television program", "craving for Del Taco on a scale of 0 to 10", "1, 3, or 5 commercials during the 40-minute television program");
BEGIN_TEXT
@@ -43,4 +43,3 @@ ANS(radio_cmp($mc->correct_ans));
ENDDOCUMENT(); # This should be the last executable line in the problem.
-
diff --git a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_4.pg b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_4.pg
index a25056ffd6..9b02f961e0 100644
--- a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_4.pg
+++ b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_4.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## Tagged by dgt5v
@@ -28,7 +28,7 @@ TEXT(beginproblem());
$mc = new_multiple_choice();
-$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commerical; others a 90-second commerical. The same commerical was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What is the response variable?", "craving for Del Taco on a scale of 0 to 10");
+$mc->qa("An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commercial; others a 90-second commercial. The same commercial was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10. What is the response variable?", "craving for Del Taco on a scale of 0 to 10");
$mc->extra("60 students", "40-minute television program", "30-second and 90-second commericials", "1, 3, or 5 commercials during the 40-minute television program");
BEGIN_TEXT
@@ -42,4 +42,3 @@ ANS(radio_cmp($mc->correct_ans));
ENDDOCUMENT(); # This should be the last executable line in the problem.
-
diff --git a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_5.pg b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_5.pg
index 41c2b15b64..e241521f8b 100644
--- a/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_5.pg
+++ b/OpenProblemLibrary/ASU-topics/setStat/dueck1_5_5.pg
@@ -1,5 +1,5 @@
## DESCRIPTION
-## Statistics
+## Statistics
## ENDDESCRIPTION
## Tagged by dgt5v
@@ -28,11 +28,11 @@ loadMacros(
TEXT(beginproblem());
-$ans1 = 6;
+$ans1 = 6;
BEGIN_TEXT
$BR
-An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commerical; others a 90-second commerical. The same commerical was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10.
+An experiment investigated the effect of length and repetition of TV ads on students choosing to eat at Del Taco. All 60 students watched a 40-minute television program that included ads for Del Taco. Some students saw a 30-second commercial; others a 90-second commercial. The same commercial was shown either 1, 3, or 5 times during the program. After the viewing, each student was asked to rate their craving for Del Taco on a scale of 0 to 10.
How many treatments are there?$PAR
Answer: \{ans_rule(10) \} $PAR
@@ -43,4 +43,3 @@ ANS(num_cmp($ans1));
ENDDOCUMENT(); # This should be the last executable line in the problem.
-
diff --git a/OpenProblemLibrary/AlfredUniv/diffeq/ReductionOfOrder/LRC.pg b/OpenProblemLibrary/AlfredUniv/diffeq/ReductionOfOrder/LRC.pg
index 86ff405696..114935edb7 100644
--- a/OpenProblemLibrary/AlfredUniv/diffeq/ReductionOfOrder/LRC.pg
+++ b/OpenProblemLibrary/AlfredUniv/diffeq/ReductionOfOrder/LRC.pg
@@ -34,10 +34,10 @@ $showPartialCorrectAnswers = 1;
###########################################################################
##
-## We will generate the coefficients on the equation so that the auxiliary
-## equation will have the form (m-a)(m-b). After we get the coefficients
-## a and b computed we will try write everything after that in terms of
-## a and b when possible, making the problem customizable in terms of the roots
+## We will generate the coefficients on the equation so that the auxiliary
+## equation will have the form (m-a)(m-b). After we get the coefficients
+## a and b computed we will try write everything after that in terms of
+## a and b when possible, making the problem customizable in terms of the roots
##
Context("Fraction");
@@ -55,7 +55,7 @@ $ab = Compute($a*$b);
$aandb = Compute(-($a+$b));
$aminusb = Compute($a-$b);
-## We need to do a little work to get fractions to print. We could do this
+## We need to do a little work to get fractions to print. We could do this
## with Latex, but latex won't reduce the coefficients, which are randomly
## generated.
@@ -71,7 +71,7 @@ $diffeqn = Formula("$L*q''+$R*q'+$Cnum*q")->reduce;
Context("Numeric");
Context()->variables->{namePattern} = qr/[a-z][a-z0-9_]*'*/i;
Context()->variables->are("u'"=>"Real","u''"=>"Real","t"=>"Real","E"=>"Real");
-Context()->{error}{msg}{"Variable 'u' is not defined in this context"}
+Context()->{error}{msg}{"Variable 'u' is not defined in this context"}
= "You need to reduce this equation to proceed, there should not be any u terms present, only u' and u''.";
$newequation = Context()->copy;
Context()->variables->add("q"=>"Real","q'"=>"Real","q''"=>"Real","u"=>"Real","m"=>"Real");
@@ -137,7 +137,7 @@ The solutions of the homogeneous equation are \{$homogeneous->ans_rule\}
$BR
$BR
Now we are ready to solve the nonhomogeneous equation \($standard = $Lden E\).
-We will use \($y1\) to do reduction of order (it doesn't matter which one of the homogenous solutions we choose), which will give us a particular solution of the nonhomogeneous equation. With this choice the particular solution has the form
+We will use \($y1\) to do reduction of order (it doesn't matter which one of the homogeneous solutions we choose), which will give us a particular solution of the nonhomogeneous equation. With this choice the particular solution has the form
$BR
\(y_p = ue^{$a t}\).
$BR
@@ -153,7 +153,7 @@ $BCENTER \(y_p^{\prime\prime}+$aandb y_p^\prime + $ab y_p = \) \{$reducedequatio
$BR
$BR
-Using this reduced form, moving the term \($y1\) to the right side of the equation, we can rewrite \(y_p^{\prime\prime}+$aandb y_p^\prime + $ab y_p= $Lden E\) in terms of \(u^{\prime\prime}\) and \(u^\prime\) as
+Using this reduced form, moving the term \($y1\) to the right side of the equation, we can rewrite \(y_p^{\prime\prime}+$aandb y_p^\prime + $ab y_p= $Lden E\) in terms of \(u^{\prime\prime}\) and \(u^\prime\) as
$BR
$BCENTER \{$left->ans_rule\} \(=\) \{$right->ans_rule\} $ECENTER
$BR
@@ -169,18 +169,18 @@ $BR
$BR
This is a linear equation with integrating factor \{$int->ans_rule\}
$BR
-Solving this equation, using b as our constant, we get that
+Solving this equation, using b as our constant, we get that
$BR
\(u = \) \{$dcu->ans_rule\}
-$BR
-Plugging this back into \(y_p\) we finally find that
-$BR
+$BR
+Plugging this back into \(y_p\) we finally find that
+$BR
\(y_p =\) \{$dcsolution->ans_rule\}
$BR
-Making the general solution \(y = a $y1 + y_p = a $y1 + b $y2 + \frac{$Lden E}{$ab}\). Notice that we already knew that \($y1\) and \($y2\) where solutions to the homogeneous equation, we just did all that work to figure out that the constant \(\frac{$Lden E}{$ab}\) is a solution of the nonhomogeneous equation, which is kind of obvious when you look at it. Now lets do an example where the answer will not be so obvious.
+Making the general solution \(y = a $y1 + y_p = a $y1 + b $y2 + \frac{$Lden E}{$ab}\). Notice that we already knew that \($y1\) and \($y2\) where solutions to the homogeneous equation, we just did all that work to figure out that the constant \(\frac{$Lden E}{$ab}\) is a solution of the nonhomogeneous equation, which is kind of obvious when you look at it. Now lets do an example where the answer will not be so obvious.
$BR
$BR
-$BBOLD Case 2: E = sin(pt) $EBOLD (AC voltage).
+$BBOLD Case 2: E = sin(pt) $EBOLD (AC voltage).
$BR
You might want to break out your TI-89, Maple, Mathematica, etc for this one. Or you can practice up your integration by parts, a lot.
$BR
@@ -192,9 +192,9 @@ $BR
This is a linear equation with integrating factor \{$int->ans_rule\}, just like the example above. Solving this equation, using b as our constant, we get
$BR
\(u = \) \{$acu->ans_rule(90)\}
-$BR
-Plugging this back into \(y_p\) we finally find that
-$BR
+$BR
+Plugging this back into \(y_p\) we finally find that
+$BR
\(y_p =\) \{$acsolution->ans_rule(60)\}
$BR
Making the general solution \(y = a $y1 + y_p = a $y1 + $acsolution\)
@@ -220,7 +220,7 @@ ANS($dcu->cmp);
ANS($dcsolution->cmp);
## AC voltage example
ANS($acright->cmp()
-->withPostFilter(AnswerHints(
+->withPostFilter(AnswerHints(
$dcright => "E is NOT a constant in this case.",
))
);
diff --git a/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1a.pg b/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1a.pg
index d411642887..c90f1e52b1 100644
--- a/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1a.pg
+++ b/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1a.pg
@@ -20,14 +20,14 @@
## Problem1('1 1')
## KEYWORDS('logistic', 'population')
### Language(en)
-##
-## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
+##
+## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -45,7 +45,7 @@ Context("Numeric");
Context()->variables->add(y=>"Real");
# (x,y) refer to canvas coordinates, (T,Y) refer to coordinates on the axes in the graphic.
-$debug = 0;
+$debug = 0;
$a = random(1,4,1);
$tickDeltaY=$a/4;
$tickDelta_y=25;
@@ -88,7 +88,7 @@ $javascript = <<"END_JAVASCRIPT";
const a = $a;
// which curve shows tangents?
-let selectedCurve = null;
+let selectedCurve = null;
let selectedPoint = null;
document.addEventListener("DOMContentLoaded", function() {
@@ -98,7 +98,7 @@ document.addEventListener("DOMContentLoaded", function() {
// ticks
const tickFirstY = -a/4;
- const tickFirst_y = canvas.height-25;
+ const tickFirst_y = canvas.height-25;
const tickDelta_y = $tickDelta_y;
const tickDeltaY = $tickDeltaY;
const tickCount = 11;
@@ -106,7 +106,7 @@ document.addEventListener("DOMContentLoaded", function() {
const axis_y = $axis_y; // y-coordinate of T axis
// canvas coordinates are (x,y) ; coordinates displayed on the axes are (T,Y)
-
+
// convert axes coordinates to canvas coordinates
function Ytoy(y){
@@ -116,10 +116,10 @@ document.addEventListener("DOMContentLoaded", function() {
// draw axes, mesh, ticks, tick labels
function drawAxes() {
- // draw tick labels and mesh lines
+ // draw tick labels and mesh lines
ctx.textAlign = "center";
ctx.textBaseline = "middle";
- for (let i=3; i 25 ) ) ||
(j==4 && mx > 255 && ( (mx-pt[i][3].x)**2 + (my-pt[i][3].y)**2 > 25 ) )
){ pt[i][j].x = mx; pt[i][j].y = my; }
- // if the midpoint is selected and moving it and its adjacent points
+ // if the midpoint is selected and moving it and its adjacent points
// won't collide with endpoints
- if ( j==2 && ( (pt[i][0].x - pt[i][1].x - dx)**2 + (pt[i][0].y - pt[i][1].y - dy)**2 > 25 )
+ if ( j==2 && ( (pt[i][0].x - pt[i][1].x - dx)**2 + (pt[i][0].y - pt[i][1].y - dy)**2 > 25 )
&& ( (pt[i][4].x - pt[i][3].x - dx)**2 + (pt[i][4].y - pt[i][3].y - dy)**2 > 25 )
){
pt[i][1].x += dx; pt[i][1].y += dy;
@@ -403,8 +403,8 @@ document.addEventListener("DOMContentLoaded", function() {
// if a control point (tangent point) is selected and moving it won't collapse a tangent
// then move it, keeping the two control points and the midpoint in line
// by moving the other control point perpendicular to this line, around a circle centered at pt[i][2]
- if ( (j==1 || j==3) &&
- (pt[i][j-1].x - mx)**2 + (pt[i][j-1].y - my)**2 > 25 &&
+ if ( (j==1 || j==3) &&
+ (pt[i][j-1].x - mx)**2 + (pt[i][j-1].y - my)**2 > 25 &&
(pt[i][j+1].x - mx)**2 + (pt[i][j+1].y - my)**2 > 25 &&
(mx-pt[i][2].x)*(pt[i][j].x-pt[i][2].x) + (my-pt[i][2].y)*(pt[i][j].y-pt[i][2].y) > 0
){
@@ -429,13 +429,13 @@ document.addEventListener("DOMContentLoaded", function() {
ans.push("(" + pt[i][j].x + "," + pt[i][j].y + ")" );
}
if (i == 0){
- document.getElementById("redAnswer").value = ans.join(",");
+ document.getElementById("redAnswer").value = ans.join(",");
}
else if (i == 1){
- document.getElementById("greenAnswer").value = ans.join(",");
- }
+ document.getElementById("greenAnswer").value = ans.join(",");
+ }
else {
- document.getElementById("blueAnswer").value = ans.join(",");
+ document.getElementById("blueAnswer").value = ans.join(",");
}
selectedPoint = null;
});
@@ -456,9 +456,9 @@ MODES (
## the canvas element
-sub printCanvas {
- MODES(
- TeX => image("Ricardo1_1aFig.png"),
+sub printCanvas {
+ MODES(
+ TeX => image("Ricardo1_1aFig.png"),
HTML => qq!!,
PTX => " HTML5 canvas element "
);
@@ -474,10 +474,10 @@ sub printButtons {
);
}
-## the answer box. It holds the canvas state: four control
-## points for the associated Bezier curve in canvas coordinates. It is filled
-## automatically by javascript and normally
-## normally it's hidden (displayed only if $debug = 1).
+## the answer box. It holds the canvas state: four control
+## points for the associated Bezier curve in canvas coordinates. It is filled
+## automatically by javascript and normally
+## normally it's hidden (displayed only if $debug = 1).
sub printAnswerBox {
$name = shift;
@@ -491,7 +491,7 @@ sub printAnswerBox {
HTML => NAMED_HIDDEN_ANS_RULE( $name, "50" ),
PTX => ''
);}
-}
+}
##############################################################
@@ -508,8 +508,8 @@ $showPartialCorrectAnswers = 1;
Context()->texStrings;
BEGIN_TEXT
-Even before you learn techniques for solving differential equations, you may be able to analyze equations $BITALIC qualitatively $EITALIC. As an example, look at the nonlinear equation
-\[\frac{dy}{dt}=$expr \]
+Even before you learn techniques for solving differential equations, you may be able to analyze equations $BITALIC qualitatively $EITALIC. As an example, look at the nonlinear equation
+\[\frac{dy}{dt}=$expr \]
You are going to analyze the solutions, \(y\), of this equation without actually finding them. You will be asked to sketch three solutions of the differential equation on the graph below based on qualitative information from the differential equation.
$PAR In what follows, picture the \(t\)-axis running horizontally and the \(y\) axis running vertically. There is no scale on the \(t\) axis but imagine it is large enough to display the behavior of the solutions as \(t\) approaches \(\pm \infty\). $PAR
@@ -517,21 +517,21 @@ $PAR In what follows, picture the \(t\)-axis running horizontally and the \(y\)
a) For what values of \(y\) is the graph of \(y\) as a function of \(t\) increasing? Use \{ helpLink("intervals","interval notation") \} for your answer. \{ ans_rule(20) \}
$PAR
-b) For what values of \(y\) is the graph of \(y\) concave up? \{ ans_rule(20) \} $BR
-For what values of \(y\) is it concave down? \{ ans_rule(20) \} (Help with \{helpLink("intervals","interval notation") \}.)
+b) For what values of \(y\) is the graph of \(y\) concave up? \{ ans_rule(20) \} $BR
+For what values of \(y\) is it concave down? \{ ans_rule(20) \} (Help with \{helpLink("intervals","interval notation") \}.)
$BR
-What information do you need to answer a question about concavity? Remember that \(y\) is an implicit function of \(t\).
-\{ essay_box(1,50) \} \{ knowlLink("[How to enter answer]",value=>essay_help())\}
+What information do you need to answer a question about concavity? Remember that \(y\) is an implicit function of \(t\).
+\{ essay_box(1,50) \} \{ knowlLink("[How to enter answer]",value=>essay_help())\}
$PAR
-Parts c),d),e) of this question ask you to modify the blue, red, and green curves in the plot below to make them represent graphs
-of particular solutions of the differential equation. $PAR
+Parts c),d),e) of this question ask you to modify the blue, red, and green curves in the plot below to make them represent graphs
+of particular solutions of the differential equation. $PAR
To modify the blue curve, click the "blue curve" button below the plot to expose the blue points and tangents. Solid blue points lie on the curve. With your mouse click and hold each solid blue point, and move it into a better position. If the solution curve crosses an edge of the viewing region then the solid point should be very near the edge, left or right, top or bottom. Improve the shape of the curve between the solid points by moving the open points that lie on the dashed tangents. Experiment to see how the shape changes. Small errors in concavity are hard to see -- you may have to fiddle with the tangents to get the right concavity.$PAR
Modify the red or green curve in a similar way, after clicking the corresponding button to expose its points and tangents. I recommend moving the solid points into good positions first, then move the open points to improve the shape between the solid points.
$PAR
-\[\frac{dy}{dt}=$expr.\]
+\[\frac{dy}{dt}=$expr.\]
$PAR
\{ printCanvas() \}$BR
@@ -548,9 +548,9 @@ d) $BBOLD RED: $EBOLD Next, use the information found in parts (a) and (b) to mo
With this initial condition, what is the $BITALIC long-term$EITALIC behavior of \(y(t)\)? That is, what is \(\lim_{t\to\infty}y(t)\)? \{ ans_rule(10) \}
$PAR
-e) $BBOLD GREEN: $EBOLD Finally, based on what you see in the original differential equation, modify the $BBOLD green $EBOLD curve to make it represent the graph of a solution \(y=y(t)\) with initial condidtion \(y(0)=$greenICy\). \{printAnswerBox("greenAnswer")\}
+e) $BBOLD GREEN: $EBOLD Finally, based on what you see in the original differential equation, modify the $BBOLD green $EBOLD curve to make it represent the graph of a solution \(y=y(t)\) with initial condition \(y(0)=$greenICy\). \{printAnswerBox("greenAnswer")\}
$PAR
-f) If \(y(t)\) represents the population of some animal species, and if units on the \(y-\)axis are in thousands, interpret the results of (c), (d) and (e).
+f) If \(y(t)\) represents the population of some animal species, and if units on the \(y-\)axis are in thousands, interpret the results of (c), (d) and (e).
$BR
The solution to part (c) (sketched in $BBOLD blue $EBOLD) represents: \{ $popup1->menu() \}
$PAR
@@ -578,9 +578,9 @@ ANS($cdown->cmp);
ANS(essay_cmp());
-# convert canvas (x,y) coordinates to the coordinates (T,Y)
-# displayed on the plot using scale -5 < T < 5
-
+# convert canvas (x,y) coordinates to the coordinates (T,Y)
+# displayed on the plot using scale -5 < T < 5
+
sub xToT {
my $x = shift;
return ($x-250)/50;
@@ -604,13 +604,13 @@ sub Ytoy {
}
# the numbers here don't matter; only the form is important
-$blueAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$blueAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
NAMED_ANS('blueAnswer'=>$blueAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
# read student's points
@@ -649,25 +649,25 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[0] > -4.8 ){
+ if ( $T[0] > -4.8 ){
push(@errors,"Check left end: what's the domain?");
}
if ($T[4] < 4.8 ){
push(@errors,"Check right end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -703,14 +703,14 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
else { $score++; }
## check concavity; should be negative on left, positive on right
- ## check inflection point
- my $concavOK=1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) <= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ ## check inflection point
+ my $concavOK=1;
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) <= ($Y[2]-$Y[0])/($T[2]-$T[0])
){
push(@errors,"Check concavity on the left.");
$concavOK=0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concavOK=0;
@@ -726,20 +726,20 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
$ansHash->{preview_latex_string}="\text{See graph.}";
$ansHash->{correct_ans_latex_string}="\text{Blue curve decreases from \(y=$a\) to \(y=0\)} \\ \text{with horizontal asymptotes at both ends.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
ANS($lim1->cmp);
# the numbers here don't matter; only the form is important
-$redAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$redAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
NAMED_ANS('redAnswer'=>$redAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
@@ -782,22 +782,22 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[0] > -4.8 ){
+ if ( $T[0] > -4.8 ){
push(@errors,"Check right end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -835,36 +835,36 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
## check concavity; should be positive everywhere
my $concav=1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
){
push(@errors,"Check concavity on the left.");
$concav = 0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concav = 0;
}
- $score += $concav;
+ $score += $concav;
$ansHash->{student_ans}="See graph.";
$ansHash->{preview_latex_string}="\text{See graph.}";
- $ansHash->{correct_ans_latex_string}="\text{Red curve increases from \(y=$a\) to \(\infty\)}\\ \text{with horizonal asymptote at left end.}";
+ $ansHash->{correct_ans_latex_string}="\text{Red curve increases from \(y=$a\) to \(\infty\)}\\ \text{with horizontal asymptote at left end.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
ANS($lim2->cmp);
# the numbers here don't matter; only the form is important
-$greenAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$greenAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
NAMED_ANS('greenAnswer'=>$greenAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
@@ -880,25 +880,25 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
$T[$i]=xToT($x);
$Y[$i]=yToY($y);
}
-
+
## check that student's curve is a function defined on the whole domain
## and there are no vertical tangents
-
- if ( $T[0] > -4.8 or $T[4] < 4.8 ){
+
+ if ( $T[0] > -4.8 or $T[4] < 4.8 ){
push(@errors,"Check endpoints: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
# check that it's a horizontal line
- if ( abs($Y[0] - $a) < $a/10 && abs($Y[1] - $a) < $a/10 &&
- abs($Y[2] - $a) < $a/10 && abs($Y[3] - $a) < $a/10
+ if ( abs($Y[0] - $a) < $a/10 && abs($Y[1] - $a) < $a/10 &&
+ abs($Y[2] - $a) < $a/10 && abs($Y[3] - $a) < $a/10
){
$score += 5;
}
@@ -907,7 +907,7 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
$ansHash->{preview_latex_string}="\text{See graph.}";
$ansHash->{correct_ans_latex_string}="\text{Green curve is horizontal line \(y=$a\).}";
- return ($score,@errors);
+ return ($score,@errors);
}
));
@@ -917,4 +917,4 @@ ANS( $popup3->cmp() );
COMMENT("To show graphics in Library Browser click 'eye' icon (on upper right). One part requires grading by hand.");
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1e.pg b/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1e.pg
index e65383bed1..15fb2b3ee9 100644
--- a/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1e.pg
+++ b/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1e.pg
@@ -20,14 +20,14 @@
## Problem1('1 1')
## KEYWORDS('logistic', 'population')
### Language(en)
-##
-## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
+##
+## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -45,7 +45,7 @@ Context("Numeric");
Context()->variables->add(y=>"Real");
# (x,y) refer to canvas coordinates, (T,Y) refer to coordinates on the axes in the graphic.
-$debug = 0;
+$debug = 0;
$a = random(1,4,1);
$tickDeltaY=$a/4;
$tickDelta_y=25;
@@ -89,7 +89,7 @@ $javascript = <<"END_JAVASCRIPT";
const a = $a;
// which curve shows tangents?
-let selectedCurve = null;
+let selectedCurve = null;
let selectedPoint = null;
document.addEventListener("DOMContentLoaded", function() {
@@ -99,7 +99,7 @@ document.addEventListener("DOMContentLoaded", function() {
// ticks
const tickFirstY = -a/4;
- const tickFirst_y = canvas.height-25;
+ const tickFirst_y = canvas.height-25;
const tickDelta_y = $tickDelta_y;
const tickDeltaY = $tickDeltaY;
const tickCount = 11;
@@ -107,7 +107,7 @@ document.addEventListener("DOMContentLoaded", function() {
const axis_y = $axis_y; // y-coordinate of T axis
// canvas coordinates are (x,y) ; coordinates displayed on the axes are (T,Y)
-
+
// convert axes coordinates to canvas coordinates
function Ytoy(y){
@@ -117,10 +117,10 @@ document.addEventListener("DOMContentLoaded", function() {
// draw axes, mesh, ticks, tick labels
function drawAxes() {
- // draw tick labels and mesh lines
+ // draw tick labels and mesh lines
ctx.textAlign = "center";
ctx.textBaseline = "middle";
- for (let i=3; i 25 ) ) ||
(j==4 && mx > 255 && ( (mx-pt[i][3].x)**2 + (my-pt[i][3].y)**2 > 25 ) )
){ pt[i][j].x = mx; pt[i][j].y = my; }
- // if the midpoint is selected and moving it and its adjacent points
+ // if the midpoint is selected and moving it and its adjacent points
// won't collide with endpoints
- if ( j==2 && ( (pt[i][0].x - pt[i][1].x - dx)**2 + (pt[i][0].y - pt[i][1].y - dy)**2 > 25 )
+ if ( j==2 && ( (pt[i][0].x - pt[i][1].x - dx)**2 + (pt[i][0].y - pt[i][1].y - dy)**2 > 25 )
&& ( (pt[i][4].x - pt[i][3].x - dx)**2 + (pt[i][4].y - pt[i][3].y - dy)**2 > 25 )
){
pt[i][1].x += dx; pt[i][1].y += dy;
@@ -404,8 +404,8 @@ document.addEventListener("DOMContentLoaded", function() {
// if a control point (tangent point) is selected and moving it won't collapse a tangent
// then move it, keeping the two control points and the midpoint in line
// by moving the other control point perpendicular to this line, around a circle centered at pt[i][2]
- if ( (j==1 || j==3) &&
- (pt[i][j-1].x - mx)**2 + (pt[i][j-1].y - my)**2 > 25 &&
+ if ( (j==1 || j==3) &&
+ (pt[i][j-1].x - mx)**2 + (pt[i][j-1].y - my)**2 > 25 &&
(pt[i][j+1].x - mx)**2 + (pt[i][j+1].y - my)**2 > 25 &&
(mx-pt[i][2].x)*(pt[i][j].x-pt[i][2].x) + (my-pt[i][2].y)*(pt[i][j].y-pt[i][2].y) > 0
){
@@ -430,13 +430,13 @@ document.addEventListener("DOMContentLoaded", function() {
ans.push("(" + pt[i][j].x + "," + pt[i][j].y + ")" );
}
if (i == 0){
- document.getElementById("redAnswer").value = ans.join(",");
+ document.getElementById("redAnswer").value = ans.join(",");
}
else if (i == 1){
- document.getElementById("greenAnswer").value = ans.join(",");
- }
+ document.getElementById("greenAnswer").value = ans.join(",");
+ }
else {
- document.getElementById("blueAnswer").value = ans.join(",");
+ document.getElementById("blueAnswer").value = ans.join(",");
}
selectedPoint = null;
});
@@ -457,9 +457,9 @@ MODES (
## the canvas element
-sub printCanvas {
- MODES(
- TeX => image("Ricardo1_1aFig.png"),
+sub printCanvas {
+ MODES(
+ TeX => image("Ricardo1_1aFig.png"),
HTML => qq!!,
PTX => " HTML5 canvas element "
);
@@ -475,10 +475,10 @@ sub printButtons {
);
}
-## the answer box. It holds the canvas state: four control
-## points for the associated Bezier curve in canvas coordinates. It is filled
-## automatically by javascript and normally
-## normally it's hidden (displayed only if $debug = 1).
+## the answer box. It holds the canvas state: four control
+## points for the associated Bezier curve in canvas coordinates. It is filled
+## automatically by javascript and normally
+## normally it's hidden (displayed only if $debug = 1).
sub printAnswerBox {
$name = shift;
@@ -492,7 +492,7 @@ sub printAnswerBox {
HTML => NAMED_HIDDEN_ANS_RULE( $name, "50" ),
PTX => ''
);}
-}
+}
##############################################################
@@ -509,8 +509,8 @@ $showPartialCorrectAnswers = 1;
Context()->texStrings;
BEGIN_TEXT
-Even before you learn techniques for solving differential equations, you may be able to analyze equations $BITALIC qualitatively $EITALIC. As an example, look at the nonlinear equation
-\[\frac{dy}{dt}=$expr \]
+Even before you learn techniques for solving differential equations, you may be able to analyze equations $BITALIC qualitatively $EITALIC. As an example, look at the nonlinear equation
+\[\frac{dy}{dt}=$expr \]
You are going to analyze the solutions, \(y\), of this equation without actually finding them. You will be asked to sketch three solutions of the differential equation on the graph below based on qualitative information from the differential equation.
$PAR In what follows, picture the \(t\)-axis running horizontally and the \(y\) axis running vertically. There is no scale on the \(t\) axis but imagine it is large enough to display the behavior of the solutions as \(t\) approaches \(\pm \infty\). $PAR
@@ -518,21 +518,21 @@ $PAR In what follows, picture the \(t\)-axis running horizontally and the \(y\)
a) For what values of \(y\) is the graph of \(y\) as a function of \(t\) increasing? Use \{ helpLink("intervals","interval notation") \} for your answer. \{ ans_rule(20) \}
$PAR
-b) For what values of \(y\) is the graph of \(y\) concave up? \{ ans_rule(20) \} $BR
-For what values of \(y\) is it concave down? \{ ans_rule(20) \} (Help with \{helpLink("intervals","interval notation") \}.)
+b) For what values of \(y\) is the graph of \(y\) concave up? \{ ans_rule(20) \} $BR
+For what values of \(y\) is it concave down? \{ ans_rule(20) \} (Help with \{helpLink("intervals","interval notation") \}.)
$BR
-What information do you need to answer a question about concavity? Remember that \(y\) is an implicit function of \(t\).
-\{ essay_box(1,50) \} \{ knowlLink("[How to enter answer]",value=>essay_help())\}
+What information do you need to answer a question about concavity? Remember that \(y\) is an implicit function of \(t\).
+\{ essay_box(1,50) \} \{ knowlLink("[How to enter answer]",value=>essay_help())\}
$PAR
-Parts c),d),e) of this question ask you to modify the blue, red, and green curves in the plot below to make them represent graphs
-of particular solutions of the differential equation. $PAR
+Parts c),d),e) of this question ask you to modify the blue, red, and green curves in the plot below to make them represent graphs
+of particular solutions of the differential equation. $PAR
To modify the blue curve, click the "blue curve" button below the plot to expose the blue points and tangents. Solid blue points lie on the curve. With your mouse click and hold each solid blue point, and move it into a better position. If the solution curve crosses an edge of the viewing region then the solid point should be very near the edge, left or right, top or bottom. Improve the shape of the curve between the solid points by moving the open points that lie on the dashed tangents. Experiment to see how the shape changes. $PAR
Modify the red or green curve in a similar way, after clicking the corresponding button to expose its points and tangents. I recommend moving the solid points into good positions first, then move the open points to improve the shape between the solid points.
$PAR
-\[\frac{dy}{dt}=$expr.\]
+\[\frac{dy}{dt}=$expr.\]
$PAR
\{ printCanvas() \}$BR
@@ -549,9 +549,9 @@ d) $BBOLD RED: $EBOLD Next, use the information found in parts (a) and (b) to mo
With this initial condition, what is the $BITALIC long-term$EITALIC behavior of \(y(t)\)? That is, what is \(\lim_{t\to\infty}y(t)\)? \{ ans_rule(10) \}
$PAR
-e) $BBOLD GREEN:" $EBOLD Finally, based on what you see in the original differential equation, modify the $BBOLD green $EBOLD curve to make it represent the graph of a solution \(y=y(t)\) with initial condidtion \(y(0)=$greenICy\). \{printAnswerBox("greenAnswer")\}
+e) $BBOLD GREEN:" $EBOLD Finally, based on what you see in the original differential equation, modify the $BBOLD green $EBOLD curve to make it represent the graph of a solution \(y=y(t)\) with initial condition \(y(0)=$greenICy\). \{printAnswerBox("greenAnswer")\}
$PAR
-f) If \(y(t)\) represents the population of some animal species, and if units on the \(y-\)axis are in thousands, interpret the results of (c), (d) and (e).
+f) If \(y(t)\) represents the population of some animal species, and if units on the \(y-\)axis are in thousands, interpret the results of (c), (d) and (e).
$BR
The solution to part (c) (sketched in $BBOLD blue $EBOLD) represents: \{ $popup1->menu() \}
$PAR
@@ -579,9 +579,9 @@ ANS($cdown->cmp);
ANS(essay_cmp());
-# convert canvas (x,y) coordinates to the coordinates (T,Y)
-# displayed on the plot using scale -5 < T < 5
-
+# convert canvas (x,y) coordinates to the coordinates (T,Y)
+# displayed on the plot using scale -5 < T < 5
+
sub xToT {
my $x = shift;
return ($x-250)/50;
@@ -605,13 +605,13 @@ sub Ytoy {
}
# the numbers here don't matter; only the form is important
-$blueAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$blueAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
NAMED_ANS('blueAnswer'=>$blueAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
# read student's points
@@ -650,25 +650,25 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[0] > -4.8 ){
+ if ( $T[0] > -4.8 ){
push(@errors,"Check left end: what's the domain?");
}
if ($T[4] < 4.8 ){
push(@errors,"Check right end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -704,14 +704,14 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
else { $score++; }
## check concavity; should be positive on left, negative on right
- ## check inflection point
- my $concavOK=1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ ## check inflection point
+ my $concavOK=1;
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
){
push(@errors,"Check concavity on the left.");
$concavOK=0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) <= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) <= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concavOK=0;
@@ -727,20 +727,20 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
$ansHash->{preview_latex_string}="\text{See graph.}";
$ansHash->{correct_ans_latex_string}="\text{Blue curve increases from \(y=0\) to \(y=$a\)} \\ \text{with horizontal asymptotes at both ends.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
ANS($lim1->cmp);
# the numbers here don't matter; only the form is important
-$redAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$redAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
NAMED_ANS('redAnswer'=>$redAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
@@ -783,22 +783,22 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[4] < 4.8 ){
+ if ( $T[4] < 4.8 ){
push(@errors,"Check right end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -836,36 +836,36 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
## check concavity; should be positive everywhere
my $concav=1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
){
push(@errors,"Check concavity on the left.");
$concav = 0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concav = 0;
}
- $score += $concav;
+ $score += $concav;
$ansHash->{student_ans}="See graph.";
$ansHash->{preview_latex_string}="\text{See graph.}";
- $ansHash->{correct_ans_latex_string}="\text{Red curve decreases from \(y \approx\infinity\) to \(y=$a\)}\\ \text{with horizonal asymptote at right end.}";
+ $ansHash->{correct_ans_latex_string}="\text{Red curve decreases from \(y \approx\infinity\) to \(y=$a\)}\\ \text{with horizontal asymptote at right end.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
ANS($lim2->cmp);
# the numbers here don't matter; only the form is important
-$greenAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$greenAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
NAMED_ANS('greenAnswer'=>$greenAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
@@ -881,25 +881,25 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
$T[$i]=xToT($x);
$Y[$i]=yToY($y);
}
-
+
## check that student's curve is a function defined on the whole domain
## and there are no vertical tangents
-
- if ( $T[0] > -4.8 or $T[4] < 4.8 ){
+
+ if ( $T[0] > -4.8 or $T[4] < 4.8 ){
push(@errors,"Check endpoints: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
# check that it's a horizontal line
- if ( abs($Y[0] - $a) < $a/10 && abs($Y[1] - $a) < $a/10 &&
- abs($Y[2] - $a) < $a/10 && abs($Y[3] - $a) < $a/10
+ if ( abs($Y[0] - $a) < $a/10 && abs($Y[1] - $a) < $a/10 &&
+ abs($Y[2] - $a) < $a/10 && abs($Y[3] - $a) < $a/10
){
$score += 5;
}
@@ -908,7 +908,7 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
$ansHash->{preview_latex_string}="\text{See graph.}";
$ansHash->{correct_ans_latex_string}="\text{Green curve is horizontal line \(y=$a\).}";
- return ($score,@errors);
+ return ($score,@errors);
}
));
@@ -918,4 +918,4 @@ ANS( $popup3->cmp() );
COMMENT("To show graphics in Library Browser click 'eye' icon (on upper right). One part requires grading by hand.");
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1f.pg b/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1f.pg
index c21dbcaa08..4090c9b80e 100644
--- a/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1f.pg
+++ b/OpenProblemLibrary/CSUOhio/differential_equations/autonomous/Ricardo1_1f.pg
@@ -20,14 +20,14 @@
## Problem1('1 1')
## KEYWORDS('logistic', 'population')
### Language(en)
-##
-## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
+##
+## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
########################################################################
-DOCUMENT();
+DOCUMENT();
loadMacros(
"PGstandard.pl",
@@ -45,7 +45,7 @@ Context("Numeric");
Context()->variables->add(y=>"Real");
# (x,y) refer to canvas coordinates, (T,Y) refer to coordinates on the axes in the graphic.
-$debug = 0;
+$debug = 0;
$a = random(3,5,1);
$b = random(3,5,1);
$tickDeltaY=1;
@@ -58,12 +58,12 @@ $canvasHeight=330;
# right-hand side of differential equation
$expr = Compute("(y-$a)^2*(y+$b)")->reduce();
-$inflection = Compute("($a-2*$b)/3");
+$inflection = Compute("($a-2*$b)/3");
#initial conditions
-$blueICy = Compute("-$b-2");
-$redICy = Compute("$a+2");
-$greenICy = Compute("-$b+2");
+$blueICy = Compute("-$b-2");
+$redICy = Compute("$a+2");
+$greenICy = Compute("-$b+2");
# answers
Context("Interval");
@@ -90,7 +90,7 @@ $javascript = <<"END_JAVASCRIPT";
const a = $a;
// which curve shows tangents?
-let selectedCurve = null;
+let selectedCurve = null;
let selectedPoint = null;
document.addEventListener("DOMContentLoaded", function() {
@@ -100,7 +100,7 @@ document.addEventListener("DOMContentLoaded", function() {
// ticks
const tickFirstY = -10;
- const tickFirst_y = canvas.height-15;
+ const tickFirst_y = canvas.height-15;
const tickDelta_y = $tickDelta_y;
const tickDeltaY = $tickDeltaY;
const tickCount = 21;
@@ -108,7 +108,7 @@ document.addEventListener("DOMContentLoaded", function() {
const axis_y = $axis_y; // y-coordinate of T axis
// canvas coordinates are (x,y) ; coordinates displayed on the axes are (T,Y)
-
+
// convert axes coordinates to canvas coordinates
function Ytoy(y){
@@ -118,10 +118,10 @@ document.addEventListener("DOMContentLoaded", function() {
// draw axes, mesh, ticks, tick labels
function drawAxes() {
- // draw tick labels and mesh lines
+ // draw tick labels and mesh lines
ctx.textAlign = "center";
ctx.textBaseline = "middle";
- for (let i=0; i 25 ) ) ||
(j==4 && mx > 255 && ( (mx-pt[i][3].x)**2 + (my-pt[i][3].y)**2 > 25 ) )
){ pt[i][j].x = mx; pt[i][j].y = my; }
- // if the midpoint is selected and moving it and its adjacent points
+ // if the midpoint is selected and moving it and its adjacent points
// won't collide with endpoints
- if ( j==2 && ( (pt[i][0].x - pt[i][1].x - dx)**2 + (pt[i][0].y - pt[i][1].y - dy)**2 > 25 )
+ if ( j==2 && ( (pt[i][0].x - pt[i][1].x - dx)**2 + (pt[i][0].y - pt[i][1].y - dy)**2 > 25 )
&& ( (pt[i][4].x - pt[i][3].x - dx)**2 + (pt[i][4].y - pt[i][3].y - dy)**2 > 25 )
){
pt[i][1].x += dx; pt[i][1].y += dy;
@@ -395,8 +395,8 @@ document.addEventListener("DOMContentLoaded", function() {
// if a control point (tangent point) is selected and moving it won't collapse a tangent
// then move it, keeping the two control points and the midpoint in line
// by moving the other control point perpendicular to this line, around a circle centered at pt[i][2]
- if ( (j==1 || j==3) &&
- (pt[i][j-1].x - mx)**2 + (pt[i][j-1].y - my)**2 > 25 &&
+ if ( (j==1 || j==3) &&
+ (pt[i][j-1].x - mx)**2 + (pt[i][j-1].y - my)**2 > 25 &&
(pt[i][j+1].x - mx)**2 + (pt[i][j+1].y - my)**2 > 25 &&
(mx-pt[i][2].x)*(pt[i][j].x-pt[i][2].x) + (my-pt[i][2].y)*(pt[i][j].y-pt[i][2].y) > 0
){
@@ -421,13 +421,13 @@ document.addEventListener("DOMContentLoaded", function() {
ans.push("(" + pt[i][j].x + "," + pt[i][j].y + ")" );
}
if (i == 0){
- document.getElementById("redAnswer").value = ans.join(",");
+ document.getElementById("redAnswer").value = ans.join(",");
}
else if (i == 1){
- document.getElementById("greenAnswer").value = ans.join(",");
- }
+ document.getElementById("greenAnswer").value = ans.join(",");
+ }
else {
- document.getElementById("blueAnswer").value = ans.join(",");
+ document.getElementById("blueAnswer").value = ans.join(",");
}
selectedPoint = null;
});
@@ -448,9 +448,9 @@ MODES (
## the canvas element
-sub printCanvas {
- MODES(
- TeX => image("Ricardo1_1fFig.png"),
+sub printCanvas {
+ MODES(
+ TeX => image("Ricardo1_1fFig.png"),
HTML => qq!!,
PTX => " HTML5 canvas element "
);
@@ -466,10 +466,10 @@ sub printButtons {
);
}
-## the answer box. It holds the canvas state: four control
-## points for the associated Bezier curve in canvas coordinates. It is filled
-## automatically by javascript and normally
-## normally it's hidden (displayed only if $debug = 1).
+## the answer box. It holds the canvas state: four control
+## points for the associated Bezier curve in canvas coordinates. It is filled
+## automatically by javascript and normally
+## normally it's hidden (displayed only if $debug = 1).
sub printAnswerBox {
$name = shift;
@@ -483,7 +483,7 @@ sub printAnswerBox {
HTML => NAMED_HIDDEN_ANS_RULE( $name, "50" ),
PTX => ''
);}
-}
+}
##############################################################
@@ -500,8 +500,8 @@ $showPartialCorrectAnswers = 1;
Context()->texStrings;
BEGIN_TEXT
-Even before you learn techniques for solving differential equations, you may be able to analyze equations $BITALIC qualitatively $EITALIC. As an example, look at the nonlinear equation
-\[\frac{dy}{dt}=$expr \]
+Even before you learn techniques for solving differential equations, you may be able to analyze equations $BITALIC qualitatively $EITALIC. As an example, look at the nonlinear equation
+\[\frac{dy}{dt}=$expr \]
You are going to analyze the solutions, \(y\), of this equation without actually finding them. You will be asked to sketch three solutions of the differential equation on the graph below based on qualitative information from the differential equation.
$PAR In what follows, picture the \(t\)-axis running horizontally and the \(y\) axis running vertically. There is no scale on the \(t\) axis but imagine it is large enough to display the behavior of the solutions as \(t\) approaches \(\pm \infty\). $PAR
@@ -509,21 +509,21 @@ $PAR In what follows, picture the \(t\)-axis running horizontally and the \(y\)
a) For what values of \(y\) is the graph of \(y\) as a function of \(t\) increasing? Use \{ helpLink("intervals","interval notation") \} for your answer. \{ ans_rule(20) \}
$PAR
-b) For what values of \(y\) is the graph of \(y\) concave up? \{ ans_rule(20) \} $BR
-For what values of \(y\) is it concave down? \{ ans_rule(20) \} (Help with \{helpLink("intervals","interval notation") \}.)
+b) For what values of \(y\) is the graph of \(y\) concave up? \{ ans_rule(20) \} $BR
+For what values of \(y\) is it concave down? \{ ans_rule(20) \} (Help with \{helpLink("intervals","interval notation") \}.)
$BR
-What information do you need to answer a question about concavity? Remember that \(y\) is an implicit function of \(t\). $BR
-\{ essay_box(1,50) \} \{ knowlLink("[How to enter answer]",value=>essay_help())\}
+What information do you need to answer a question about concavity? Remember that \(y\) is an implicit function of \(t\). $BR
+\{ essay_box(1,50) \} \{ knowlLink("[How to enter answer]",value=>essay_help())\}
$PAR
-Parts c),d),e) of this question ask you to modify the blue, red, and green curves in the plot below to make them represent graphs
-of particular solutions of the differential equation. $PAR
+Parts c),d),e) of this question ask you to modify the blue, red, and green curves in the plot below to make them represent graphs
+of particular solutions of the differential equation. $PAR
-To modify the blue curve, click the "blue curve" button below the plot to expose blue points and tangents. Solid blue points lie on the curve. With your mouse click and hold each solid blue point, and move it into a better position. If the solution curve crosses an edge of the viewing region then the corresponting solid point should be very near the edge, left or right, top or bottom. Improve the shape of the curve between the solid points by moving the open points that lie on the dashed tangents. Experiment to see how the shape changes. $PAR
+To modify the blue curve, click the "blue curve" button below the plot to expose blue points and tangents. Solid blue points lie on the curve. With your mouse click and hold each solid blue point, and move it into a better position. If the solution curve crosses an edge of the viewing region then the corresponding solid point should be very near the edge, left or right, top or bottom. Improve the shape of the curve between the solid points by moving the open points that lie on the dashed tangents. Experiment to see how the shape changes. $PAR
Modify the red or green curve in a similar way, after clicking the corresponding button to expose its points and tangents. I recommend moving solid points into good positions first, then move the open points to improve the shape between the solid points.
$PAR
-\[\frac{dy}{dt}=$expr.\]
+\[\frac{dy}{dt}=$expr.\]
$PAR
\{ printCanvas() \}$BR
@@ -543,7 +543,7 @@ $PAR
e) $BBOLD GREEN: $EBOLD Finally, use the information found in parts (a) and (b) to modify the $BBOLD green $EBOLD curve to make it represent the graph of a solution \(y=y(t)\) with initial condition \(y(0)=$greenICy\). \{printAnswerBox("greenAnswer")\}
$BR With this initial condition, what is \(\lim_{t\to\infty} y(t)\)? \{ans_rule(10)\}
$PAR
-f) If \(y(t)\) represents the population of some animal species, and if units on the \(y-\)axis are in thousands, interpret the results of (c), (d) and (e).
+f) If \(y(t)\) represents the population of some animal species, and if units on the \(y-\)axis are in thousands, interpret the results of (c), (d) and (e).
$BR
The solution to part (c) (sketched in $BBOLD blue $EBOLD) represents: \{ $popup1->menu() \}
$PAR
@@ -571,9 +571,9 @@ ANS($cdown->cmp);
ANS(essay_cmp());
-# convert canvas (x,y) coordinates to the coordinates (T,Y)
-# displayed on the plot using scale -5 < T < 5
-
+# convert canvas (x,y) coordinates to the coordinates (T,Y)
+# displayed on the plot using scale -5 < T < 5
+
sub xToT {
my $x = shift;
return ($x-250)/50;
@@ -597,13 +597,13 @@ sub Ytoy {
}
# the numbers here don't matter; only the form is important
-$blueAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$blueAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
-NAMED_ANS('blueAnswer'=>$blueAns->cmp(
+NAMED_ANS('blueAnswer'=>$blueAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
@@ -646,22 +646,22 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[0] > -4.8 ){
+ if ( $T[0] > -4.8 ){
push(@errors,"Check left end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?"); }
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -692,7 +692,7 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
}
else { $score++; }
-
+
if ( ($Y[3]-$Y[4])/($T[3]-$T[4]) > -4 ){
push(@errors,"Check slope as \(t\) gets large. Is it steep?");
}
@@ -700,23 +700,23 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
## check concavity; should be negative everywhere
my $concavOK = 1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) <= ($Y[2]-$Y[0])/($T[2]-$T[0])
- ){
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) <= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ ){
push(@errors,"Check concavity on the left.");
$concavOK = 0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) <= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) <= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concavOK = 0;
}
- $score += $concavOK;
-
+ $score += $concavOK;
+
$ansHash->{student_ans}="See graph.";
$ansHash->{preview_latex_string}="\text{See graph.}";
- $ansHash->{correct_ans_latex_string}="\text{Blue curve decreases from \(y=-$b\) to \(-\infty\)}\\ \text{with horizonal asymptote at left end.}";
+ $ansHash->{correct_ans_latex_string}="\text{Blue curve decreases from \(y=-$b\) to \(-\infty\)}\\ \text{with horizontal asymptote at left end.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
@@ -724,13 +724,13 @@ NAMED_ANS('blueAnswer'=>$blueAns->cmp(
ANS($lim1->cmp);
# the numbers here don't matter; only the form is important
-$redAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$redAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
-NAMED_ANS('redAnswer'=>$redAns->cmp(
+NAMED_ANS('redAnswer'=>$redAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
@@ -773,22 +773,22 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[0] > -4.8 ){
+ if ( $T[0] > -4.8 ){
push(@errors,"Check left end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?"); }
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -826,23 +826,23 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
## check concavity; should be positive everywhere
my $concav=1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
){
push(@errors,"Check concavity on the left.");
$concav = 0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) >= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concav = 0;
}
- $score += $concav;
-
+ $score += $concav;
+
$ansHash->{student_ans}="See graph.";
$ansHash->{preview_latex_string}="\text{See graph.}";
- $ansHash->{correct_ans_latex_string}="\text{Red curve increases from \(y=$a\) to \(\infty\)}\\ \text{with horizonal asymptote at left end.}";
+ $ansHash->{correct_ans_latex_string}="\text{Red curve increases from \(y=$a\) to \(\infty\)}\\ \text{with horizontal asymptote at left end.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
@@ -850,13 +850,13 @@ NAMED_ANS('redAnswer'=>$redAns->cmp(
ANS($lim2->cmp);
# the numbers here don't matter; only the form is important
-$greenAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
+$greenAns = List("(0,0),(0,0),(0,0),(0,0),(0,0)");
-NAMED_ANS('greenAnswer'=>$greenAns->cmp(
+NAMED_ANS('greenAnswer'=>$greenAns->cmp(
list_checker => sub {
my ($correct,$student,$ansHash,$value)=@_;
my $score = 0;
- my @errors = ();
+ my @errors = ();
my $i, $j; # indices
if (scalar(@{$student})==0){return 0;} # no points have been clicked
# read student's points
@@ -895,25 +895,25 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
return (1-$s)**2*$Y[2] + 2*(1-$s)*$s*$Y[3] + $s**2*$Y[4];
}
}
-
- ## check the domain of student's function
+
+ ## check the domain of student's function
## and that there are no vertical tangents
- if ( $T[0] > -4.8 ){
+ if ( $T[0] > -4.8 ){
push(@errors,"Check left end: what's the domain?");
}
if ($T[4] < 4.8 ){
push(@errors,"Check right end: what's the domain?");
}
- if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
+ if ( $T[0] > $T[1] or $T[1] > $T[2] or $T[2] > $T[3] or $T[3] > $T[4] ){
push(@errors,"Check tangent slopes. Is graph of a function?");
}
- elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
- $T[2] == $T[3] or $T[3] ==$T[4]
+ elsif ( $T[0]==$T[1] or $T[1] == $T[2] or
+ $T[2] == $T[3] or $T[3] ==$T[4]
){ push(@errors, "Vertical tangent?");}
if ( scalar(@errors) ){ return(0,@errors);}
# if it gets this far then $T[0]<$T[1]<$T[2]<$T[3]<$T[4]
-
+
## check the initial condition: solve bzX(s)=0 for s with bisection method
## (slow but bullet-proof) then find bzY(s).
my $Lo=0,$Hi=1,$Mid;
@@ -949,14 +949,14 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
else { $score++; }
## check concavity; should be positive on left, negative on right
- ## check inflection point
- my $concavOK=1;
- if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
+ ## check inflection point
+ my $concavOK=1;
+ if ( ($Y[1]-$Y[0])/($T[1]-$T[0]) >= ($Y[2]-$Y[0])/($T[2]-$T[0])
){
push(@errors,"Check concavity on the left.");
$concavOK=0;
}
- if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) <= ($Y[4]-$Y[2])/($T[4]-$T[2])
+ if ( ($Y[3]-$Y[2])/($T[3]-$T[2]) <= ($Y[4]-$Y[2])/($T[4]-$T[2])
){
push(@errors,"Check concavity on the right.");
$concavOK=0;
@@ -967,12 +967,12 @@ NAMED_ANS('greenAnswer'=>$greenAns->cmp(
$concavOK=0;
}
$score += $concavOK;
-
+
$ansHash->{student_ans}="See graph.";
$ansHash->{preview_latex_string}="\text{See graph.}";
- $ansHash->{correct_ans_latex_string}="\text{Green curve increases from \(y=-$b\) to \(y = $a\)}\\ \text{with horizonal asymptotes at both ends.}";
+ $ansHash->{correct_ans_latex_string}="\text{Green curve increases from \(y=-$b\) to \(y = $a\)}\\ \text{with horizontal asymptotes at both ends.}";
- return ($score*5/6,@errors);
+ return ($score*5/6,@errors);
}
));
@@ -985,4 +985,4 @@ ANS( $popup3->cmp() );
COMMENT("To show graphics in Library Browser click 'eye' icon (on upper right). One part requires grading by hand.");
-ENDDOCUMENT();
+ENDDOCUMENT();
diff --git a/OpenProblemLibrary/CSUOhio/differential_equations/phasePortrait/phasePortrait20.pg b/OpenProblemLibrary/CSUOhio/differential_equations/phasePortrait/phasePortrait20.pg
index f40f634052..025dd5b453 100644
--- a/OpenProblemLibrary/CSUOhio/differential_equations/phasePortrait/phasePortrait20.pg
+++ b/OpenProblemLibrary/CSUOhio/differential_equations/phasePortrait/phasePortrait20.pg
@@ -18,11 +18,11 @@
## Problem1('4')
## KEYWORDS('differential equations','first order','phase portraits','NSF-0941388')
## Language(en)
-##
-## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
+##
+## Javascript & html5 canvas replace original Flash app. -- G. Jennings, Jan. 2021
########################################################################
-# This work is supported in part by the National Science Foundation
+# This work is supported in part by the National Science Foundation
# under the grant DUE-0941388.
########################################################################
@@ -46,17 +46,17 @@ $canvasId = "phasePortrait20";
$canvasWidth = 420;
$canvasHeight = 150;
$axLengthX = 400; # axis length in canvas coordinates
-$debug = 0; # =0 to hide answer box, =1 to show answer box
+$debug = 0; # =0 to hide answer box, =1 to show answer box
-# # # # # # # # # # # # # # # # # # # # # #
-# Configure ticks on the axis
+# # # # # # # # # # # # # # # # # # # # # #
+# Configure ticks on the axis
# the axis has three coordinate systems:
# t and T stand for the coordinate displayed on the tick labels
# x and X stand for the X-coordinate in the canvas coordinate system
# n is integer valued, used for locating arrows etc.
# t,x,n are related by their values at left tick and intervals between ticks.
-# ticks range from leftTickT to tPerTick*(tickCount - 1) in t-coordinates
-# # # # # # # # # # # # # # # # # # # # # #
+# ticks range from leftTickT to tPerTick*(tickCount - 1) in t-coordinates
+# # # # # # # # # # # # # # # # # # # # # #
$leftTickT = -6;
@@ -66,16 +66,16 @@ $nPerTick = 2;
## the canvas element
-sub printCanvas {
- return MODES(
- TeX => image("phaseline.png"),
+sub printCanvas {
+ return MODES(
+ TeX => image("phaseline.png"),
HTML => qq!!,
PTX => " HTML5 canvas element "
);
}
-## the answer box. It holds the canvas state and is filled automatically by javascript so
-## normally it's hidden (displayed only if $debug = 1).
+## the answer box. It holds the canvas state and is filled automatically by javascript so
+## normally it's hidden (displayed only if $debug = 1).
sub printAnswerBox {
if ($debug) { return MODES(
@@ -88,7 +88,7 @@ sub printAnswerBox {
HTML => NAMED_HIDDEN_ANS_RULE( 'answerBox', 50 ),
PTX => ''
);}
-}
+}
####################################################################
##### Begin javascript (this will go in html header) ###############
@@ -97,19 +97,19 @@ sub printAnswerBox {
$javascript = <<"END_JAVASCRIPT";