plots for closed interval method worksheet

2516 days ago by chrisphan

var('x') html("These are plots to go along with the solutions to the worksheet “Closed interval method”.<br /><h1>Exercise 1a</h1>$$f(x)=xe^x, \; -4 \leq x \leq 0$$") show(plot(lambda x: x*exp(x), -4, 0, rgbcolor=(1, 0, 0))+ point([[0, 0], [-1, -exp(-1)], [-4, -4*exp(-4)]], size=50)+ text("min at $x = -1$", (-1.6, -exp(-1)),rgbcolor=(0, 0.25, 0), fontsize=12) + text("max at $x = 0$", (-0.5, 0.01),rgbcolor=(0, 0.25, 0), fontsize=12)) 
       
These are plots to go along with the solutions to the worksheet “Closed interval method”.

Exercise 1a

f(x)=xe^x, \; -4 \leq x \leq 0

                                
                            
These are plots to go along with the solutions to the worksheet “Closed interval method”.

Exercise 1a

f(x)=xe^x, \; -4 \leq x \leq 0

                                
html("<h1>Exercise 1b</h1>$$f(x)=\\frac{x}{x^3 + 1}, \; 0 \leq x \leq 3$$") show(plot(lambda x: x/(x^3+1), 0, 3, rgbcolor=(1, 0, 0))+ point([[0, 0], [1/2^(1/3), 4^(1/3)/3], [3, 3/28]], size=50) + text("min at $x = 0$", (0.45, 0.025),rgbcolor=(0, 0.25, 0), fontsize=12) + text("max at $x = \sqrt[3]{1/2}$", (0.5, 0.6),rgbcolor=(0, 0.25, 0), fontsize=12)) 
       

Exercise 1b

f(x)=\frac{x}{x^3 + 1}, \; 0 \leq x \leq 3

                                
                            

Exercise 1b

f(x)=\frac{x}{x^3 + 1}, \; 0 \leq x \leq 3

                                
f = lambda x: x^3 - x^2 - 36*x + 36 a = (2 + sqrt(436))/6 b = (2 - sqrt(436))/6 html("<h1>Exercise 1c</h1>$$f(x)=x^3 - x^2 - 36x + 36, \; -6 \leq x \leq 8$$") show(plot(f, -6, 8, rgbcolor=(1, 0, 0))+ point([[8, f(8)], [a, f(a)], [b, f(b)], [ -6, f(-6)]], size=50) + text("min at $x = \\frac{2 + \sqrt{436}}{6}$", (a, f(a)-15),rgbcolor=(0, 0.25, 0), fontsize=12) + text("max at $x = 8$", (7, f(8)+15),rgbcolor=(0, 0.25, 0), fontsize=12)) 
       

Exercise 1c

f(x)=x^3 - x^2 - 36x + 36, \; -6 \leq x \leq 8

                                
                            

Exercise 1c

f(x)=x^3 - x^2 - 36x + 36, \; -6 \leq x \leq 8

                                
f = lambda x: x*(100-2*x) html("<h1>Exercise 2</h1>$$f(x)=x(100-2x), \;x \in [0, 50]$$") show(plot(f, 0, 50, rgbcolor=(1, 0, 0))+ point([[0, f(0)], [50, f(50)], [25, f(25)]], size=50)+ text("max at $x = 25$", (25, f(25)+150),rgbcolor=(0, 0.25, 0), fontsize=12) ) 
       

Exercise 2

f(x)=x(100-2x), \;x \in [0, 50]

                                
                            

Exercise 2

f(x)=x(100-2x), \;x \in [0, 50]