Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I need an exponential function that will take linear input from 0,0 to 1,1 and give me back an exponential shaped curve such that changes in X near the 0 point result in small increases in Y, but each step increases as X gets closer to 1.

Similar to the solid line in this graph:

GammaFunctionGraph

But I'd like to be able to control the curvature with a single value similar to how the gamma correction slider works, but making sure 0,0 and 1,1 are always on the curve.

Thanks!

share|improve this question
    
But $(0,0)$ and $(1,1)$ already are always on the gamma correction curve $y=x^\gamma$. You want the function to involve $e^x$ instead of $x^\gamma$, is that it? –  Rahul Feb 8 '13 at 4:59
    
@ℝⁿ Correct, sorry if that wasn't clear. –  user61442 Feb 8 '13 at 5:04

1 Answer 1

up vote 2 down vote accepted

A few options: $$\begin{align} y&=x^\gamma&\text{for}&\gamma\in[1,\infty),\\ y&=\frac{e^{kx}-1}{e^k-1}&\text{for}&k\in(0,\infty),\\ y&=\frac x{1+a(1-x)}&\text{for}&a\in[0,\infty). \end{align}$$ I guess you want the one in the middle.

We start with the usual function for exponential growth, $f(x)=e^{kx}$. We'll take $y$ to be to be an affine transformation of it, $y(x)=af(x)+b$, which is the simplest transformation that can fit two specified points. Imposing $y(0)=0$ and $y(1)=1$ gives us two equations which we can use to solve for $a$ and $b$, yielding (after some simplification) the above result.

(This is the general approach. The quick-and-dirty shortcut I actually took was to start with $e^{kx}$, subtract the value at $0$, divide by the value at $1$, and then plot it to make sure I didn't screw anything up.)

share|improve this answer
    
Perfect, thank you! If you don't mind, could you go into a little more detail on how you got there? –  user61442 Feb 8 '13 at 6:08
    
I think the third example should have numerator $(1+a)x$, since as it stands, when $x=1$, the value is not 1. –  Daryl Feb 8 '13 at 6:14
    
@Daryl: I think you are mistaken. $\left.\dfrac x{1+a(1-x)}\right|_{x=1}=\dfrac1{1+a(1-1)}=\dfrac1{1+0}=1$. –  Rahul Feb 8 '13 at 6:17
    
@user61442: See my edit. –  Rahul Feb 8 '13 at 6:22
    
You are right. My brain didn't work properly after a long day... My apologies. –  Daryl Feb 8 '13 at 7:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.