Python Forum
How to solve difficult non-linear equations?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to solve difficult non-linear equations?
#1
I'm a beginner and trying to solve this system of non-linear equations, would appreciate any guidance. The attached image shows the system of equations I want to solve:
Image of equations

This is the code I tried:

from scipy.optimize import fsolve import math as m import numpy as np

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

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

print (equations((x, y)))
Reply


Messages In This Thread
How to solve difficult non-linear equations? - by shreeniket - Apr-21-2020, 10:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  difficult string conversion need help Pir8Radio 3 1,091 Nov-27-2022, 06:15 PM
Last Post: Gribouillis
  SOlving LInear Equations in Python(Symoy, NUmpy) - Coefficient Problem quest 3 1,772 Jan-30-2022, 10:53 PM
Last Post: quest
Heart how to solve complex equations in python HoangF 3 2,838 Dec-26-2021, 07:04 PM
Last Post: HoangF
Question Help with code to solve polynomials equations hiviera 1 1,816 Jul-31-2021, 01:56 AM
Last Post: hiviera
  creating simplex tableau pivot program easy or difficult for a beginner in Python? alex_0 2 2,609 Mar-31-2021, 03:39 AM
Last Post: Larz60+
  Solve system of equations Sancho_Pansa 19 9,046 Oct-27-2020, 08:15 AM
Last Post: Sancho_Pansa
  How to solve equations, with groups of variables and or constraints? ThemePark 0 1,699 Oct-05-2020, 07:22 PM
Last Post: ThemePark
  Solve a system of linear equations with binary variables lopeslimagabriel 3 2,536 Sep-24-2020, 07:09 AM
Last Post: scidam
  Programming Difficult math in Python Huntern 6 4,819 Oct-17-2019, 06:32 AM
Last Post: Huntern
  Very difficult challenge for me cristfp 1 2,771 Apr-01-2019, 08:45 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020