Symbolics.jl simplify function gives overflow error

Without looking into the details I tried

using Symbolics
@variables a b P_o P_i r_o r_i
force = P_i*r_i^2 - P_o*r_o^2 + BigInt(2)//3*a*(r_i^3-r_o^3) + b*(r_i^2-r_o^2)
moment = P_i*r_i^3 - P_o*r_o^3 + BigInt(3)//4*a*(r_i^4-r_o^4) + b*(r_i^3-r_o^3)
(a_solution, b_solution) =
	Symbolics.solve_for(
	[0 ~ force, 0 ~ moment],
	[a, b],
	simplify = true # Solutions are found without this line.
	)

and got

2-element Vector{SymbolicUtils.Div{Real, SymbolicUtils.Add{Real, Int64, Dict{Any, Number}, Nothing}, SymbolicUtils.Add{Real, Int64, Dict{Any, Number}, Nothing}, Nothing}}:
 (P_i*(r_i^2)*(r_o^2) - P_o*(r_i^2)*(r_o^2)) / ((1//12)*(r_i^5) + (1//12)*r_o*(r_i^4) + (2//3)*(r_i^2)*(r_o^3) - (1//12)*(r_o^5) - (2//3)*(r_i^3)*(r_o^2) - (1//12)*r_i*(r_o^4))
 ((72//1)*P_i*(r_i^5) + (72//1)*P_i*r_o*(r_i^4) + (648//1)*P_i*(r_i^2)*(r_o^3) + (72//1)*P_i*(r_i^3)*(r_o^2) - (72//1)*P_o*(r_o^5) - (72//1)*P_o*r_i*(r_o^4) - (648//1)*P_o*(r_i^3)*(r_o^2) - (72//1)*P_o*(r_i^2)*(r_o^3)) / ((72//1)*(r_o^5) + (576//1)*(r_i^3)*(r_o^2) + (72//1)*r_i*(r_o^4) - (72//1)*(r_i^5) - (72//1)*r_o*(r_i^4) - (576//1)*(r_i^2)*(r_o^3))
1 Like