Group Abstract Group Abstract

Message Boards Message Boards

0
|
1K Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

"Normalizing" a rational expression

Posted 9 months ago

Suppose I have a rational expression, involving three variables a, b, and k, as follows in which N and D are polynomials ("numerator" and "denominator")

N(a, b, k) / D(a, b, k)

what would the Mathematica command(s) be to convert this to the following form?

N1(a, b, k^2) / D(a, b, k^2) + k * N2(a, b, k^2) / D(a, b, k^2)

For example, if the expression was (a + b + 2 k) / (2a - k) then the first step is to separate the numerator and denominator, then multiply both by the "k-conjugate" of the denominator, namely 2 a + k, then separate (a + b + 2 k) * (2 a + k) into even and odd powers of k as

(2 a (a + b) + 2 k^2) + k (3 a + b)

so the final result is

((2 a (a + b) + 2 k^2) / (4 a^2 - k^2)) + k ((3 a + b)/(4 a^2 - k^2))

The problem is analogous to one where k is irrational, such as sqrt(-1) where the aim is to normalise a quotient of two complex numbers. But the problem is only simple symbolic manipulation and I'm interested in how it would be accomplished for a general (unspecified) value of k.

TIA

To sketch the background, I have found a general two-parameter rational parametrization of the surface equation, in which k is a given fixed non-zero rational value:

(x^2 - 1)(y^2 - 1) = k^2 z^4

and want to knock out the k-coefficients of any two of x, y, z (and hence all three) when these are both expressed in the standard form explained above, with the aim of finding every rational curve on the following surface, for which K is a given rational value but not necessarily the square of a rational number:

(x^2 - 1)(y^2 - 1) = K z^4

But unfortunately I'm the greenest of green novices with Mathematica at the moment! (but picking it up fast!)

POSTED BY: John Ramsden
2 Replies

You may try something like this:

oddPowers[poly_, x_] := (poly - (poly /. x -> -x))/2 // Expand;
evenPowers[poly_, x_] := (poly + (poly /. x -> -x))/2 // Expand;
normalizing[num_/den_, k_] := 
  Module[{fac = evenPowers[den, k] - oddPowers[den, k]},
   evenPowers[num*fac, k]/Expand[den*fac] +
    k*Expand[oddPowers[num*fac, k]/k]/Expand[den*fac]];
normalizing[(a + b + 2 k)/(2 a - k), k]
% // Simplify
POSTED BY: Gianluca Gorni

Many thanks Gianluca. I'll start experimenting with that. Looks easy enough ..

POSTED BY: John Ramsden
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard