From b37dd219e0d9d5ef84d4b36980a4cae8a834a212 Mon Sep 17 00:00:00 2001 From: Sean Fitzpatrick Date: Tue, 24 Sep 2024 13:04:57 -0600 Subject: [PATCH] Ensure point on graph matches inverse condition --- ptx/sec_deriv_inverse_function.ptx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ptx/sec_deriv_inverse_function.ptx b/ptx/sec_deriv_inverse_function.ptx index ba1ef67d0..9d02bc7b8 100644 --- a/ptx/sec_deriv_inverse_function.ptx +++ b/ptx/sec_deriv_inverse_function.ptx @@ -888,19 +888,20 @@ - Context("Fraction"); - ($h,$c,$x0) = (-9..-1,1..9)[NchooseK(18,3)]; + Context("Fraction")->noreduce('(-x)-y', '(-x)+y'); + ($h,$c,$x0) = random_subset(3, -9 .. -1, 1 .. 9); if($envir{problemSeed}==1){$h=1; $c=4; $x0=3;}; - $f = Formula("x^2 - 2*$a x + $c")->reduce; - $y0 = $f->eval(x=>$x0); + $f = Formula("x^2 - 2*$h x + $c")->reduce; + $y0 = $f->eval(x => $x0); $point = Point($x0,$y0); $fp = $f->D('x'); - $fpx0 = $fp->eval(x=>$x0); + $fpx0 = $fp->eval(x => $x0); $fipy0 = Fraction(1/$fpx0); + $sign = ($x0 > $h) ? '\geq' : '\leq';

- The point is on the graph of f(x) = , x\geq 1. + The point is on the graph of f(x) = , x . Find \left(f^{-1}\right)'().