export function solveEquation(equationExpression: string): string[] {
const expression = computeEngine.parse(equationExpression);
const symbols = expression.symbols;
if (symbols.length === 0) return [];
if (symbols.length > 1) throw new Error("Can only solve for one variable at a time");
return expression.solve(symbols[0])?.map((x) => x.latex) || [];
}
Expected Behavior
The above equation should return \\sqrt{5} but instead returned \frac{\sqrt{15}}{3}
ce is failing the following unit tests after I upgrade from 12.3 to latest version.
Expected Behavior
The above equation should return
\\sqrt{5}
but instead returned\frac{\sqrt{15}}{3}