In 67 print If there is a change in sign at the points on the interval then there is a root in that interval provided the function is continuous If there is a change in sign at the points on the interval then t here is a root in that interval provided the function is continu ous Lab3temp 151 22C Jupyter Notebook 9 19 22 3 14 PM MATH 151 Lab 3 Put team members names and section number here In from sympy import from sympy plotting import plot plot parametric Question 1 In 20 from sympy import x symbols x f x 5 4 x 3 2 x 2 8 x 1 value1 f subs x 0 value2 f subs x 1 print When x 0 the values of f x is value1 print When x 1 the values of f x is value2 print Due to the change in sign there is a root in this interval When x 0 the values of f x is 1 When x 1 the values of f x is 10 Due to the change in sign there is a root in this interval 1a 1b In 25 from sympy import x symbols x f x 5 4 x 3 2 x 2 8 x 1 value solve f x values i evalf for i in value for i in range 5 values i re values i print The root in the interval 0 1 is values 0 The root in this interval is 0 128044891411745 http localhost 8891 notebooks Downloads Lab3temp 151 22C ipynb Page 1 of 6 Lab3temp 151 22C Jupyter Notebook 9 19 22 3 14 PM Question 2 2a In 33 from sympy import x symbols x g1 2 x 3 g2 4 x x 2 lim3left limit g1 x 3 lim3right limit g2 x 3 value g1 subs x 3 print As x approaches 3 the left limit is lim3left and the right limit is print Since g 3 value the function is continuous at x 3 g3 x 2 6 x 8 x 4 lim4left limit g2 x 4 lim4right limit g3 x 4 value g2 subs x 4 print As x approaches 4 the left limit is lim4left and the right limit is print Since g 4 value the function is continuous from the left g4 exp x 4 ln 3 lim5left limit g3 x 5 lim5right limit g4 x 5 value g4 subs x 5 print As x approaches 4 the left limit is lim5left and the right limit is print Since g 5 value the function is continuous from the Right As x approaches 3 the left limit is 3 and the right limit is 3 Since g 3 3 the function is continuous at x 3 As x approaches 4 the left limit is 0 and the right limit is 4 Since g 4 0 the function is continuous from the left As x approaches 4 the left limit is 17 5 and the right limit is 3 Since g 5 3 the function is continuous from the Right 2b http localhost 8891 notebooks Downloads Lab3temp 151 22C ipynb Page 2 of 6 Lab3temp 151 22C Jupyter Notebook 9 19 22 3 14 PM In 35 x symbols x plot 2 x 3 x 0 3 4 x x 2 x 3 4 x 2 6 x 8 x 4 print Graph for piece wise functions from Out 35 sympy plotting plot Plot at 0x7f9c9b1ecd00 Question 3 3a http localhost 8891 notebooks Downloads Lab3temp 151 22C ipynb Page 3 of 6 Lab3temp 151 22C Jupyter Notebook 9 19 22 3 14 PM In 35 from sympy import from math import t symbols t P 10000 10 990 e 0 1 t plot P t 100 500 print graph when K 1000 from 100 to 500 graph when K 1000 from 100 to 500 In 28 value limit P t oo print The limit as t OO when K 1000 is value The limit as t OO when K 1000 is 1000 3b http localhost 8891 notebooks Downloads Lab3temp 151 22C ipynb Page 4 of 6 Lab3temp 151 22C Jupyter Notebook 9 19 22 3 14 PM In 30 from sympy import from math import t symbols t P 10 10 9 e 0 1 t plot P t 50 50 print graph when K 1 from 50 to 50 graph when K 1 from 50 to 50 In 31 value limit P t oo print The limit as t OO when K 1 is value The limit as t OO when K 1 is 1 3c http localhost 8891 notebooks Downloads Lab3temp 151 22C ipynb Page 5 of 6 Lab3temp 151 22C Jupyter Notebook 9 19 22 3 14 PM In 36 from sympy import t symbols t P 150 10 5 e 0 1 t plot P t 50 100 print graph when K 15 from 50 to 100 graph when K 15 from 50 to 100 In 34 value limit P t oo print The limit as t OO when K 15 is value The limit as t OO when K 15 is 15 3d In As t tends to infinity there is no longer an increase in populati on size and it begins to limit this limit value is dependent on t he K value capped at it Therefore as the value of K increases so does population size http localhost 8891 notebooks Downloads Lab3temp 151 22C ipynb Page 6 of 6 In 1 print As t tends to infinity there is no longer an increase in population size and it begins to limit this limit value is dependent on the K value capped at it Therefore as the value of K increases so does population size
View Full Document