Group Abstract Group Abstract

Message Boards Message Boards

0
|
78 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Determining the condition for a rational expression in k to be constant: coefficient ratio analys

Posted 2 days ago

The following fraction "pol" has quadratic terms in k and constant terms in both the numerator and the denominator.

pol = (k^2 (-5 + 2 t) (1 + 2 t) + 3 (-4 + t^2))/(3 + 4 k^2)

To ensure that the value of pol is constant, the ratios of the corresponding coefficients of the quadratic terms in k in the numerator and denominator must be equal.

Under this guiding principle, how can we use code to automatically extract the relevant coefficients and derive the following equation, without manual copy-pasting?

((-5 + 2 t) (1 + 2 t))/4 == (3 (-4 + t^2))/3

Here is my personal attempt at a solution:

pol = (k^2 (-5 + 2 t) (1 + 2 t) + 3 (-4 + t^2))/(3 + 4 k^2)
n = CoefficientList[pol[[-1]], k]
d = CoefficientList[1/pol[[-2]], k]
Equal @@ (n[[{1, 3}]]/d[[{1, 3}]])
% // Reduce

Problem: Because the numerator and denominator have no linear terms, I manually extracted their quadratic (k²) and constant terms, ignoring the zero-coefficient linear terms.

Desired improvements:

Automatic zero-coefficient skipping: If a term (e.g., k¹) is missing (coefficient = 0), the code should skip it and only compare non-zero coefficient ratios.

Handling higher-degree terms: If terms like k³, k², k¹, and constants exist, the code should compare all corresponding coefficients.

Asymmetry detection: If terms are mismatched (e.g., numerator has k¹ but denominator does not), the code should flag that a constant value is impossible.

POSTED BY: Jim Clinton
4 Replies

Here is another way:

f[k_] = (k^2 (-5 + 2 t) (1 + 2 t) + 3 (-4 + t^2))/(3 + 4 k^2);
domain[k_] = FunctionDomain[f[k], k, Complexes];
Reduce[ForAll[{k1, k2},
  domain[k1] && domain[k2],
  f[k1] == f[k2]]]

This works too, but it depends on the fact that the denominator never vanishes on the reals:

f[k_] = (k^2 (-5 + 2 t) (1 + 2 t) + 3 (-4 + t^2))/(3 + 4 k^2);
Reduce[ForAll[{k1, k2}, f[k1] == f[k2]], t, Reals]
POSTED BY: Gianluca Gorni
Posted 1 day ago

This method is simple and easy to understand, perfectly solving the problem. Thank you very much!

POSTED BY: Jim Clinton

I'd use calculus.

To solve for the parameter t to get a constant function of k:

pol = (k^2 (-5 + 2 t) (1 + 2 t) + 3 (-4 + t^2))/(3 + 4 k^2);
Solve[D[pol, k] == 0, {t}]
(*  {{t -> 11/8}}  *)

If I have it backwards, and you want to solve for the parameter k to get a constant function of t, reverse the roles of t and k above. But that problem has no solution.

POSTED BY: Michael Rogers
Posted 1 day ago

This method is excellent! Thank you very much!

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