How to reverse extrapolate values $Q$ and $C$ from arithmetic function?

29 Views Asked by At

I'm attempting to create a function that causes $Q$ to increase by $1$ whenever $C$ increases by $Q$. The progression of $C$ can be mapped by using $(n/2)*(2Q+(n-1)d)$, where $d = 1$ and $n= Q-9$. What I need from this expression is not the progression of $C$ but a)the value of $Q$, and b) the difference between $C$ and what $C$ needs to be to increment $Q$ by $1$. The Value of $C$ is provided. Thank you.

1

There are 1 best solutions below

3
On

I'm not sure exactly what you're asking, but if the expression were $$C_n=\frac12d\left(2Q_n+(\color{red}{-}n-1)d\right)$$ I could solve it! Suppose $C_n$ increses by $Q_n$ to become $C_{n+1}$: $$C_{n+1}=C_n+Q_n\tag{1}$$ Then $Q_n$ increases by $1$: $$Q_{n+1}=Q_n+1\tag{2}$$ The same thing happens at the next time step so $$C_{n+2}=C_{n+1}+Q_{n+1}\tag{3}$$ Subtracting eq. $(1)$ from eq. $(3)$ and substituting in eq. $(2)$ we get $$C_{n+2}-C_{n+1}=C_{n+1}-C_n+Q_{n+1}-Q_n=C_{n+1}-C_n+1$$ Or $$C_{n+2}-2C_{n+1}+C_n=\Delta^2C_n=1$$ We know how to solve this sort of difference equation: $$C_n=k_0+k_1n+\frac12n(n+1)\tag{4}$$ Just plug the solution in and check that it works! Then from eq. $(2)$ $$\begin{align}C_{n+1}-C_n&=k_0+k_1(n+1)+\frac12(n+1)(n+2)-k_0-k_1n-\frac12n(n+1)\\ &=k_1+n+1=Q_n\end{align}$$ Now you can see why I wanted that minus sign in there: otherwise for big $n$, $C_n$ would increase like $\frac32n^2$ instead of the $\frac12n^2$ as must be the case as shown in eq. $(4)$. Since we are given $$n=Q_n-9=k_1+n+1-9=n+k_1-8$$ We can conclude that $k_1=8$ so $Q_n=n+9$ and $$\begin{align}C_n&=\frac12n(n+1+2k_1)+k_0=\frac12n(n+1+16)+k_0\\ &=\frac12n\left((2Q_n-9)-n+17\right)+k_0=\frac12n(2Q_n-n-1)+k_0\\ &=\frac12n\left(2Q_n+(-n-1)(1)\right)+(0)\end{align}$$ So that fits your pattern with my minus sign, $d=1$ and $k_0=0$.

Now that we have solved the problem, let's go back and answer the question. The value of $Q_n$ is $Q_n=n+9$, really given in the question. Also $C_{n+1}-C_n=Q_n=n+9$, also pretty much given in the question. So I think your question ended up being simple. The more challenging question would have been to get the expression for $C_n$ from the other information.