(e: Expression, x: string)
| 2953 | // "unsolved beats a branch-fragile wrong". |
| 2954 | const monomial = trigArgMonomialExponent(arg, x) !== null; |
| 2955 | const composite = |
| 2956 | !monomial && (deg === 2 || fractionalLinearInnerQ(arg, x)); |
| 2957 | if (!composite) head = TO_INERT[head]; |
| 2958 | } |
| 2959 | if (head === u.operator && newOps.every((o, i) => o === ops[i])) return u; |
| 2960 | return ce.function(head, newOps); |
| 2961 | }; |
| 2962 | return walk(e); |
| 2963 | } |
| 2964 | |
| 2965 | /** Inert → active: `cos[x]` → `Cos[x]`. Applied to results (RHSs already emit |
| 2966 | * active heads; this catches inert leaves carried over from the integrand). */ |
no test coverage detected