Substituting (2,6) gives a=3.
That is, y=3x (0≤x≤2)
Let x > 2, and the functional relationship between y and x is y = kx+b.
Substitution points (2,6) and (10,3)
Get k=-3/8 b=27/4.
Y =-3x/8+27/4 (2 < x≤ 18) Because the drug content cannot be negative, x≤ 18.
2.
3x≥4,-3x/8+27/4≥4
The solution is 4/3≤x≤22/3.
The valid time is (22/3-4/3)=6 hours. Eat 24/6=4 times a day.