0
$\begingroup$

I'm really embarrassed to ask this - my apologies.

In a piece of software I'm writing, I am using the following:

$Y = X+\frac{X}{10}N$

That's all fine - but how do I calculate X when I know Y and N?

I know it's really basic, but for some reason I get stuck half-way through moving the equation around.

  • 0
    Please clarify, is it $\frac{X}{10N}$ or $\frac{X}{10}N$ ? (Parentheses are hella important!)2010-11-23
  • 0
    SOrry, it is Y = X + ((X/10)*N)2010-11-23
  • 0
    Note then that $Y=X(1+\frac{N}{10})$; thus, $X=\frac{Y}{1+\frac{N}{10}}$ ...2010-11-23
  • 0
    Spot on, that works perfectly.2010-11-23
  • 0
    @J.M., @palmaceous: In the interest of not having an unanswered question, could you post-answer-and-accept?2010-11-23
  • 1
    @Arturo, done now.2010-11-23
  • 0
    Are X,Y,N suppose to be integer types? Or are they floats? I am asking this because X/10 might become 0, when 1 <= X <= 10, when X is an integer, depending on your programming language. So the mathematical formula might actually not work!2010-11-23

1 Answers 1

1

If $Y=X+\frac{X}{10}N=X\left(1+\frac{N}{10}\right)$, then $X=\frac{Y}{1+\frac{N}{10}}$ .