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 to find a function $f(x)$ such that the following data points would fit on it: $$f(1) = 0 \\ f(2) = 0.5 \\ f(4) = 1.0 \\ f(8) = 1.5 \\ \cdots $$ and so on. So the pattern is every time $x$ doubles $f(x)$ increases by $0.5$.

What is the equation for $f(x)$?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

A function where multiplying the argument by a fixed factor results in adding a fixed constant to the output is (more or less by definition) a logarithmic function, not a quadratic function. Specifically, it must be a function of the form $f(x) = c \log x + d$ for some real numbers $c$ and $d$, which you can determine by plugging in a couple of given values.

share|improve this answer
    
You are the man. The answer is f(x) = log(x)/2 –  user1068636 Oct 20 '12 at 19:51
    
@user1068636 : $\log_4 x$ is consistent with what you wrote. It's $(\log x)/2$ provided "$\log$" means the base-$2$ logarithm. –  Michael Hardy Oct 20 '12 at 21:44

If you plot $f(x)$ (W|A), the graph should give you a clue that this is a logarithmic function. Also, you can consider the fact that what you have is a recurrence relation: $f(x) = f(x/2) + 0.5$, which you solve using a technique such as Master theorem. Or for example using W|Alpha.

share|improve this answer

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.