How do I plot a linear, exponential and logarithmic function with same starting points?

121 Views Asked by At

It should be very basic, but i can't come up with three functions that produce a plot like in the attached picture. I just need some simple format, to illustrate that it is unknown whether some phenomenon behave linear, exponential or logarithmic. enter image description here

I have linear obviously: -x

3

There are 3 best solutions below

0
On

You need to take exp(-x+a), as well as log(-x+b) for some suitable constants a,b such that the exponential and logarithmic curve intersect each other twice in the first quadrant as given in your picture. Then just define the line to interpolate between the two points of intersection.

0
On

If you have two points $(x_0,y_0)$ and $(x_1,y_1)$ on the line and the equations for the quadratic and the logarithmic are $$q(x)=ax^2+bx+c\\ L(x)=\log(\alpha x+\beta)$$ For the quadratic you get two equations $$y_0=ax_{0}^2+bx_0+c\\ y_1=ax_{1}^2+bx_1+c$$ and three variables. Then, one of the parameters can be chosen freely (for example, you can impose $a=1$).

For the logarithmic you have $$e^{y_0}=\alpha x_0+\beta\\ e^{y_1}=\alpha x_1+\beta$$ Note that I have inverted the logarithm. You obtain again a linear system of 2 equations with 2 variables, which can be solved. I hope it will be useful for you!

0
On

For the exponential, mark the point $(0,1)$. Move some distance along X and double the ordinate, leading to $(X,2)$. Repeat to $(2X,4)$. And to the left, $(-X,\frac12)$ and $(-2X,\frac14)$. This is enough to draw a precise exponential curve.

For the logarithm, notice that $y=2^x\iff x=\log_2(y)$, so that is suffices to repeat the construction with $x$ and $y$ exchanged.

You can mirror the exponential around the axis $y$ and/or translate/stretch it horizontally. You can mirror the logarithm around the axis $y$ and/or translate/stretch it vertically.

enter image description here