1. \(f\left(x\right)=e^x\left(x^2-x-1\right)\) trên đoạn \(\left[0;3\right]\)
Ta có :
\(f'\left(x\right)=e^x\left(x^2-x-1\right)+e^x\left(2x-1\right)=e^x\left(x^2+x-2\right)=0\)
\(\Leftrightarrow\left[\begin{array}{nghiempt}x=-2\notin\left[0;3\right]\\x=1\in\left[0;3\right]\end{array}\right.\)
Mà : \(\begin{cases}f\left(0\right)=-1\\f\left(1\right)=-e\\f\left(3\right)=6e^3\end{cases}\) \(\Leftrightarrow\begin{cases}Max_{x\in\left[0;3\right]}f\left(x\right)=6e^3;x=3\\Min_{x\in\left[0;3\right]}f\left(x\right)=-e;x=1\end{cases}\)
2. \(f\left(x\right)=x-e^{2x}\) trên đoạn \(\left[-1;0\right]\)
Ta có :
\(f'\left(x\right)=1-2e^{2x}=0\Leftrightarrow e^{2x}=\frac{1}{2}\Leftrightarrow e^{2x}=e^{\ln\frac{1}{2}}\)
\(\Leftrightarrow2x=\ln\frac{1}{2}=-\ln2\Leftrightarrow x=\frac{-\ln2}{2}\in\left[-1;0\right]\)
Mà :
\(\begin{cases}f\left(-1\right)=-1-\frac{1}{e^2}=-\frac{e^2+1}{e^2}\\f\left(-\frac{\ln2}{2}\right)=\frac{-\ln2}{2}-e^{-\ln2}=\frac{-\ln2}{2}-\frac{1}{2}=-\frac{1+\ln2}{2}\\f\left(0\right)=-1\end{cases}\)
\(\Leftrightarrow\begin{cases}Max_{x\in\left[-1;0\right]}f\left(x\right)=-\frac{1+\ln2}{2};x=-\frac{\ln2}{2}\\Min_{x\in\left[-1;0\right]}f\left(x\right)=-\frac{e^2+1}{e^2};x=-1\end{cases}\)