Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production #1140

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions Contrib/PCC/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
processLibDevs
checkLibDevs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("FiniteSolutionSets");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
#$reach is the maximum value shown on the graph.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
#$reach is the maximum value shown on the graph.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
#$reach is the maximum value shown on the graph.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
#$reach is the maximum value shown on the graph.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loadMacros(

##############################################
TEXT(beginproblem());
$refreshCachedImages = 1;


Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ loadMacros(

##############################################
TEXT(beginproblem());
#$refreshCachedImages = 1;

Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ loadMacros(
##############################################

TEXT(beginproblem());
$refreshCachedImages=1;

Context("Numeric");
Context()->variables->add(t => 'Real');
Context()->flags->set(showExtraParens=>0, reduceConstants=>0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TEXT(beginproblem());

Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
$refreshCachedImages=1;


do {
$a = non_zero_random(-3,3,1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TEXT(beginproblem());

Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');
$refreshCachedImages=1;


do {
$a = non_zero_random(-3,3,1);
Expand Down
140 changes: 140 additions & 0 deletions Contrib/PCC/BasicAlgebra/Calculator/DesmosFindingDomain10.pg
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# WeBWorK problem written by Carl Yao
# Portland Community College
#
#
# ENDDESCRIPTION

## DBsubject('Algebra')
## DBchapter('Coordinates and Graphs')
## DBsection('Graphs of Equations')
## KEYWORDS('quadratic','function','parabola','application')
## DBCCSS('F.IF.7.a','F.IF.4','A-CED.1')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('')
## Author('Alex Jordan, Carl Yao, Chris Hughes')
## Institution('PCC')

##############################################

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
"AnswerFormatHelp.pl",
"PCCmacros.pl",
"PGgraphmacros.pl",
"PCCgraphMacros.pl",
"PGcourse.pl",
);

##############################################

TEXT(beginproblem());

Context("Numeric");
Context()->noreduce('(-x)-y','(-x)+y');

$a = random(1,10,1);
$a2 = $a**2;
$b = non_zero_random(-10,10,1);
$c = random(-1,1,2);
$d = random(-10,10,1);
$func = Compute("$c*sqrt((x-$d)**2-$a2)+$b")->reduce;
$xd0 = -$a+$d;
$xd1 = $a+$d;

$domain = Compute("(-inf,$xd0]U[$xd1,inf)");
$range = $c>0 ? Compute("[$b,inf)") : Compute("(-inf,$b]");

($min[0], $max[0], $min[1], $max[1], $ticknum[0], $ticknum[1], $xticks_ref, $yticks_ref, $marksep[0], $marksep[1]) = NiceGraphParameters([$xd0,$xd1],[2*$b,-$b]);

@xticks = @$xticks_ref;
@yticks = @$yticks_ref;

$gr = init_graph($min[0],$min[1],$max[0],$max[1],
axes=>[0,0],
grid=>[$ticknum[0],$ticknum[1]],
size=>[xPixels(),yPixels()]
);
$gr->lb('reset');
for my $j (@xticks) {
if (abs($j)<10**(-10)) {next;}
$gr->lb( new Label($j, -$marksep[1]/8, $j,'black','center','top'));
}

for my $j (@yticks) {
if (Real($j) == 0) {next;}
$gr->lb( new Label(-$marksep[0]/8, $j, $j,'black','right','middle'));
}

$xfunc = sub { my $t = shift();
return $a/cos($t)+$d; };
$yfunc = sub { my $t = shift();
return $a*tan($t)+$b; };
if ($c>0) {
$fn1 = new Fun( $xfunc, $yfunc, $gr );
$fn1->domain(0,pi/2-0.1);
$fn2 = new Fun( $xfunc, $yfunc, $gr );
$fn2->domain(pi,3*pi/2-0.1);
} else {
$fn1 = new Fun( $xfunc, $yfunc, $gr );
$fn1->domain(pi/2,pi-0.1);
$fn2 = new Fun( $xfunc, $yfunc, $gr );
$fn2->domain(3*pi/2,2*pi-0.1);
}

$tb = $c>0 ? "top" : "bottom";
$gr->stamps( closed_circle($xd0,$b,'blue') );
$gr->lb( new Label($xd0,$b,"($xd0,$b)", 'blue','center',$tb,large));
$gr->stamps( closed_circle($xd1,$b,'blue') );
$gr->lb( new Label($xd1,$b,"($xd1,$b)", 'blue','center',$tb,large));

$ud = $c>0 ? "up" : "down";
$alt = "This is the graph of f(x)=$func. Its graph starts at ($xd0,$b) and goes $ud and outward, and starts at ($xd1,$b) and goes $ud and outward.";

##############################################

BEGIN_PGML

Use technology to find the domain and range of

[``f(x)=[$func]``]

use technology to determine the following. Use *inf* to represent infinity.

[@KeyboardInstructions(q?Use interval notation.?)@]**

Domain: [__]{$domain}{width => 30}

Range: [__]{$range}{width => 30}

END_PGML

############################################################
# Solution
############################################################

BEGIN_PGML_SOLUTION

We will use desmos.com to answer those questions.

Step 1: Go to desmos.com, click on Start Graphing.

Step 2: In the first textbox, enter [` f(x)=[$func] `].

Step 3: If needed, zoom out to see the function's critical points.

>>[@ image( insertGraph($gr), width=>xScreen(), height=>yScreen(), tex_size=>TeXscalar(), extra_html_tags=>"alt = '$alt' title = '$alt'" )@]*<<

The domain is [`[$domain]`]. The range is [`[$range]`].

END_PGML_SOLUTION

ENDDOCUMENT();


Loading