Lab7temp 151 22C Jupyter Notebook 11 5 22 2 21 AM MATH 151 Lab 7 Put team members names and section number here In 1 from sympy import from sympy plotting import plot plot parametric Question 1 In 79 x symbols x f1 8 x 2 f2 5 exp x 2 2 2 x df1 diff f1 x df2 diff f2 x cval1 solve df1 x cval2 nsolve df2 3 cval3 nsolve df2 5 print Critcal values are cval2 and cval3 Critcal values are 2 41784619385985 and 4 78643377270907 In 84 neg5 f1 subs x 5 pos5 f2 subs x 5 cv1 f2 subs x cval2 cv2 f2 subs x cval3 print The absolute extrema on 5 5 is cv1 when x cval2 The absolute extrema on 5 5 is 7 20429639824017 when x 2 41 784619385985 In 57 neg10 f1 subs x 10 pos10 f2 subs x 10 cv1 f2 subs x cval2 cv2 f2 subs x cval3 print The absolute extrema on 10 10 is pos10 evalf when x 10 The absolute extrema on 10 10 is 10 0000005626759 when x 10 http localhost 8888 notebooks Downloads Lab7temp 151 22C ipynb Page 1 of 5 1a 1b 1c 1d 2a 2b Lab7temp 151 22C Jupyter Notebook 11 5 22 2 21 AM In 13 plot f1 x 10 0 f2 x 0 10 ylim 20 10 10 0 75 5 0 2 5 5 0 75 10 0 10 Out 13 sympy plotting plot Plot at 0x7fd393e13520 Question 2 In 17 r0 symbols r0 r symbols r k symbols k v k r0 r r 2 derivative diff v r cvals solve derivative r print The value of r in the interval 1 2r0 r0 at which v has an absolute maximum is The value of r in the interval 1 2r0 r0 at which v has an absol ute maximum is 2 r0 3 In 19 val v subs r cvals 1 print The absolute maximum value of v on the same interval is val The absolute maximum value of v on the same interval is 4 k r0 3 27 http localhost 8888 notebooks Downloads Lab7temp 151 22C ipynb Page 2 of 5 Lab7temp 151 22C Jupyter Notebook 11 5 22 2 21 AM In 21 rval 2 0 65 3 vval 4 15000 0 65 3 27 print The maximum value of the function when r 0 65 and k 15000 is The maximum value of the function when r 0 65 and k 15000 is 6 10 2777777777778 and it occurs when r 0 43333333333333335 2c 2d In 22 v 15000 0 65 r r 2 plot v r 0 0 65 Out 22 sympy plotting plot Plot at 0x7fd37003bc10 Question 3 3a http localhost 8888 notebooks Downloads Lab7temp 151 22C ipynb Page 3 of 5 In 75 print Since the derivative of f x g x is 0 this tells us that there is no slope to the graph and all values within the domain to the function are critical values Lab7temp 151 22C Jupyter Notebook 11 5 22 2 21 AM In 30 from sympy import x symbols x f atan x g acot x df diff f x dg diff g x print Derivative of f x df print Derivative of g x dg simplified df dg print f x g x simplified simplified Derivative of f x 1 x 2 1 Derivative of g x 1 x 2 1 f x g x simplified 0 3b 3c Since the derivative of f x g x is 0 this tells us that there is no slope to the graph and all values within the domain to the function are critical values In 91 function atan x acot x plot function x 10 10 ylim 5 5 print For x 0 y pi 2 and for x 0 y pi 2 O 25 50 For x 0 y pi 2 and for x 0 y pi 2 http localhost 8888 notebooks Downloads Lab7temp 151 22C ipynb Page 4 of 5 Lab7temp 151 22C Jupyter Notebook 11 5 22 2 21 AM 3d In 92 print tan theta is equivelant to cot 2 theta print If x tan theta and you arccot both sides of the equation tan theta cot 2 theta print You get arccot tan theta arccot cot 2 theta after substitution of x it leads to arccotx 2 theta print Since x tan theta theta arctanx and arccotx 2 arctanx print This gives us arccotx arctanx 2 so this is seen in the graph when x 0 tan theta is equivelant to cot 2 theta If x tan theta and you arccot both sides of the equation ta n theta cot 2 theta You get arccot tan theta arccot cot 2 theta after su bstitution of x it leads to arccotx 2 theta Since x tan theta theta arctanx and arccotx 2 arctanx This gives us arccotx arctanx 2 so this is seen in the grap h when x 0 http localhost 8888 notebooks Downloads Lab7temp 151 22C ipynb Page 5 of 5
View Full Document