Python-programming-exercises icon indicating copy to clipboard operation
Python-programming-exercises copied to clipboard

Solve a tedious system of equations which cannot be expressed in matrix form

Open ShreeniketJoshi opened this issue 5 years ago • 0 comments

I have two non-linear equations with only two variables which are tedious to solve. Please see below for the equations and conditions: image1

I'm having difficulty solving this system, is there any way to input this into a solver? I tried solving it manually but it becomes too complex.

Any help would be appreciated, I'm posting it here as a last desperate try to get some hint on how to go about it. Thank you so much.

def equations(p):
    x, y = p
    return ((3*(x**2+y**2))**-1*(x*(x**2+y**2+2.25)*np.sinh((4*m.pi*y*m.e4)/466)+3*x*m.cosh((4*m.pi*y*m.e4)/466)+y*(x**2+y**2-2.25)*m.sin((4*m.pi*x*m.e4)/466)+3*y*m.cos((4*m.pi*x*m.e4)/466))-31.176, 6*(x**2+y**2)**-1*((1+x**2+y**2)*((x**2+y**2+2.25)*m.cosh((4*m.pi*y*m.e4)/466)+3*x*m.sinh((4*m.pi*y*m.e4)/466))+(1-x**2-y**2)*((x**2+y**2-2.25)*m.cos((4*m.pi*x*m.e4)/466)-3*y*m.sin((4*m.pi*x*m.e4)/466))                         )-42.35)                                                        )

x, y =  fsolve(equations, (1, 1))

print equations((x, y))

ShreeniketJoshi avatar Apr 22 '20 23:04 ShreeniketJoshi