Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-10-30 08:54:42

neonash7777
Member
Registered: 2008-10-29
Posts: 3

All Piecewise Defined Functions Unnecessary?

Suppose
y = x^3 + 3x^2  for x < 0
and
y = 4x^4 + 4x for x >= 0
~~~~
This can be written as a single equation

y = (x^2 + 3x)(|x|-x)/2 + (4x^3 + 4)(|x|+x)/2
~~~~~~
the piece times (|x|-x)/2x is 1 when x<0 and 0 when x>0
the piece times (|x|+x)/2x is 1 when x>0 and 0 when x<0

The only problem is when x = 0, because both pieces in the sample equation all of at least one x in there term, we just factored this out to avoid the issue. Let's say we don't have this option, can we still avoid the problem?

try
y=5x for x < 0
y = x^2 + 3x for x >= 0
~~~~~~~~
Is it then possible to avoid every possible piecewise defined function by turning it into a single equation. (Granted |x| is piecewise defined, but we ignore that as the only acceptable one)

Offline

#2 2008-10-30 18:47:06

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: All Piecewise Defined Functions Unnecessary?

|x| is piecewise defined
Here is the point, dude.
Deducting others to this one doesn't necessarily make the case simpler.


X'(y-Xβ)=0

Offline

#3 2008-10-30 23:20:48

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: All Piecewise Defined Functions Unnecessary?

True, but you can get around that by using something like √(x²) instead.
That doesn't make piecewise definitions unnecessary though.

As neonash says, there's usually a problem when x=0. I think that's probably fixable with a bit of thought, but there are still more complicated functions that wouldn't be covered.

eg. f(x) = {0, if x<1
               {1, if x=1
               {2, if x>1

Even if you manage to get that working, there are even more functions that still wouldn't work.
I don't think you could possibly define this function without going piecewise:

f(x) = {1, if x is rational
          {0, otherwise


Why did the vector cross the road?
It wanted to be normal.

Offline

#4 2008-10-30 23:57:04

All_Is_Number
Member
Registered: 2006-07-10
Posts: 258

Re: All Piecewise Defined Functions Unnecessary?

mathsyperson wrote:

True, but you can get around that by using something like :sqrt(x²) instead.

Doesn't x=√(x²) have two solutions?


You can shear a sheep many times but skin him only once.

Offline

#5 2008-10-31 00:22:51

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: All Piecewise Defined Functions Unnecessary?

In fact, heaviside function is more often used.

H(x-t)=1 when x>=t, =0 when x<t


X'(y-Xβ)=0

Offline

#6 2008-10-31 02:57:14

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: All Piecewise Defined Functions Unnecessary?

I think the √ sign is usually defined to only take the positive square root.
If you want both then you'd use ±√.


Why did the vector cross the road?
It wanted to be normal.

Offline

#7 2008-10-31 10:50:08

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: All Piecewise Defined Functions Unnecessary?

In fact, heaviside function is more often used.

Right George, the standard name that I normally hear is the "jump", "bump", or "step" function.  Given this single function, you can represent any finite piecewise function as a product of functions.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

Board footer

Powered by FluxBB