Let V(d) be the volume of water at day d, we know that in the first day (d=0), V(0)=30, and every day leaks 2 gallons, so the equationfor this model is
[tex]V(d)\text{ = 30-2d}[/tex]but this will stop when the tank reaches 10 gallons, that will happens at day
[tex]\begin{gathered} 10=30-2d \\ 2d=30-10 \\ 2d=20 \\ d=10 \end{gathered}[/tex]Then, the complete model is given by the piecewise function
[tex]V(d)=\mleft\{\begin{aligned}30-2d,\text{ 0}\leq d\leq10 \\ 10,\text{ d>10.}\end{aligned}\mright.[/tex]