0
$\begingroup$

Consider the following equation: $$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) = 130.1615.$$

I want to take the above and add 3% non-compounded, meaning I want to take 3% of 100 and add it to the value, but I don't want to do:

$$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) + (100 * 0.03).$$

Is there a way I can add 3 percent without using 100. I thought I could do:

$$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) * 1.03,$$ but this doesn't work, and $$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) * 0.03$$ doesn't work either

Here is basically what I have to do, I have to reverse out the percentages and flat amounts to get back to the original value. I do not know the original value. I am only given the final value and in what order the percentages and flat amounts were applied. My other posts were mainly just dealing with compound amounts only or non-compound amounts. I actually did ask about mixing compound, non-compound, and flat, but never got a straight answer. I have already written a program to reverse the final amount using the adjustments and when I do the following it works fine:

(((100 + 5 - 2) * 1.15 + 6) * (1.07))

As soon as I want to add 3% non-compounded to this, the reason I don't want to use 100 is because I actually won't know this. This is just test data I am setting up, so I am trying to figure out how to do it without using 100 * (0.03).

Essentially, I am given 133.1615 and the adjustments and I have to reverse them out, now if they are all compound, non-compound, or flat, I am fine, but if I mix them, my program doesn't do it correctly. Right now I have if I am given:

(((100 + 5 - 2) * 1.15 + 6) * (1.07)) + (100 * 0.03) = 136.1615, to reverse it I am doing:

(((136.1615 / 0.03 + 1.07) - 6) / 1.15) + 2 - 5 which I know is wrong, regarding the 136.1615 / 0.03 part.

In resposne to Arturo's answer:

My program loops through the adjustments and as long as it keeps seeing a flat value, it adds them together. When it sees a non-compounded or compounded adjustment, it adds the flat value to the amount. The same applies to compound and non-compound amounts. As long as the previous value was a compound, it just multiplies the current one to the previous one and if it is non-compounded, it adds it or subtracts it from the previous one, so given 130.1615, my program prints statements like this to show what it is doing:

130.1615 + 3
133.1615 / 1.07
124.45 - 6
118.45 / 1.1150 = 103
103 - 3 = 100

PURPOSE:

Given a dollar amount (value), remove adjustments (flat amounts, compound percentages, non-compound percentages) from the value to get back the initial value before the adjustments were applied. The adjustments don't necessarily have to just be added to the initial value, they also be removed, so in that case, you must add the adjustment to get back to the initial value.

INPUT:

Post-Adjusted Value
Set of Adjustments

DESIRED OUTPUT:

Pre-Adjusted Value

  • 2
    Of course they don't work. This is essentially the same issue that you've been asking (and getting answers for) since you started. When you multiply the entire thing by 1.03, you're compounding.2011-04-22
  • 0
    Arturo, Yes, I realized that is compounding. The other issues mainly dealt with all compounds, all non-compounds and no flat amounts. When I throw flat amounts in there, it changes.2011-04-22
  • 0
    @Arturo: Is this a recurring thread? I'm unfamiliar with it.2011-04-22
  • 5
    @Xaisoft: My point is that you seem to not be learning much from previous answers, and continue to try multiplying or dividing by quantities without putting any thought into it, in the hopes that it will magically produce what you want.2011-04-22
  • 2
    @mixedmath: Look up the previous questions by the OP. They all have the same flavor/topic of trying to add basic percentages with or without compounding.2011-04-22
  • 0
    @Xaisoft: And why add five and then subtract 2, instead of simply adding 3?2011-04-22
  • 0
    Arturo, I understand from a formula mathematical standpoint. The problem is that I am trying to put this write a program that will automatically calculate this for me. Stackoverflow can't really help me because they don't know the mathematical formula. All my other questions dealt with either just compounding, non-compounding, only flat amounts, but when I mix them, I get into trouble.2011-04-22
  • 0
    @Arturo, regarding your question about adding 5 and subtracting, instead of just adding 3. You are correct, this is what should be done, but I don't set these values up, someone else does, so I have no idea if they would put +3 or -2 and +5. I have to assume they will put the worst case scenario.2011-04-22
  • 0
    There is certain data that I am only given, I will update my post so it is more clear.2011-04-22
  • 2
    @Xaisoft: So I have to assume that you are not asking what you are really meaning to ask, because you will not always have "100" as the main quantity. What you **really** want is to have the total of the above expression for a given value of $X$, and you want to figure out how to manipulate that total to add 3% of the original $X$, knowing only the total above. Here;s a hint: to get a question answer, ask the question, not something else. And I have to say that contrary to your claim, you do **not** "understand form a formula mathematical standpoint", given your manipulations.2011-04-22
  • 1
    @Xaisoft: "I have no idea if they put +3 or -2 and +5. I have to assume they will put the worst case scenario." To me, this sentence is absolute nonsense insofar as computations go. Since your question is about computations, I still have no idea why you put "-2+5" instead of putting "+3", unless you really don't understand formulas.2011-04-22
  • 0
    Arturo, you are correct. I was just setting up test data. I have updated my post to indicate that I just know the final value and the percentages and flat amounts that were added or subtracted and I want to get back to the initial amount without knowing the original amount. You are correct about the mathematical. My math is not as good, so that is why I am asking all these questions in a flurry. What I meant is that I sort of understand and when I implement my program it works fine, but when I add another adjustment to it, my program fails. I can assure you this though....2011-04-22
  • 0
    continued from my last comment. I have learned a great deal already, although I am not as good in math. Someday I will get better.2011-04-22
  • 0
    Arturo, I would put +3, but I have to assume the person entering the data might put a -2 and a +5 instead of a +3. Maybe they don't realize that they can combine it and maybe they do. But whether they put +3 or (-2 + 5), I have that part calculating correct. In my program, I am adding them to get +3. The part that is throwing me off is removing the +3% non-compound percent to get back to 100.2011-04-22
  • 1
    @Xaisoft: You final total (136.1615) is incorrect. You added 3 to 130.1615, so your total should be 133.1615. What you need to do is basic algebra; see my post.2011-04-22
  • 0
    @Arturo, I thought 136.1615 looked funny. I appreciate the help, I will look at your post if I have a question, I will add a comment under it. Again, sorry to be a real pain.2011-04-22
  • 1
    Since you are keeping the *purpose*, the *input*, and the *desired output* of "your program" a secret, your additions add nothing to your question. They don't clarify, they don't simplify, they don't explain, and they certainly don't help.2011-04-22
  • 0
    @Arturo, I have mentioned the purpose, input and desired output, but if you need clarification, I will update my post2011-04-22

2 Answers 2

2

$$\begin{align*} \Bigl(\bigl( (X+3)*1.15 + 6\bigr)*1.07 - 3\Bigr) &= \Bigl(\bigl( 1.15X + 9.45\bigr)*1.07 - 3\Bigr)\\ &= 1.2305X + 7.1115 \end{align*}$$ To get 3% of the original $X$, you want to take the total you have, $T$, subtract 7.1115, divide the result by 1.2305, and then multiply by $0.03$. So if $T$ is the total, you want $$\left(\frac{T - 7.1115}{1.2305}\right)0.03.$$

For $X=100$, $T$ is equal to $130.1615$. Subtracting $7.1115$ gives $123.05$. Dividing that by $1.2305$ gives $100$ (the original $X$). Multiplying by $0.03$ gives $3$.

To add 3% of the original quantity $X$ to the total $T$ you are given, simply take $$T + \left(\frac{T - 7.1115}{1.2305}\right)0.03.$$

If you are instead given $$1.2305X + 7.1115 + 0.03 X = 1.2605X + 7.1115$$ then subtract $7.1115$, and divide by $1.2605$ to get back the original quantity. If you were given 133.1615, subtracting 7.1115 gives you 126.05; dividing by 1.2605 gives you back the original quantity 100. (Your total of 136.1615 is incorrect; you had 130.1615 before adding 100*0.03, so you get 133.1615, not 136.1615).

  • 0
    Arturo, using your first equation above, I will update my post and show you how my how my program is calculating it.2011-04-22
1

Firstly, I suspect you don't just to add 3% of 100. 3% of 100 is 3, and so your full equation would simply have a " +3 " at the end.

Instead, I will assume that you really want to increase the overall result by 3%. What that means is that your previous answer, 130.1615, get's multiplied by 1.03 (representing 1 * 130.1615 + 0.03* 130.1615, a 3% increase). Writing it all together, one gets $ [(( 100 + 5 - 2) * 1.15 + 6)(1.07) - 3](1.03) $.

But... this is compounding.