Find minimum and maximum values of the functioin f(x) = (3-x)**2 + (1+x)**3 for 0<=x<=2
\(\begin{array}{rcl} f(x) &=& (3-x)^2 + (1+x)^3 \\\\ f'(x) &=& 2\cdot (3-x)\cdot (-1) + 3\cdot (1+x)^2\cdot (1)\\ f'(x) &=& 3x^2+8x-3\\\\ f''(x) &=& 3\cdot 2\cdot x + 8 \\ f''(x) &=& 6x+8 \end{array}\)
minimum and maximum: \(f'(x) = 0\)
\(\begin{array}{rcl} 3x^2+8x-3 &=& 0 \\\\ \boxed{~ x = {-b \pm \sqrt{b^2-4ac} \over 2a} ~}\\ x_{1,2} &=& {-8 \pm \sqrt{8^2-4\cdot 3\cdot (-3) } \over 2\cdot 3} \\ x_{1,2} &=& {-8 \pm \sqrt{64+36} \over 6 } \\ x_{1,2} &=& {-8 \pm \sqrt{100} \over 6 } \\ x_{1,2} &=& {-8 \pm 10 \over 6 } \\\\ x_1 &=& {-8 + 10 \over 6 }\\ x_1 &=& {2 \over 6 }\\ \mathbf{x_1} &\mathbf{=}& \mathbf{\frac13} \qquad y''(\frac13) = 6\cdot \frac13 + 8 = 10 \quad \mathbf{>0} \quad \rightarrow \text{Minimum}\\\\ x_2 &=& {-8 - 10 \over 6 }\\ x_2 &=& {-18 \over 6 }\\ \mathbf{x_2} &\mathbf{=}& \mathbf{-3} \qquad y''(\frac13) = 6\cdot (-3) + 8 = -10 \quad \mathbf{<0} \quad \rightarrow \text{Maximum}\\\\\\ \end{array}\)
\(0 \le x \le 2\) there is a Minimum at \(\mathbf{x = \frac13}\)