# Finding the linear equations of a piecewise defined function

Given the following graph:

I know the trick of finding the linear equation of the function between $A$ to $B$ is the intersection with $Y$ is the constant and the slope is $-\frac{10}{30}$ which means that the linear equation is $y = -\frac{1}{3}x + 100$.

I know that this method can be expanded to finding the linear equation of the function between $B$ and $C$. I can tell that the slope equals to $-\frac{60}{60} = -1$ but how do I find the constant?

-
please see answer – dato datuashvili Dec 7 '13 at 14:44
By "splitted", I think you mean "piecewise defined". – JohnD Dec 7 '13 at 14:54
@JohnD and you're correct. As I don't study Math in English I find it hard to translate most of the professional terms. – Georgey Dec 7 '13 at 15:01

let us take example from $B$ to $C$ ,first of all we have $y=k*x+b$ where $k$ is slope, in your case $k=(30-90)/(90-30)=-1$ so we have $y=-x+b$ now at point $x=30$,$y=90$, so we have

$90=-30+b$

from there $b=120$

so we have

$y=-x+120$

-
You've explained it exactly as it was taught in class when we've learned it. Thanks. – Georgey Dec 7 '13 at 15:03
წარმატებები(good luck in georgian) – dato datuashvili Dec 7 '13 at 15:04

You could plug in a point in the equation to solve for the constant or alternatively, you could use the point-slope form: $$y-y_0=m(x-x_0)$$ where $m$ is the slope and $(y_0,x_0)$ is a point on the line.

-