I am a bit ashamed for asking such a simple question, but we really need the answer.

We develop a program to calculate... something for our clients (I would be hard pressed to explain it in english, but in french : calculer les cotisations des adhérents pour des associations professionnelles).

The equation given by our client is simple :

$$\mbox{cotisation}= \frac{x}{1.5 + 0.02 x} \times 1000$$

But in order for it to fit in our program, we need it in this form :

$$\mbox{cotisation} = (x - p - m) \times c + d + f$$

The x's are the same variable in the two equations.
In the second equation, the other variables are replaced by fixed numbers when the program is launched.

So, in other words, we only need to get x outside the fraction in the first equation.
Apparently none of us around here remembers enough math to be able to do it... :(
Yes, we will buy ourselves a "math for dummies" book. But in the meantime, could you help us ?

Thanks

It can't be done. There are no numbers $p,m,c,d,f$ such that a formula of the second type always gives the same answers as that first formula.

• +1 for being concise. To add a little more flavour: your first formula is nonlinear while the second one is linear, and in general there's no way to write a nonlinear function as a linear function. Jun 6, 2011 at 13:04

It is not possible: $\frac{1000x}{1.5 + 0.02x}$ is not linear, which is the form of the second equation.

But if you really need to force it into that form, you'll have to be satisfied with an approximation. For instance, typing "1000x/(1.5 + 0.02x)" into Wolfram Alpha gives you the series expansion $$666.667x-8.88889 x^2+0.118519 x^3-0.00158025 x^4 + O(x^5)$$ in which you can ignore all but the first term, and take just $666.667x$. This is in your form, with $p = m = 0$, $c = 666.667$, and $d=f=0$.

This approximation may be poor, but it is in some sense the best possible linear approximation near $x=0$. If you know what the average value of $x$ will be, you can expand as a series near that value, and get a (slightly) better approximation.

The thing you were attempting to do was impossible, so there's no need to feel ashamed you coudln't do it. :-)

• The value of x can be anything, but in general, it should be between ~0.9 and 3 or 4. We need an exact result, because it's monetary stuff. We will have to find another way. Thanks ! Jun 6, 2011 at 14:22
• @cosmo0: Ah, ok. Anyway, I've added Walpha's plot showing how bad it is in 0 to 4, for general interest. Jun 6, 2011 at 14:36
• BTW, the "666.667x" approximation is the same as simply ignoring the "0.02x" in the denominator; it's not as hard as it may appear. :-) Jun 6, 2011 at 15:10