Message Boards Message Boards

0
|
8078 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

how is the domain of piecewise function computed?

Posted 10 years ago

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}}]

http://www.wolframalpha.com/input/?i=domain+of+h%28t%29%3DPiecewise%28%28%288-3t%2C1%3C%3Dt%3C%3D3%29%2C%28t-4%2C3%3Ct%3C8%29%29%29

POSTED BY: Bill Morgan

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.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract