\(3x-x^2+1=-x^2+3x-\left(\dfrac{3}{2}\right)^2+\left(\dfrac{3}{2}\right)^2+1\)
\(=-\left(x^2-2.x.\dfrac{3}{2}+\left(\dfrac{3}{2}\right)^2-\left(\dfrac{3}{2}\right)^2-1\right)\)
\(=-\left(x-\dfrac{3}{2}\right)^2+\dfrac{5}{4}\)
=> Gia tri lon nhat: \(\dfrac{5}{4}\)
=>\(-\left(x-\dfrac{3}{2}\right)^2+\dfrac{5}{4}=0\)
=>\(x-\dfrac{3}{2}=0=>x=\dfrac{3}{2}\)
\(f_{\left(x\right)}=3x-x^2+1\\ \\ f_{\left(x\right)}=3x-x^2-\dfrac{9}{4}+\dfrac{13}{4}\\ f_{\left(x\right)}=-\left(x^2-3x+\dfrac{9}{4}\right)+\dfrac{13}{4}\\ f_{\left(x\right)}=-\left(x-\dfrac{3}{2}\right)^2+\dfrac{13}{4}\\ Do\left(x-\dfrac{3}{2}\right)^2\ge0\forall x\\ \Rightarrow-\left(x-\dfrac{3}{2}\right)^2\le0\forall x\\ f_{\left(x\right)}=-\left(x-\dfrac{3}{2}\right)^2+\dfrac{13}{4}\le\dfrac{13}{4}\forall x\\ \text{Dấu “=” xảy ra khi : }\\ \left(x-\dfrac{3}{2}\right)^2=0\\ \Leftrightarrow x-\dfrac{3}{2}=0\\ \Leftrightarrow x=\dfrac{3}{2}\)
Vậy \(GTLN\) \(f_{\left(x\right)}=\dfrac{13}{4}\) khi \(x=\dfrac{3}{2}\)