# Fractions expansion

is it possible to trasform this expression:
a,b,c constant and x a variable. $$\frac{1}{(x-a)^2}+\frac{1}{(x-b)^2}+\frac{1}{(x-f)^2}$$

in a form that has the variable x outside the the parenthesis:
something like this: $$(\cdots)x^4+ (\cdots)\frac{1}{x^4}+ (\cdots)x^3 + \cdots$$

I'm not looking for a series expantion, not an approximation, just to have somethin with all the constant coefficents that multiply or divide x.

Is not an exercise, is that I'm not very good in math and I cannot find a way to simplify/expand this function.

for example this (expanded form): $$\tiny\frac{(a^2 b^2-2 a^2 b x+a^2 f^2-2 a^2 f x+2 a^2 x^2-2 a b^2 x+4 a b x^2-2 a f^2 x+4 a f x^2-4 a x^3+b^2 f^2-2 b^2 f x+2 b^2 x^2-2 b f^2 x+4 b f x^2-4 b x^3+2 f^2 x^2-4 f x^3+3 x^4)}{((a-x)^2 (x-b)^2 (x-f)^2)}$$

is not what I'm looking for.

What I'm asking first of all is: is possible? it can be that is not even possible.

What I want to do is pretty simple: I want to simulate a vector field to simulate the behaviour of n particles. The particles interacts with the others by this formula $$\frac{1}{(\text{PositionParticle}_x-\text{PositionParticle}_{nx})^2}$$ $$\frac{1}{(\text{PositionParticle}_y-\text{PositionParticle}_{ny})^2}$$ which mean that the vector field function is: $$\small f(x) = \frac{1}{(\text{PositionParticle}_x-\text{PositionParticle}_{n0})^2}+\frac{1}{(\text{PositionParticle}_x-\text{PositionParticle}_{n1})^2}+(\cdots)$$ same for $y$

computing this require a lot of calculation why the computer must access the array where there are stored the variable $n\times n$ times. a faster way to do this would be to calculate the vector field having the coefficients summarized and stored and then passing them to modify the $x$ variable.

-
Do you want the expressions inside the parentheses to be polynomials? –  Arturo Magidin Sep 13 '11 at 17:08
Your original expression blows up for $x=a$, $x=b$ and $x=f$. You can't achieve that if the only thing you ever divide with is powers of $x$ -- that will lead to blowups for $x=0$ but nowhere else. –  Henning Makholm Sep 13 '11 at 17:11
I don't know what it means... if it means (x^2+2ax+a^2)*(...) ecc... no, I want really the x being something a part from the other coefficents –  Pella86 Sep 13 '11 at 17:12
(And by the way, that's the fist time I've heard anyone claim they are not very good at math, at the same time as demonstrating they know what a series expansion is!) –  Henning Makholm Sep 13 '11 at 17:13
@Pella, it looks like what you envision is not exactly possible. We would be able to help better if you described what you want to achieve with the rewriting you seek. What do you want an expansion of that particular form for? –  Henning Makholm Sep 13 '11 at 17:26

It's impossible with rational functions, i.e. quotients of polynomials (with complex coefficients). Putting everything over a common denominator, we obtain the following equality of fractions, where we may assume that the LHS fraction is in lowest terms, hence $\rm\:n \ge 1\:$ is minimal

$$\rm \dfrac{f(x)}{x^n}\ =\ \frac{h(x)}{g(x)}$$

Above $\rm\:x\:$ does not divide $\rm\:f(x)\:$ since the fraction is in lowest terms, and also $\rm\:x\:$ does not divide $\rm\:g(x) = ((x-a)(x-b)(x-c))^2\:$ by $\rm\:a,b,c\ne 0\:.\:$ Equivalently $\rm\:f(0)\ne 0\ne g(0) = (abc)^2.\:$ Therefore, cross multiplying we obtain $$\rm f(x)\:g(x)\ =\ x^n\:h(x)$$

which when evaluated at $\rm\:x = 0\:$ yields $\rm\:f(0)\:g(0)= 0\:$ contra $\rm\:f(0)\ne 0\ne \:g(0)\:.$ Said equivalently, since the first fraction is in lowest terms, then its denominator $\rm\:x^n\:$ must divide the denominator of any equivalent fraction, thus $\rm\:x^n\:$ divides $\rm\:g(x)\:,\:$ so $\rm\:g(0) = abc = 0\:,\:$ so at least one of $\rm\:a,b,c\:$ is $\rm\:0\:.$

This is a special case of the unique fractionization property for polynomials over a field (which follows since they possess a Euclidean algorithm). This specific case is a bit simpler: it's equivalent to the fact that $\rm\:x\:$ is prime, i.e. $\rm\:x\:|\:f(x)\:g(x)\:$ implies $\rm\:x\:|\:f(x)\:$ or $\rm\:x\:|\:g(x)\:;\:$ or, said equivalently, that $\rm\:f(0)\:g(0) = 0\:$ implies $\rm\:f(0)=0\:$ or $\rm\:g(0)=0\:.\:$ Thus it is equivalent to the fact that the product of nonzero coefficients remains nonzero, i.e. that the coefficient ring is an integral domain. The algebraic structure at the heart of the above comes to the fore when one studies factorization theory in abstract algebra.

-
wow this was what I was looking for! I cannot say I understand all what you written, but I thought in a very simplistic way what you so good described here! thank you! –  Pella86 Sep 13 '11 at 21:02
@Pel Please feel welcome to ask questions in the comments on any points that are not clear. –  Bill Dubuque Sep 13 '11 at 21:06

One approach is to note that $$\frac{1}{(x-a)^2}=\sum_{n=0}^{\infty}a^{-2-n}(1+n)x^n=\frac{1}{a^2}+\frac{2x}{a^3}+\frac{3x^2}{a^4}\ldots$$ which converges for $|x| \lt a$. You can add together one for each of your fractions. Is that what you are looking for?

Added: If $|x| \gt a$ you can also get an expression, but the $x$ will be in the denominator as it will be an expansion around $\infty$. It looks similar: $$\frac{1}{(x-a)^2}=\sum_{n=0}^{\infty}x^{-2-n}(1+n)a^n=\frac{1}{x^2}+\frac{2a}{x^3}+\frac{3a^2}{x^4}\ldots$$

-
a sort of... I don't like the $$\infty$$ and don't really like the absolute value of x < a what happen if x > a? –  Pella86 Sep 13 '11 at 17:54
@Pella86: if $x$ is far from $a$ the series will converge quickly, so you can stop when it is accurate enough. If $x \gt a$ is added. –  Ross Millikan Sep 13 '11 at 21:57