Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python system of nonlinear equations

import scipy.optimize as opt
from numpy import exp

def f(variables) :
    (x,y) = variables
    first_eq = x + y**2 - 4
    second_eq = exp(x) + x*y - 3
    return [first_eq, second_eq]

solution = opt.fsolve(f, (0.1, 1)) # fsolve(equations, X_0)
print(solution)

# [ 0.62034452  1.83838393]
Comment

PREVIOUS NEXT
Code Example
Python :: discord.py get a bot online 
Python :: python check if all dictionary values are False 
Python :: python convert int to bool 
Python :: take two numbers as inout in single line in python 
Python :: is alphabet python 
Python :: python windows take screenshot pil 
Python :: python class get attribute by name 
Python :: kivy changing screen in python 
Python :: how to add headings to data in pandas 
Python :: pathlib recursive search 
Python :: django import settings variables 
Python :: number of columns with no missing values 
Python :: how to set gui position tkinter python 
Python :: how to calculate mean in python 
Python :: colored text python 
Python :: remove all of same value python list 
Python :: python print without space 
Python :: leap year algorithm 
Python :: drop second column pandas 
Python :: normalize = true pandas 
Python :: python csv add row 
Python :: select text in a div selenium python 
Python :: Difference between end and sep python 
Python :: display entire row pandas 
Python :: drop na in pandas 
Python :: display result in same page using flask api 
Python :: python delete header row 
Python :: matplotlib show percentage y axis 
Python :: save timestamp python 
Python :: python disable warning deprecated 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =