From: kj on



I've seen the function I'm looking for described before, but I
can't remember where, nor the details of the definition. This
function, f:R->R, is such that f(0) = 0, f(2) = 1, and the function
g defined as

g(x) = x if x < 0
g(x) = f(x) if 0 <= x <= 2
g(x) = 1 if x > 2

is smooth everywhere. Of course, the problem boils down to achieving
smoothness at the "splice" points (0, 0) and (2, 1).

Does anyone remember a function f with these properties?

Thx!

~K
From: Robert Israel on
kj <no.email(a)please.post> writes:


> I've seen the function I'm looking for described before, but I
> can't remember where, nor the details of the definition. This
> function, f:R->R, is such that f(0) = 0, f(2) = 1, and the function
> g defined as
>
> g(x) = x if x < 0
> g(x) = f(x) if 0 <= x <= 2
> g(x) = 1 if x > 2
>
> is smooth everywhere. Of course, the problem boils down to achieving
> smoothness at the "splice" points (0, 0) and (2, 1).
>
> Does anyone remember a function f with these properties?

Try

f(x) = (exp(-1/x) + x exp(-1/(2-x)))/(exp(-1/x) + exp(-1/(2-x)))
for 0 < x < 2
--
Robert Israel israel(a)math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
From: Ray Koopman on
On May 14, 2:19 pm, Robert Israel
<isr...(a)math.MyUniversitysInitials.ca> wrote:
> kj <no.em...(a)please.post> writes:
>> I've seen the function I'm looking for described before, but I
>> can't remember where, nor the details of the definition. This
>> function, f:R->R, is such that f(0) = 0, f(2) = 1, and the
>> function g defined as
>>
>> g(x) = x if x < 0
>> g(x) = f(x) if 0 <= x <= 2
>> g(x) = 1 if x > 2
>>
>> is smooth everywhere. Of course, the problem boils down to
>> achieving smoothness at the "splice" points (0, 0) and (2, 1).
>>
>> Does anyone remember a function f with these properties?
>
> Try
>
> f(x) = (exp(-1/x) + x exp(-1/(2-x)))/(exp(-1/x) + exp(-1/(2-x)))
> for 0 < x < 2

f(x) = (exp(-1/x) - x exp(-1/(2-x)))/(exp(-1/x) - exp(-1/(2-x)))

also works.
From: Ray Koopman on
On May 14, 4:57 pm, Ray Koopman <koop...(a)sfu.ca> wrote:
> f(x) = (exp(-1/x) - x exp(-1/(2-x)))/(exp(-1/x) - exp(-1/(2-x)))
>
> also works.

f(x) = 1 - exp(2x/(x-2)) is simpler, and the plot is nicer.
From: kj on


Thank you both!

~K