# Solving equation in terms of $x$

$x + .08x + (x +.08x).1 = 12$

I need to come up with a formula that solves for x. In a generic way that doesn't combine values of $x$.

For example: starting with $x + .08x = 12$

$$x = \frac{12}{1+ \frac{8}{100}}$$

I am using this for a php script for tax purposes and I know the equation is right, but I am having a hard time solving it generically for $x$. (It has been awhile since I have done algebra)

-

## 1 Answer

Okay, we have $$x + .08x + .1(x + .08x) = 1.08x + .1(1.08x) = 1.1 \cdot 1.08x = 1.188x$$ Therefore, we must solve $$1.188x = 12 \implies x = \frac{12}{1.188} = \frac{1000}{99} = 10.\overline{10}$$

-
I got the answer to be 10.101 (using Wolfram Alpha), I will try to use your formula to calculate it –  Chris Muench Nov 27 '13 at 23:36
Also: I am trying to create a formula for x where I can plug in the pieces. I don't want to simplify the equation. –  Chris Muench Nov 27 '13 at 23:39
In general, you should use different variables for different quantities. Can you specify what parts you would like to simplify, and what parts you do not? –  Akshaj Kadaveru Nov 28 '13 at 1:36
@AkshajKadaveru. 1.1 * 1.08 = 1.188 !! –  Claude Leibovici Nov 28 '13 at 5:07
oops lol sorry. –  Akshaj Kadaveru Nov 28 '13 at 13:21