Rubi icon indicating copy to clipboard operation
Rubi copied to clipboard

Star[u,v] not working properly in Mathematica (Wolfram Engine) 14.3

Open fgerick opened this issue 4 months ago • 1 comments

I recently upgraded computer and reinstalled the latest Wolfram Engine 14.3. I installed the latest Rubi PacletInstall["https://rulebasedintegration.org/Rubi-4.17.3.0.paclet"] and ran into an issue. It is actually visible from the example given on Rubi's website:

Image

For some reason the Star[u,v] method does not seem to simplify to a multiplication in this case and therefore the expression is not evaluated as it should in the limits.

fgerick avatar Sep 17 '25 14:09 fgerick

Here is a fix suggested by Copilot, which seems to work for the simple example discussed before:

ClearAll[Star]
Star::usage = "Star[u,v] displays as u*v, and returns the product of u and v with u distributed over the terms of v.";
Star::error = "Inert multiplication by zero!";

(* Base case: multiplication by zero *)
Star[u_, v_] := (Message[Star::error]; 0) /; EqQ[u, 0]

(* Distribute over sums *)
Star[u_, v_] := Star[u, #] & /@ v /; SumQ[v]

(* Flatten nested Star *)
Star[u_, Star[v_, w_]] := Star[u*v, w]

(* Handle negative numeric factors *)
Star[u_, v_] := -Star[-u, v] /; NumericQ[u] && u < 0

(* Simplify when possible *)
Star[u_, v_] := u*v /; Not[TrueQ[$ShowSteps]] || EqQ[u^2, 1] || IntegralFreeQ[v]

(* Distribute over products *)
Star[u_, v_*w_] := Star[u*v, w] /; IntegralFreeQ[v]

(* Fallback: use Distribute and Expand to ensure simplification *)
Star[u_, v_] := Expand[Distribute[u*v]]

I have no idea if this works in general and if it does what it should!

fgerick avatar Sep 24 '25 08:09 fgerick