Find the function satisfying the two conditions:
1.
2. The maximum value of is 3.