[Math] How to transform a straight line into a curve. Linear to convex/concave function.

functionsgraphing-functions

Let's suppose I have a basic linear function

$$f(x)=mx+b$$

I want to factor in a parameter into this function that transforms it into a curve (both concave and convex).

Best Answer

This is how you transform a line into a curve on a graph:

Let $f(x)=$ some linear expression obtained by plotting the data pairs $(x_1,y_1), (x_2,y_2)$ on a horizontal $x$-axis and vertical $y$-axis.

Let the parameter $m=$ the contour of the curve.

$m=(0,\infty)$

$g(x)= \begin{cases} f(x), & \text{if $m=1$} \\ (y_2-y_1)\frac{m^{x-x_1}-1}{m^{x_2-x_1}-1}+y_1, & \text{if $m\neq1$} \end{cases}$

when $m=1$, curve is linear

when $0<m<1$, curve is convex

when $m>1$, curve is concave