how is the domain of piecewise function computed?

This piecewise function is not defined on the intervals (-oo,1) and [8,oo], but wolfram alpha is saying it has a domain of all Reals.

Why is this?

The plot even shows h(1/2) = 0. The function doesn’t specify what happens at t=1/2, so how do they get that h(1/2)=0?

h[t] == Piecewise[{{8 - 3 t, 1 <= t <= 3}, {t - 4, 3 < t < 8}}]

In the Wolfram Language, Piecewise expressions default to 0 wherever your arguments to the function don’t define them. This makes them defined for all real numbers which is mostly convienent for programming.

Piecewise[{{8 - 3*t, 1 <= t <= 3}, {t - 4, 3 < t < 8}}]

really evaluates to

Piecewise[{{8 - 3*t, 1 <= t <= 3}, {-4 + t, 3 < t < 8}}, 0]

So FunctionDomain returns True for all values of t.

Wolfram|Alpha probably shouldn’t be directly using this definition for the reason you mention. But you’ve also used the syntax of the Wolfram Language function which is defined to have this behavior… so I’m not sure what to do in this case. I’ve forwarded a note to the Wolfram|Alpha team by filling out the feedback form at the bottom of the Wolfram|Alpha results page.