정답 : \( \displaystyle{y=\begin{cases}\displaystyle{\frac{1}{2}(x+2)^2}&(-2<x<0) \\[5pt]\displaystyle{-\frac{1}{2} (x-2)^2+4}&(0\le x<2)\end{cases}} \)
점 \( \rm P \) 를 지나 \( \overline{\rm AB}\) 또는 \( \overline{\rm AC}\)와 만나는 점을 \( \rm Q \) 라고 할 때, 함수의 그래프와 도형을 그려보면 다음과 같다.
\( -2<x<0\) 일 때와 \( 0\le x<2\) 일 때의 도형의 모양이 다르므로 [CASE] 분류를 하자.
[CASE 1] \( -2<x<0\)
이 경우에서 \( y\) 는 \( \triangle \rm{BPQ}\) 의 넓이를 뜻한다.
\( \triangle \rm{BPQ}=\displaystyle{\frac{1}{2}\times \overline{\rm {BP}}\times \overline{\rm{PQ}} } \)에서
\( \color{red} \overline{\rm{BP}}\color{black} =x-(-2)=\color{red} x+2\) 이고,
직선 \( \overline{\rm{BA}}\) 의 함수식은 \(y=x+2\) 이므로 \( \color{blue} \overline{\rm{PQ}}=x+2\) 이다.
\( \begin{align} \therefore \triangle \rm{BPQ}&=\displaystyle{\frac{1}{2}\times \color{red} \overline{\rm {BP}}\color{black} \times \color{blue} \overline{\rm{PQ}} \color{black}}\\[5pt]&=\displaystyle{\frac{1}{2}\times\color{red} (x+2)\color{black} \times\color{blue} (x+2) }\\[5pt]\color{black}&=\displaystyle{\frac{1}{2}(x+2)^2 } \end{align} \)
[CASE 2] \( 0\le x<2\)
이 경우에서 \( y \) 는 \( \square \rm {ABPQ} \) 의 넓이를 뜻한다.
\( \square \rm {ABPQ}=\triangle \rm{ABC}-\triangle \rm{QPC} \) 이다.
먼저, \( \textcolor{red} {\triangle \rm{ABC}}=\displaystyle{\frac{1}{2}\times4\times2 }\textcolor{red}{=4} \) 이고,
\( \overline{\rm{AC}}\) 의 함수식은 \( y=-x+2\) 이므로 \( \overline{\rm{PQ}}=-x+2\) 이다.
\(\begin{align} \therefore \textcolor{blue} { \triangle \mathrm{QPC}}&=\displaystyle{ \frac{1}{2}\times(2-x)\times(-x+2) }\\[5pt]&\textcolor{blue} {=\displaystyle{\frac{1}{2}(x-2)^2 }} \end{align} \)
\( \begin{align} \therefore y&=\square \mathrm{ABPQ}\\[5pt]&= \textcolor{red} {\triangle \mathrm{ABC}}-\textcolor{blue} {\triangle \mathrm{QPC}} \\[5pt]&= \textcolor{red} { 4}-\textcolor{blue} {\displaystyle{\frac{1}{2}(x-2)^2 }} \end{align} \)
따라서 [CASE 1], [CASE 2]에 의해
\( \displaystyle{y=\begin{cases}\displaystyle{\frac{1}{2}(x+2)^2}&(-2<x<0) \\[5pt]\displaystyle{-\frac{1}{2} (x-2)^2+4}&(0\le x<2)\end{cases}} \)
이다.
[참고] \( y=f(x)\) 의 그래프는 다음과 같다.