Python doesn't come with sin as a function, you need to get it from a library. In the code here, I am using numpy. The line "import numpy as np" then provides access to the numpy functions: np.sin, etc. If I would have done "from numpy import *" or "from numpy import sin" then we could just write sin(x) instead of np.sin(x), but what is done in the code is generally the preferred approach. You can also get sin from the math library: from math import sin.
@@ignitebyuedu thanks, I understand your explanation but my question is - As I understand, using ‘np’ before sine means we’re asking python to calculate sine of the elements of a numpy array (sine(array elements)) whereas, as far as this particular problem is concerned, we just need sine(of a number), then isn’t math.sin preferable ? Another question - if we take the equations as user inputs on a command terminal , is the user expected to use math or numpy while entering functions like sine, cosine, exponential etc.? Thanks
@@sdu28 np.sin can take a single number or an array. For numerical work, I always us numpy and I cannot remember the last time I bothered with "import math," but it's really up to you.
Nonlinear equation solvers are normally iterative. They require a guess value as a starting point for the iteration. Each iteration ideally improves the solution from the initial value.
You literally explain every step. A perfect teacher for me! Thank you very much.
Thank you for the explanation. It was very usefull for my college project.
Super helpful!! Especially for people like myself who haven't had any formal intro to python but need it for some work!
Thanks a lot!
Thank you, one of the best explanations I have found so far on RUclips.
ME SALVASTE EL RAMO WEON
TE AMO CON LA VIDAAAAAA
I like your format and your example videos thank you.
Thank you so much for this tutorial. Clear and concise. Can you please demonstrate solving a dependent system of non-linear equations with python?
Great video! Helped a lot, thank you!
Lot of thanks!
great
can this problem be solved analytically?
At 9:25, why is the second equation defined as 'np.sin' instead of simply 'sin'?
Python doesn't come with sin as a function, you need to get it from a library. In the code here, I am using numpy. The line "import numpy as np" then provides access to the numpy functions: np.sin, etc. If I would have done "from numpy import *" or "from numpy import sin" then we could just write sin(x) instead of np.sin(x), but what is done in the code is generally the preferred approach. You can also get sin from the math library: from math import sin.
@@ignitebyuedu thanks, I understand your explanation but my question is - As I understand, using ‘np’ before sine means we’re asking python to calculate sine of the elements of a numpy array (sine(array elements)) whereas, as far as this particular problem is concerned, we just need sine(of a number), then isn’t math.sin preferable ? Another question - if we take the equations as user inputs on a command terminal , is the user expected to use math or numpy while entering functions like sine, cosine, exponential etc.? Thanks
@@sdu28 np.sin can take a single number or an array. For numerical work, I always us numpy and I cannot remember the last time I bothered with "import math," but it's really up to you.
What is the significance of the guess value?
Nonlinear equation solvers are normally iterative. They require a guess value as a starting point for the iteration. Each iteration ideally improves the solution from the initial value.