Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM MATH 151 Lab 8 Put team members names and section number here In 2 from sympy import from sympy plotting import plot plot parametric Question 1 1a http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 1 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 28 x symbols x f 1 40 x 6 2 x 5 16 x 4 20 x 3 64 x 2 36 x 72 derivative diff f x vals solve derivative x print Critical values are vals test 4 3 1 0 5 1 3 cvals oo 3 34 2 21 0 368 0 821 2 69 oo for i in range 6 check derivative subs x test i if check 0 print f When x test i f x check and is therefore decreasing from else print f When x test i f x check and is therefore increasing from plot derivative x 5 5 ylim 5 5 Critical values are 3 34365086397455 2 20571930723638 0 3677 85714582751 0 821156998770767 2 69376079119075 When x 4 f x 24 9000000000000 and is therefore decreasing from oo to 3 34 When x 3 f x 3 00000000000000 and is therefore increasing from 3 34 to 2 21 When x 1 f x 3 90000000000000 and is therefore decreasing from 2 21 to 0 368 When x 0 5 f x 0 145312500000000 and is therefore increasin g from 0 368 to 0 821 When x 1 f x 0 400000000000000 and is therefore decreasing from 0 821 to 2 69 When x 3 f x 8 70000000000000 and is therefore increasing f rom 2 69 to oo Out 28 sympy plotting plot Plot at 0x7fab632c0cd0 1b http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 2 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 35 df diff derivative x val solve df x print Inflection values are val crivals oo 2 89 1 10 0 6 2 12 oo testvals 3 2 0 5 2 3 for i in range 5 check df subs x testvals i if check 0 print f When x testvals i f x check so f is concave down from else print f When x testvals i f x check so f is concave up from plot df x 5 5 ylim 5 5 Inflection values are 2 89174218338126 1 78636936811663e 30 I 1 16242859299527 5 51234993515341e 30 I 0 597894461879547 6 00114534019814e 30 I 2 12294298116364 2 27516477316136e 30 I When x 3 f x 2 75000000000000 so f is concave up from oo to 2 89 When x 2 f x 6 00000000000000 so f is concave down from 2 89 to 1 1 When x 0 5 f x 3 42187500000000 so f is concave up from 1 1 to 0 6 When x 2 f x 2 00000000000000 so f is concave down from 0 6 to 2 12 When x 3 f x 38 7500000000000 so f is concave up from 2 12 to oo Out 35 sympy plotting plot Plot at 0x7fab100940d0 1c http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 3 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 36 print There are 2 local extremas print There are 4 points of infelction There are 2 local extremas There are 4 points of infelction 1d In 37 plot f x 10 10 ylim 10 10 Out 37 sympy plotting plot Plot at 0x7fab33528700 Question 2 2a http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 4 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 5 x symbols x first x 3 exp 3 x 2 second x 3 exp 2 x 2 third x 3 exp 1 x 2 fourth x 3 exp 0 x 2 fifth x 3 exp 1 x 2 sixth x 3 exp 2 x 2 seventh x 3 exp 3 x 2 plot first x 3 3 second x 3 3 third x 3 3 fourth Out 5 sympy plotting plot Plot at 0x7f7df235deb0 In 6 b symbols b g x 3 exp b x 2 dg diff g x cv solve dg x print The critical values are cv and they are real for b oo 0 The critical values are 0 sqrt 6 sqrt 1 b 2 sqrt 6 sqrt 1 b 2 and they are real for b oo 0 2b 2c http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 5 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 8 print As b oo the critical values of the function approah 0 plot g subs b 100 x 3 3 As b oo the critical values of the function approah 0 Out 8 sympy plotting plot Plot at 0x7f7df2335a60 In 66 dg2 diff dg x ival solve dg2 x print Inflection values are ival for b oo 0 Inflection values are 0 sqrt 2 sqrt 1 b 2 sqrt 2 sqrt 1 b 2 sqrt 3 sqrt 1 b sqrt 3 sqrt 1 b for b oo 0 2d 2e http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 6 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 85 crival1 sqrt 6 sqrt 1 b 2 1 b1 solve crival1 b print Critical value includes 1 when b b1 ival1 sqrt 2 sqrt 1 b 2 1 b2 solve ival1 b ival2 sqrt 3 sqrt 1 b 1 b3 solve ival2 b print Inflection values include 1 when b b2 and b b3 first x 3 exp b1 0 x 2 second x 3 exp b2 0 x 2 third x 3 exp b3 0 x 2 plot first x 3 3 second x 3 3 third x 3 3 ylim Critical value includes 1 when b 3 2 Inflection values include 1 when b 1 2 and b 3 Out 85 sympy plotting plot Plot at 0x7fab28b32430 Question 3 3a http localhost 8888 notebooks Downloads Lab8temp 151 22C ipynb Page 7 of 9 Lab8temp 151 22C Jupyter Notebook 11 14 22 8 29 PM In 31 x symbols x f ln 5 x print lnx is continuous for all values greater than 0 therefore ln 5 x is continuous in the interval 1 4 df diff f x print f x df print f 1 df subs x 1 and f 4 df subs x 4 therefore f x is diffrentiable on 1 4 c f subs x 4 f subs x 1 4 1 print Average rate of change c fun df c cval solve fun x print The value of c is cval 0 evalf lnx is continuous for all values greater than 0 therefore ln 5 x is continuous in the interval 1 4 f x 1 5 x f 1 1 4 and f 4 1 therefore f x is diffrentiable on 1 4 Average rate of change log 4 3 The value of c is …
View Full Document