From 0915bcfcf3eaa92c38159273f2a2ed4c006d5d03 Mon Sep 17 00:00:00 2001 From: Steven Clontz Date: Fri, 3 Jan 2025 16:09:01 -0600 Subject: [PATCH] fix sagemath issue with `graph-x-minus-four` (#545) --- source/precalculus/source/meta/graphs.ptx | 509 +++++++++++----------- 1 file changed, 249 insertions(+), 260 deletions(-) diff --git a/source/precalculus/source/meta/graphs.ptx b/source/precalculus/source/meta/graphs.ptx index e14ef425..63b02d1e 100644 --- a/source/precalculus/source/meta/graphs.ptx +++ b/source/precalculus/source/meta/graphs.ptx @@ -3,280 +3,269 @@ Graphs of Common Functions Polynomial Functions -

- - -

- - plot(x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) - - Graph of y=x -
-
- - plot(x^2,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) - - Graph of y=x^2 -
- - -
- - plot(x^3,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) - - Graph of y=x^3 -
-
- - plot(x^4,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) - - Graph of y=x^4 -
-
- -

+ + +
+ Graph of y=x + + plot(x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) + +
+
+ Graph of y=x^2 + + plot(x^2,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) + +
+
+ +
+ Graph of y=x^3 + + plot(x^3,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) + +
+
+ Graph of y=x^4 + + plot(x^4,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) + +
+
+
Rational Functions -

- - -

- - p=plot(1/x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') - p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\dfrac{1}{x} -
-
- - p=plot(1/x^2,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') - p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\dfrac{1}{x^2} -
- - -
- - p=plot(1/x^3,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') - p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\dfrac{1}{x^3} -
-
- - p=plot(1/x^4,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') - p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\dfrac{1}{x^4} -
-
- -

+ + +
+ Graph of y=\dfrac{1}{x} + + p=plot(1/x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') + p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ Graph of y=\dfrac{1}{x^2} + + p=plot(1/x^2,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') + p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ +
+ Graph of y=\dfrac{1}{x^3} + + p=plot(1/x^3,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') + p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ Graph of y=\dfrac{1}{x^4} + + p=plot(1/x^4,xmin=-5,xmax=-0.1,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,gridlines=True, ticks=[1,1]) + p+=plot(1/x^4,xmin=0.1,xmax=5,ymin=-5,ymax=5,thickness=3) + p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') + p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+
Other Functions -

- - -

- - plot(abs(x),xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - - Graph of y=|x| -
-
- - p=plot(sqrt(x),xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p.SHOW_OPTIONS['xmin']=-5 - p - - Graph of y=\sqrt{x} -
- - -

+ + +
+ Graph of y=|x| + + plot(abs(x),xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + +
+
+ Graph of y=\sqrt{x} + + p=plot(sqrt(x),xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p.SHOW_OPTIONS['xmin']=-5 + p + +
+
+
Exponential and Logarithmic Functions -

- - -

- - p=plot(2^x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=b^x, with b=2 -
-
- - p=plot(log(x)/log(2),xmin=0,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') - p.SHOW_OPTIONS['xmin']=-5 - p - - Graph of y=\log_b x, with b=2 -
- - -
- - p=plot(e^x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=e^x -
-
- - p=plot(log(x),xmin=0,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) - p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') - p.SHOW_OPTIONS['xmin']=-5 - p - - Graph of y=\ln x -
-
- -

+ + +
+ Graph of y=b^x, with b=2 + + p=plot(2^x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ Graph of y=\log_b x, with b=2 + + p=plot(log(x)/log(2),xmin=0,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') + p.SHOW_OPTIONS['xmin']=-5 + p + +
+
+ +
+ Graph of y=e^x + + p=plot(e^x,xmin=-5,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(-5,0),(5,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ Graph of y=\ln x + + p=plot(log(x),xmin=0,xmax=5,ymin=-5,ymax=5,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,1]) + p+=line([(0,-5),(0,5)],thickness=3,linestyle='dashed',color='red') + p.SHOW_OPTIONS['xmin']=-5 + p + +
+
+
Trigonometric Functions -

- - -

- - plot(sin(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) - - Graph of y=\sin(x) -
-
- - p=plot(csc(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) - for i in [-2..2]: - p+=line([(i*pi,-2*pi),(i*pi,2*pi)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\csc x -
- - -
- - plot(cos(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) - - Graph of y=\cos x -
-
- - p=plot(sec(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) - for i in [-2..1]: - p+=line([(i*pi+pi/2,-2*pi),(i*pi+pi/2,2*pi)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\sec x -
-
- -
- - p=plot(tan(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) - for i in [-2..1]: - p+=line([(i*pi+pi/2,-2*pi),(i*pi+pi/2,2*pi)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\tan x -
-
- - p=plot(cot(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) - for i in [-2..2]: - p+=line([(i*pi,-2*pi),(i*pi,2*pi)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\cot x -
-
- -

+ + +
+ Graph of y=\sin(x) + + plot(sin(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) + +
+
+ Graph of y=\csc x + + p=plot(csc(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) + for i in [-2..2]: + p+=line([(i*pi,-2*pi),(i*pi,2*pi)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ +
+ Graph of y=\cos x + + plot(cos(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) + +
+
+ Graph of y=\sec x + + p=plot(sec(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) + for i in [-2..1]: + p+=line([(i*pi+pi/2,-2*pi),(i*pi+pi/2,2*pi)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ +
+ Graph of y=\tan x + + p=plot(tan(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) + for i in [-2..1]: + p+=line([(i*pi+pi/2,-2*pi),(i*pi+pi/2,2*pi)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ Graph of y=\cot x + + p=plot(cot(x),xmin=-2*pi,xmax=2*pi,ymin=-2*pi,ymax=2*pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[pi/2,1],tick_formatter=[pi,1]) + for i in [-2..2]: + p+=line([(i*pi,-2*pi),(i*pi,2*pi)],thickness=3,linestyle='dashed',color='red') + p + +
+
+
Inverse Trigonometric Functions -

- - -

- - p=plot(arcsin(x),xmin=-1,xmax=1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p.SHOW_OPTIONS['xmin']=-pi - p.SHOW_OPTIONS['xmax']=pi - p - - Graph of y=\sin^{-1}(x) -
-
- - p=plot(arccsc(x),xmin=-pi,xmax=-1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=plot(arccsc(x),xmin=1,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=line([(-pi,0),(pi,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\csc^{-1}(x) -
- - -
- - p=plot(arccos(x),xmin=-1,xmax=1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p.SHOW_OPTIONS['xmin']=-pi - p.SHOW_OPTIONS['xmax']=pi - p - - Graph of y=\cos^{-1}(x) -
-
- - p=plot(arcsec(x),xmin=-pi,xmax=-1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=plot(arcsec(x),xmin=1,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=line([(-pi,pi/2),(pi,pi/2)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\sec^{-1}(x) -
-
- -
- - p=plot(arctan(x),xmin=-pi,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=line([(-pi,pi/2),(pi,pi/2)],thickness=3,linestyle='dashed',color='red') - p+=line([(-pi,-pi/2),(pi,-pi/2)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\tan^{-1}(x) -
-
- - p=plot(arccot(x),xmin=-pi,xmax=-0.001,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=plot(arccot(x),xmin=0.001,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) - p+=line([(-pi,0),(pi,0)],thickness=3,linestyle='dashed',color='red') - p - - Graph of y=\cot^{-1}(x) -
-
- -

+ + +
+ Graph of y=\sin^{-1}(x) + + p=plot(arcsin(x),xmin=-1,xmax=1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p.SHOW_OPTIONS['xmin']=-pi + p.SHOW_OPTIONS['xmax']=pi + p + +
+
+ Graph of y=\csc^{-1}(x) + + p=plot(arccsc(x),xmin=-pi,xmax=-1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=plot(arccsc(x),xmin=1,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=line([(-pi,0),(pi,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ +
+ Graph of y=\cos^{-1}(x) + + p=plot(arccos(x),xmin=-1,xmax=1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p.SHOW_OPTIONS['xmin']=-pi + p.SHOW_OPTIONS['xmax']=pi + p + +
+
+ Graph of y=\sec^{-1}(x) + + p=plot(arcsec(x),xmin=-pi,xmax=-1,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=plot(arcsec(x),xmin=1,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=line([(-pi,pi/2),(pi,pi/2)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ +
+ Graph of y=\tan^{-1}(x) + + p=plot(arctan(x),xmin=-pi,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=line([(-pi,pi/2),(pi,pi/2)],thickness=3,linestyle='dashed',color='red') + p+=line([(-pi,-pi/2),(pi,-pi/2)],thickness=3,linestyle='dashed',color='red') + p + +
+
+ Graph of y=\cot^{-1}(x) + + p=plot(arccot(x),xmin=-pi,xmax=-0.001,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=plot(arccot(x),xmin=0.001,xmax=pi,ymin=-pi,ymax=pi,thickness=3,aspect_ratio=1,detect_poles=True,gridlines=True, ticks=[1,pi/4],tick_formatter=[1,pi]) + p+=line([(-pi,0),(pi,0)],thickness=3,linestyle='dashed',color='red') + p + +
+
+
\ No newline at end of file