# How to find function expression from the graph?

I have two variables $a$ and $b$. I have series of values for $a$ and series of values for $b$.

Then I apply a simple formula on $a$ and $b$

point $j=\frac{a-b}{a}$ when $a>b$ or $\frac{b-a}{b}$ when $b>a$.

Lets say when $a[10]=32$ and $b[10]=34$. then $j[10]=\frac{34-32}{34}=0.058$

Accumulating all these points j, I get the attached graph.Graph

Now my question-if I have to express the graph in terms of a function notation what should it be?

$f(a,b)=\frac{a-b}{a}$ when $a>b$
$f(a,b)=\frac{b-a}{b}$ when $b>a$

Is this correct?

Yes, that is correct notation. You could also use: \begin{align*} f(a,b) = \left\{ \begin{matrix} \frac{a-b}{a} & \text{if } a>b \\ \frac{b-a}{b} & \text{if } b<a \end{matrix} \right. \end{align*} Note, however, that you haven't covered the cases $a=b$, $0=a>b$, or $0=b>a$.
• Do you mean take the partial derivative of $f$ with respect to $a$ or $b$? Commented Aug 9, 2018 at 17:59
• So, you have functions $a(t)$,$b(t)$, and $f(a,b)$, and you want to find the slope of the function $j(t) = f(a(t),b(t))$? Commented Aug 10, 2018 at 2:39