In trying to manipulate a function arrived at in a prior post, I've arrived at this (as a goal):

$$\begin{array}{c|c} x & y \\ \hline 0.3^{-1} & -1 \\ 0.3^{-1}+0.3^{0} & 0 \\ 0.3^{-1}+0.3^{0}+0.3^{1}& 1 \\ 0.3^{-1}+0.3^{0}+0.3^{1}+0.3^{2} & 2 \\ 0.3^{-1}+0.3^{0}+0.3^{1}+0.3^{2}+0.3^{3} & 3 \\ \end{array}$$

But, I'm having issues creating the right function. I'd be very thankful if someone could give me a hand with it!

  • $\begingroup$ @zwim Could you expand the hint ever so slightly? Thank you! $\endgroup$ Oct 2, 2019 at 19:08
  • $\begingroup$ math.stackexchange.com/questions/3378076/… Sorry, I did not understand your question until I saw your other post. So you want to find $y$ given the sum $x$. Is that right ? $\endgroup$
    – zwim
    Oct 2, 2019 at 19:38
  • $\begingroup$ Yes, @zwim, thank you! $\endgroup$ Oct 2, 2019 at 20:28

2 Answers 2


In your other post you were given the formula (where $a=0.3$)


So isolating $y$ we get $\quad a^{y+2}=1-x(1-a)a\iff y+2=\log_a(1-xa+xa^2)$

The formula you seek is thus $$y=\dfrac{\ln(1-xa+xa^2)}{\ln(a)}-2$$

  • $\begingroup$ Sorry for my comment; I made an error when solving for x. Your work is perfect and awesome! $\endgroup$ Oct 2, 2019 at 22:46

I think this fulfills what you are asking for. $$\DeclareMathOperator*{\argmax}{arg\,max}$$ \begin{equation}y={\argmax_{\sum_{i=-1}^{a}{0.3^i}\le x }}a \end{equation}

Achieving a smooth function may not be is possible (look at zwim's answer).

  • $\begingroup$ This fulfills the vague question without mindreading. zwim's answer probably fulfills the asker's intent, and is not a step function. $\endgroup$
    – Legorhin
    Oct 2, 2019 at 20:09
  • $\begingroup$ Not what I intended, but still a really clever thought! $\endgroup$ Oct 2, 2019 at 20:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .