|
From: Me S. <vla...@gm...> - 2020-09-17 20:27:35
|
Hello Richard > These equations (they are not polynomials) can be solved if they are > converted to polynomials. For eq1, solve for sqrt(x*y), then square > both sides. > Then lhs-rhs. > For eq2, do the same. I'm sorry to revive this, but for a system like this, there are problems: eq:makelist(0,6)$ eq[1]:(40*sqrt(x3*x4)*y2+40*sqrt(x1*x2)*y1)/41-0.35549$ eq[2]:(40*sqrt(x1*x2)*sqrt(x3*x4)*y1*y2)/41-0.017904$ eq[3]:-(-4*y2-4*y1+20*sqrt(x3*x4)-10*x4-10*x3+20*sqrt(x1*x2)-10*x2-10*x1)/41-2.3362$ eq[4]:-(80*sqrt(x1*x2)*y2-40*x1*y2+x4*(-y2-y1)+x3*(-40*y2-y1)+x2*(-40*y2-1)+2*sqrt(x3*x4)*y1-40*x1*y1)/41-4.4314$ eq[5]:-(x3*(-4*y1*y2-10*x1*y1)+x4*(-10*x2*y2-10*x1*y2-10*x1*y1)-*x2*y1*y2+20*sqrt(x1*x2)*x4*y2+20*x1*sqrt(x3*x4)*y1)/41-2.7884$ eq[6]:(x2*x4*y1*y2+40*x1*x3*y1*y2)/41-2.959$ What I'm trying to do is to solve (symbolically) for sqrt(x1*x2), then for sqrt(x3*x4), until there are no more radicals, so that I can pass it on to hompack_polsys(). If it works, it can be made recursively with the condition to stop as freeof(sqrt()). For the first two equations, it works, but for the rest, I get strange outputs. This is what I tried: solve(eq2[1],sqrt(x1*x2))^2$ solve(%,[sqrt(x3*x4)])^2,expand,numer; /* works */ solve(eq2[2],sqrt(x1*x2))^2,expand,numer; /* works */ solve(eq2[3],sqrt(x1*x2))^2$ solve(%,sqrt(x3*x4))^2; num(rhs(%)); /* fails */ solve(eq2[4],sqrt(x1*x2))^2$ solve(%,sqrt(x3*x4))^2; num(rhs(%)); denom(rhs(%th(2))); /* fails */ solve(eq2[5],sqrt(x1*x2))^2$ solve(%,sqrt(x3*x4))^2; num(rhs(%)); denom(rhs(%th(2))); /* fails */ Is it because the numbers get very high? keepfloat:true seems to be ignored by solve(). What's strange is that, without the raise to power, the second solve() displays a result, as it should. It's a long result, large numbers, but it is displayed. The raise to power will make those numbers considerably longer, but even if I append ",expand,numer" at the end, it still fails. Regards, Vlad |