Solve Nonlinear Equations with Python

preview_player
Показать описание
This tutorial demonstrates how to set up and solve a set of nonlinear equations in Python using the SciPy Optimize package.
Рекомендации по теме
Комментарии
Автор

is that guess (1, 1) center of the circle?

sunillamichhane
Автор

Can you make a video on how to solve more than three coupled non linear equations? I solved for three equations using sympy and I got the solution but for more than three equations it is showing error.

msjahan
Автор

Thank you,
I want to solve multiplicative exponential models. I know the base values and the value of f, I want to find the value of exponents. the form is a^x*b^y*c^z = f. I have the value of a, b and c. the required variables are exponents (x, y, z). Please do have video on python to solve these type of equations?
Thank you,

kedralawabela
Автор

You need DOZENS more videos on JUST solving systems of nonlinear equations.
NO differential equations. NO optimization. Because, I have cut & pasted your code into my Python:
I get syntax error messages all over the place.

theultimatereductionist
Автор

Hello Sir,

Thank you once again.
Please do you have videos on python to solve optimization equations with Lagrange multiplier? Or what python libraries I should use to solve such problems?

kedralawabela
Автор

Hello sir,

I am looking for Genetic Algorithms codes or videos to solve optimization problems. Could you help me please?

kedralawabela
Автор

Awesome tutorial! Lucid and very helpful

AJ-etvf
Автор

Thanks for your amazing video. I have got a question. This function only gives a single answer for the equations while a set of equations might have numerous answers. Could you please explain how to solve this issue ?

javadjeddizahed
Автор

I need to find the exact solution for the 4 equations. Is it possible to find the solution without any initial guess?

msjahan
Автор

Hello sir, thank you for this elustration
I have a question about optimizing a set of formulas (equations).
Actually, I have a program with a set of nested equations whose I need to find the optimum of two variables
With your example, the number of variables is equal to the number of equations, whereas in my case the number of variables is 2 and the number of equations is much larger (about 20), one of which is nested in the others.
Thank you for your answer

hassenmedjahed
Автор

Thank you, I will look on the site you sent me
to answer your question :
the condition is to minimize these two terms
abs [(NbrS1-nbrs) / nbrs] <= 0.00001
and
abs [(Capa1-Capa) / Capa] <= 0.0001

hassenmedjahed
Автор

Dear sir,

thank you very much for this tutorial!

I'm very new in coding and for my master thesis I need a solution to find the point, where 3 circles coincide.
I have 3 equations in the format of (x-a)² + (y-b)² = (r-c)², where [a, b, c] are the distances of the center of each circle to my reference point.

Could you please share with me some of your insight, how I should approach this problem?

I'd very appreciate that!

Sincerely!

benbell
Автор

It's a great video and explanation! Thank you very much!

oktabramantio
Автор

Thank you sir, the example is very helpful!
Can I know how do we decide the zGuess's values ?

dodogo
Автор

many thanks for your video. I have a question If we have two equations like:
F(1)=x^2+y^2+R
F(2)=x*y+2R
and R=(x+y)/y

how then we can solve this? as here R is not another function just a parameter to make the function look more simple.

halehallamehhaery
Автор

Thanks for your help
Here is what I would like to achieve with my script
The objective is to calculate the optimal value of PC and F which allows to verify the contrait
Do you think there is a solution with python
thank you


# constant
DIC=1510# constant
loC=1125 # constant
Surface=pi*DEC*loC*1e-6# constant
RhoC=1e-5 # constant
Coef_rhoT=0 # constant
Tchauffe=0# constant
BSat=0 # constant
EtaMag='amag' # constant
mur=1# constant
mu0=4e-7*pi# constant
DII=1950 # constant
loI =1125# constant
Coef_Remp=0.5# constant
RhoCu=1.72e-8 # constant
SelfPara=0# constant
Rap_Trans1=1# constant
Tens_Capa=480 # constant
NbrS =8 # constant
Capa= 650# constant
Capa1=0 # initiale varlue


PC=0.01 # Initial value of variable
F=3 # Initial value of variable
NbrS1=0 # Initial value
Qcon=0 #Initial value
EC=(DEC-DIC)/2 # Constant
REL=(DII-DEC)/(2*loI)# Constant
VindCon=Tens_Capa/Rap_Trans1 # Constant
if REL<0.76:
CoefCorH=exp(-0.91*REL) # Constant
else:
CoefCorH=0.5 #Constant
if loI>loC:
lochauffe=loC #Constant
else:
lochauffe=loI #Constant
Constant
# Constant
# Constant
if DIC<=0:
Fopti = None
else:
Fopti= #Constant
#sub variable 1
#sub variable 2
Coef_transPA=fct(EC/PeauC, EC/DEC, mur, 1)# sub variable 3
Coef_transPR=fct(EC/PeauC, EC/DEC, mur, 2)# sub variable 4
R_Hint_Hext=fct(EC/PeauC, EC/DEC, mur, 3)# sub variable 5
variable 6
if DEC<=0:
HInt=0
else:
HInt=HExt*R_Hint_Hext #sub variable 7
sub variable 8
Ren=PC/(PC*+Pind) # sub variable 9
PT=PC+Pind # sub variable 10
# sub variable 11
#sub variable 12
if DIC<=0:
QeInt=0
else:
# sub variable 13
QT=Pind+QeInt+QeExt+QC+Qcon #sub variable 14
# sub variable 15
# sub variable 16
# sub variable 17
VCon=VindCon-Vind # sub variable 18
NbrS1=(HExt*loI*1e-3)/Iind # sub variable 19
# sub variable 20

if abs((NbrS-NbrS1)/NbrS)<=0.001 and
break # it ok

print (PC,

hassenmedjahed
Автор

You should NOT be doing "import *". Readers need to know/see where your functions are coming from.

PaulNahay
visit shbcf.ru