Wikipedia:Reference desk/Archives/Mathematics/2016 January 18

= January 18 =

Increase and decrease
There is an initial number a and every step increases or decreases by $$a_n b$$, and there is n steps.

An example for three steps, where $$a_n$$ is the number at step n

$$a_1=a \pm a b$$

$$a_2=a_1 \pm a_1 b$$

$$a_3=a_2 \pm a_2 b$$

I figured out the formula for any $$a_n$$.

(1) $$a (\pm b+1)^n$$

But it works only with b>0 for an increase of a>0 and a decrease of a<0, and -1>b 0 down to 0 (which is impossible to reach, in $$a (-b+1)^n=0$$ the number n must be infinite).

But for a negative (reaching 0 and then going further from 0) decrease of a>0 with b>|1|, it must be thus

(2) $$- a (b-1) (b+1)^{n-1}$$

where b must be positive, not negative as in (1).

A small alteration of (1) also will work (3) $$-a (b+1)^{n-1}$$

An example for a=1 decreasing by 200% (b=2) every step:

$$a_1=1-1\times2=-1$$

$$a_2=-1-1\times2=-3$$

$$a_3=-3-3\times2=-9$$

With formula (1) it won't work:

$$1\times(-2+1)^3=-1$$

but formulas (2) and (3) work fine:

$$-1\times(2-1)\times(2+1)^2=-9$$

$$-1\times(2+1)^2=-9$$

Is there an explanation for this?

P.S. By the way, what branch of mathematics am I doing?--Lüboslóv Yęzýkin (talk) 21:45, 18 January 2016 (UTC)

P.S. Sorry, if my reasoning sounds amateurish, I'm not a mathematician at all and I might have used wrong terminology and understood it all wrong, but this case really intrigues me. Did I hack maths? :) --Lüboslóv Yęzýkin (talk) 01:30, 19 January 2016 (UTC)
 * Recurrence relation or difference equation. Loraof (talk) 23:45, 18 January 2016 (UTC)
 * I think your calculation for a2 is wrong. It should be $$a_2=a_1-a_1(b)= -1 - (-1)(2) = 1. $$ So formula (1) gives the right answer. Loraof (talk) 00:01, 19 January 2016 (UTC)
 * Yes, theoretically, I tried that and came to the same. But if we imagine the number line, we start from 1, then go to the left by the double of that 1*2 and end at -1. Then we go to the left by the double of what we got that is |1|*2 and we end at -3. Then we go to the left again by that pattern and end at -9, -27, -81, -243... Probably, it is not decreasing in a strict sense but what is then, a "negative stepping back"? With (1) it will always end either at -1 for an odd step or at 1 for an even step. Note also that for the opposite case, with a negative start (e.g. a=-1) and b<-1 (e.g. b=-2) formula (1) will always end at 1.
 * Imagine a problem (I'd call it "A Mafia Loan Problem"). A person borrowed $1, the debt grows by the above-mentioned pattern every month. In the 1st month his ballance is -1, he owes $2. In the 2nd the balance is -3 and he owes $4. In the 3rd the balance is -9 and he owes $10. And so on. What would the balance be in 12 months? With (3) it is easy, $$-1\times (2+1)^{11} =-177147$$. --Lüboslóv Yęzýkin (talk) 01:39, 19 January 2016 (UTC)
 * So if I'm understanding this right, you want the value to always decrease, whether a is positive or negative (so for a=1, b=2, you get: a0=1, a1= 1 - 2*1= -1, a2= -1 - |2*-1| = -3, etc.). This means your formula is actually $$a_n=a_{n-1} + |a_{n-1}| b$$ where |x| is the absolute value of x (i.e. |-a| = a).  I think, given the absolute value expression in here, you're not going to be able to get a simple expression for the result, but perhaps someone who knows more maths than I do can come along and provide it. MChesterMC (talk) 11:09, 19 January 2016 (UTC)

Thanks, you seem to be right. Now it is more straightforward: with b>0 it is always goes to the right on the number line, with b<0 goes to the left. We can also avoid the absolute value and write $$a_n = a_{n-1} + b \sqrt {a_{n-1}^2}$$.

But I have no idea how to generalize a formula for any $$a_n$$. E.g.:

$$a_0 = a$$

$$a_1 = a + b \sqrt{a^2}$$

$$a_2 = a_1 + b \sqrt{a_1^2} = (a + b \sqrt{a^2}) + b \sqrt{(a + b \sqrt{a^2})^2}$$

$$a_3 = a_2 + b \sqrt{a_2^2} = ((a + b \sqrt{a^2}) + b \sqrt{(a + b \sqrt{a^2})^2}) + b \sqrt{((a + b \sqrt{a^2}) + b \sqrt{(a + b \sqrt{a^2})^2})^2}$$

And so on, more steps the longer and more esoteric the formula becomes. Wolfram Alpha suggests the simplifications: $$a_1=a (b+1)$$, $$a_2=a (b+1)^2$$, $$a_3=a (b+1)^3$$, but only if a and b are positive, that is the same formula (1) I've suggested at the beginning. But how to find a single formula that will work with any rational number? We returned to the starting question. I suggest we have two different sequences (I have no idea how they are named): one tends to or from zero, the other goes in any direction on the number line, and I've tried to figure out a single formula for the both, but maybe it is impossible?--Lüboslóv Yęzýkin (talk) 09:50, 23 January 2016 (UTC)