#### Question

Find the maximum and minimum values of the function f(x) = \[\frac{4}{x + 2} + x .\]

#### Solution

\[\text { Given }: f\left( x \right) = \frac{4}{x + 2} + x\]

\[ \Rightarrow f'\left( x \right) = - \frac{4}{\left( x + 2 \right)^2} + 1\]

\[\text { For a local maxima or a local minima, we must have }\]

\[ f'\left( x \right) = 0\]

\[ \Rightarrow - \frac{4}{\left( x + 2 \right)^2} + 1 = 0\]

\[ \Rightarrow - \frac{4}{\left( x + 2 \right)^2} = - 1\]

\[ \Rightarrow \left( x + 2 \right)^2 = 4\]

\[ \Rightarrow x + 2 = \pm 2\]

\[ \Rightarrow x = 0 \text { and } - 4\]

\[\text { Thus, x = 0 and x = - 4 are the possible points of local maxima or local minima } . \]

\[\text { Now, } \]

\[f''\left( x \right) = \frac{8}{\left( x + 2 \right)^3}\]

\[\text { At x } = 0: \]

\[ f''\left( 0 \right) = \frac{8}{\left( 2 \right)^3} = 1 > 0\]

\[\text { So, x = 0 is a point of local minimum } . \]

\[\text { The local minimum value is given by }\]

\[f\left( 0 \right) = \frac{4}{0 + 2} + 0 = 2\]

\[\text { At x } = - 4: \]

\[ f''\left( - 4 \right) = \frac{8}{\left( - 4 \right)^3} = \frac{- 1}{8} < 0\]

\[\text { So, x = - 4 is a point of local minimum } . \]

\[\text { The local maximum value is given by }\]

\[f\left( - 4 \right) = \frac{4}{- 4 + 2} - 4 = - 6\]