How can I choose or calculate the function $f(t)$ in $(a*t+b)/(c*f(t)+d)$ to best approximate a given linear function in the t=[0,1] interval?

42 Views Asked by At

I have an expression with an unknown function $p(t)$

$$g(t)=(921600*(-1333.33340000000*t + 2000)/(-3.36000004800000e6*p(t) + 3840000)$$

I would like to calculate somehow the $p(t)$ function that the $g(t)$ function approximates best the following linear function in the $t=[0,1]$ interval:

$$f(t)=(1280-500)*t+500$$

For example if I choose $p(t)=sqrt(t)$, the blue curve, or $p(t)=pow(t,0.4594)$ for the black curve:

enter image description here

But how can I work out a better fitting function of $p(t)$ or perhaps finding the best one?

I think I should calculate some kind of series expansion to a certain order, and to measure somehow the area between the linear line and the calculated curve, to measure the goodness of the chosen function.

For my purposes it also would be useful when exchanging $t$ and $p(t)$ in the expression of $g(t)$, like:

$$g(t)=(921600*(-1333.33340000000*p(t) + 2000)/(-3.36000004800000e6*t + 3840000)$$

To find another $p(t)$ in the expression of $g(t)$ to approximate $f(t)$ again. Maybe in this form the problem would be easier.

Maybe even an exact solution could be found by integrating a differential equation:

$$g'(t)=f'(t)=1280-500$$

How can I work out all of these? I have only Sage Math as a symbolic computer algebra system.