On 2014-05-14, Ailurus <ailuru...@gmail.com> wrote: > By "nontrivial way", do you mean the cosine or the square root (or both)? I didn't actually notice sqrt. Such equations are in fact not called quadratic, that was confusing.
Your original equations also contained i, which is, I presume, sqrt(-1)? > And yes, I could eliminate b and then solve for a, but that's a manual step > I'd rather avoid. > > Ok, so I simplified the expressions using Sage (I'm quite surprised to see > that simplify_full() produces better results than Matlab's simplify() > function). one should check whether it was actually correct. I wonder how sqrt(-1) disappeared... > Then, replacing the cos(2pi/n) by a new variable x results in a > much clearer system of equations. The complete code to solve for a and b is > included below. > > a,b,x = var('a,b,x') > L = 2*b^2*x^2 + sqrt(4*b^2*x^4 - 4*(a + 2*b - 1)*x^2)*b - a - 2*b + 1 > M = 8*b^2*x^4 - 8*b^2*x^2 + 2*b^2 + sqrt(64*b^2*x^8 - 128*b^2*x^6 + > 16*(6*b^2 - a - 2*b + 1)*x^4 - 16*(2*b^2 - a - 2*b + 1)*x^2 + 4*b^2 - 4*a - > 8*b + 4)*b - a - 2*b + 1 This system would be even more simple if you set A=a+2*b-1. Then e.g. L = 2*b^2*x^2 + 2*b*sqrt((b^2*x^2-A)*x^2)-A Anyhow, your best bet is to get rid of sqrt, too, by putting sqrt on one side of each equation and the rest on the other side, and squaring. (this of course can introduce extra roots, but worry about them later). E.g. the 1st equation becomes 4*b^2*(b^2*x^2-A)*x^2==(1/2+A-2*b^2*x^2)^2. HTH, Dmitrii > > Eq1 = L == 1/2 > Eq2 = M == 1/4 > > Sol = solve([Eq1, Eq2], a, b) > > Sage starts/tries to solve it, but after half an hour it was still running > so I terminated it. Are there any parameters I can tune for the solve() > function for it to work properly, or can Sage just not solve these types of > equations (yet)? Thanks. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.