(This is now a solved problem by my own alternative methods, and using some more physical arguments to limit the complexity of the problem. However more generally, any answers and strategies would be appreciated, to feel I have not wasted the entirely of the bounty.)
Firstly, I apologise for the numerical messiness, and for the extended length of this question. If this is successful, this is the last question I will need to ask for a long time.
I start with a rational function of polynomials of the form
ratfunc=(2 (-3 + x)^3 (233 - 50 x + x^2))/(49 (-2 + x) (-5 + x) (-13 + 5 x))
where the numbers are a result from my theory. This is a rational function of polynomials in
x, my only free variable in this situation.
I know from theory that this function can be refactorised in some way, determined in terms of 3 coefficients
a, a and
a, functions of the independent variable
x. After doing necessary evaluations, and factored for simplicity to write down, it is given by
factoredform = ((-3 + x) (-2 + x) (980 a^2 + 1176 a a + 1638 a^2 + 112 a a + 336 a a + 64 a^2 - 1568 a^2 x - 980 a a x - 1722 a^2 x - 56 a a x - 112 a a x + 833 a^2 x^2 + 196 a a x^2 + 602 a^2 x^2 - 147 a^2 x^3 - 70 a^2 x^3))/(98 (-5 + 3 x) (-13 + 5 x))
The original form (which is not shown) is much cleaner and structured, but when evaluated, it looks like this, which is important for the method.
I am looking for a way to solve for all three coefficients
a, which are functions of
x, that give the same form as the rational function
ratfunc. I know from theory that the coefficients must be rational functions of polynomials, and so I create a general form for them like this:
poly = ratfunc-factoredform//Factor//Numerator; variables = Cases[Variables[%],_x] newa1ansatz = polynomial[variables,2, Ca1] /polynomial[variables,1, Da1] newa2ansatz = polynomial[variables,2, Ca2] /polynomial[variables,1, Da2] newa3ansatz = polynomial[variables,2, Ca3] /polynomial[variables,1, Da3]
polynomial is the function as in the SE post
polynomial[vars_List, n_Integer, coeff_] := #.Array[coeff, Length@#] &@ DeleteDuplicates[Times @@@ Tuples[Prepend[vars, 1], n]].
In particular, we have that our guess looks like
newa2ansatz= (Ca2 + Ca2 x + Ca2 x^2)/(Da2 + Da2 x)
and other similar results for the other coefficients. I am now trying to solve for these coefficients
Ca2 etc which are simply real numbers. One could probably choose one of the coefficients to be one to reduce the number of components, maybe Da21 for example for simplicity.
I know the results beforehand from theory, but I am trying to rederive them in a different method to use for future applications
a1expected = 0 a2expected = -(2/(-2 + x)) a3expected = ((-3 + x) (3 + x))/(4 (-2 + x))
I want to find these results from first principles, purely from an algebraic method. Note that if we substitute these into the original
factoredform we return the result
ratfunc, which is exactly what we wanted to do.
In this case, I am expecting to solve the coefficients that I find. For
Ca2 = -2 Ca2 = 0 Ca2 = 0 Da2 = -2 Da2 = 1
and similarly for
a (which will have
Da) be zero. If I can find a method to derive these coefficients, then I can apply this in multiple other scenarios.
EDIT: A summary
I have a function
ratfunc that is given. I know that it can be factorise it in some way given by my
ansatz, guaranteed by theory. I would like to find the structure of these coefficients in this ansatz,
a, a and
a, such that the ansatz is now equivalent to the original
ratfunc. Every term and every coefficient is simply a rational function of a polynomial in the variable
x. Despite knowing what the answer should be, through the expected values, I want to be able to derive them from an algebraic solution, i.e for a different ratfunc, how could I find out what these are.