Re: "Slashing" half a function



In article <1183328185.905768.93860@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<eurythmech@xxxxxxxxx> wrote:
Not quite able to refresh my memory here.

I am currently trying to do the following:

Construct a function that looks like y=x^2 but with two exceptions:

* It has got it's minpoint in (10,0) rather than (0,0)

The graph of y=f(x+c) (c a positive constant) is the same as the graph
of y=f(x), but shifted horizontally by c units to the left; the graph
of y=f(x-c) (c a positive constant) is the same as the graph of
y=f(x), shifted horizontally by c units to the right. So y=(x-10)^2
will be "just like" y=x^2, but shifted 10 units to the right, thus
placing the vertex at x=10.



This is something I can accomplish by constructing a function f(x) so
that f''(10) = 0
Well f'(x) in the above case is 2x, and thus f'(10) = 20, so I need to
subtract 20.
Solution: construct the function y=x^2-20x which gives y'=2x-20 and
thus creating a minpoint at x = 10.
Unfortunately, this point is not on the x axis, as 10^2-20*10 = -100,
so let's add 100 to the previous function.

Great, y=x^2-20x+100 seems to fulfill my first requirement. And this
is as far as I got.

Amazingly enough: (x-10)^2 = x^2 - 20x + 100. Cool, huh?

* I want everything to the left of the minpoint, ie x < 10, to
generate an y of 0.
Is there a simple way to do this, or is there some sort of standard
"hack" solution?


One way is to use a "piecewise defined function". You write
/ (x-10)^2 if x>= 10;
y = {
\ 0 if x<10.


--
======================================================================
"It's not denial. I'm just very selective about
what I accept as reality."
--- Calvin ("Calvin and Hobbes" by Bill Watterson)
======================================================================

Arturo Magidin
magidin-at-member-ams-org

.


Quantcast