Maple can solve a system of equations such as $\sin x + y =0, \sin x - y =0$. However,
var('x y') solve([sin(x) + y ==0, sin(x) - y==0], [x, y]) produces no useful answer.
Is there any other way to proceed?
asked Dec 15 '11jllb
21 ● 1 ● 5
First, even though this particular system can be solved by hand easily enough, giving a nice, tidy family of solutions, I don't suspect that Sage will be able to see that. (Somebody please correct me if I'm wrong on that.) Certainly this is the case if you change your equations a little bit. In general, the best you can hope for is numerical solutions.
Resigning ourselves to that, I found a couple other questions on ASKSAGE with similar issues: here and here. My answer below is heavily cribbed from the one given by DSM at the first link. He recommends using scipy's 'minimize' function.
Then, given a starting point, e.g. (5,4), we hunt for a nearby solution.
If you loop over a lattice of points, you will hopefully find all the solutions in that region:
Asked: Dec 15 '11
Seen: 411 times
Last updated: Dec 16 '11
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.