Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Equations of a Straight Line with multiple points
Replies: 2   Last Post: Dec 7, 2012 7:37 AM

 Messages: [ Previous | Next ]
 Torsten Hennig Posts: 2,419 Registered: 12/6/04
Re: Equations of a Straight Line with multiple points
Posted: Dec 7, 2012 7:37 AM

> I'd like to create a formula that create multiple
> straight lines. It all has to be in one single
> formula. For example:
>
> p1(0,0)
> p2(1,4)
> p3(2,9)
> p4(5,9)
>
> The slope should always be 0 and at any given point
>
> Is this possible at all? If not, would it be possible
> if I just do a linear interpolation. If so, how can I
> get the correct formula?
>
> thanks

I see now: the slope should always be 0 - so no linear, but a constant approximation is what you are looking for.
Then
L(x)= 0*(x>=0)*(x<1) + 4*(x>=1)*(x<2) + 9*(x>=2)*(x<=5)

Best wishes
Torsten.

Date Subject Author
12/6/12 dickreuter
12/7/12 Torsten Hennig
12/7/12 Torsten Hennig