Newton-Raphson Method | Numerical Computing in Python

  Рет қаралды 59,506

mechtutor com

mechtutor com

4 жыл бұрын

Here's my NumPy mini-course for an 80% discount. Use coupon code: NUMPY80 at rb.gy/pk99l ... I hope you'll find it useful.
Theory and coding of Newton-Raphson method to solve a nonlinear equation.
** For the full course, visit: www.udemy.com/course/programm...
Visit my new Python course webpage: mechtutor.thinkific.com/cours...

Пікірлер: 29
@mechtutorcom
@mechtutorcom 10 ай бұрын
If you are interested, here's a free NumPy mini-course link: rb.gy/pk99l ... I hope you'll find it useful.
@MathPhysicsFunwithGus
@MathPhysicsFunwithGus 3 жыл бұрын
Amazing video thank you helped me so much in my computational class!
@souadmassi7683
@souadmassi7683 4 жыл бұрын
It is a long time, welcome again on KZbin. Please, make more videos on Matlab
@AJ-et3vf
@AJ-et3vf 2 жыл бұрын
Awesome video sir! Thank you!
@ascorbic_b
@ascorbic_b Жыл бұрын
You are the best man in the world. I spent one week for doing this shit. I love so much. Thank you
@bidhayakgoswami2564
@bidhayakgoswami2564 3 жыл бұрын
Once I wrote this function to find the zero of any continuous and differentiable function def newton(fun,y): #A function_name and an initial guess is provided as arguments of the function 'newton' n=len(y);epsilon=10**(-12); e=np.eye(n)*epsilon; fval=fun(y);i=1 while (np.linalg.norm(fval))>1e-10 and i
@SS-zq5sc
@SS-zq5sc Жыл бұрын
thank you very much that was so helpful and well explained.
@googlegoogle1610
@googlegoogle1610 2 жыл бұрын
the best explanation ever :)
@amirahsalsabila7782
@amirahsalsabila7782 3 жыл бұрын
Terimakasih bapak
@amalabdallah568
@amalabdallah568 3 жыл бұрын
That was really useful 🧡👍🏼
@dellpi3911
@dellpi3911 3 жыл бұрын
kzbin.info/www/bejne/oanJpYh-oJyBes0
@fairouzbadis7975
@fairouzbadis7975 4 жыл бұрын
YOU SAVED ME
@juliomurillo1850
@juliomurillo1850 4 жыл бұрын
Dear mechtutor, I would like to apply the same code, but for a list of elements, It means my initial values are X0 = {1,2,3,4,5,6} and my functions give me a result for each of these initial values it means f = f(x0), same my derivative f'=f'(x0). So as you see at the end I will get a list of values. Do you think is possible?
@AJ-et3vf
@AJ-et3vf 2 жыл бұрын
Yes, it is possible. You will have to modify your code such that if a list of values were given, the code would loop through the values given. You would also need to allocate for another list/array where you would store the roots that were found. Your use case is interesting, but most root-solver codes don't have a "vectorized" implementation as the one you're asking. They only take one input guess at a time. So if you want to find the root for a given initial values, just put the Newton solver function inside a loop that loops through your given initial values.
@fahadtufailsahib
@fahadtufailsahib 11 ай бұрын
How to solve an equation with logx
@alvarocarrillo4410
@alvarocarrillo4410 4 жыл бұрын
How can I do it but for the unreal roots?
@mechtutorcom
@mechtutorcom 4 жыл бұрын
Because this method works only in the real domain, you cannot use it for complex roots. The alternative way is to use the function Scipy.optimize.fsolve() Thanks for your comment.
@ccuuttww
@ccuuttww 3 жыл бұрын
how do u add the bee sound every time u run the program
@biswarajpalit
@biswarajpalit 4 жыл бұрын
Zoom ur code...really appearing small
@mechtutorcom
@mechtutorcom Жыл бұрын
Hi friends. I have launched a new course. To learn about it, click here please: mechtutor.thinkific.com/courses/python-for-science-and-engineering
@Dusadof
@Dusadof 2 жыл бұрын
What if I have 7 nonlinear equations
@ulisesalejandrogutierrezsa8334
@ulisesalejandrogutierrezsa8334 3 жыл бұрын
♥♥♥♥♥♥♥♥♥♥♥♥♥♥
@kaasbaas5906
@kaasbaas5906 3 жыл бұрын
any laptopassignment 2 calculusers?
@TPLCompany
@TPLCompany 3 жыл бұрын
did you just like your own comment?
@kaasbaas5906
@kaasbaas5906 3 жыл бұрын
@@TPLCompany i did not, imagine having so little to do in life, till the point where you mock others for doing so
@TPLCompany
@TPLCompany 3 жыл бұрын
@@kaasbaas5906 damn
@thshm2938
@thshm2938 Жыл бұрын
import numpy as np from scipy.misc import derivative def f(x): return 2*x**3-9.5*x+7.5 x1 = 2 x = np.linspace(0.2, 2, 500) m = derivative(f, x1, dx=0.1) for n in range(20): xn = x1 -( f(x1) / m) print(xn) x1 = xn
@shardulpingale2431
@shardulpingale2431 Жыл бұрын
def newton_approximation(f,appr): x = sym.Symbol('x') fprime = sym.diff(f,x) f = sym.lambdify(x,f) fprime = sym.lambdify(x,fprime) steps = 0 x = appr for i in range(0,100): new_x = x - (f(x) / fprime(x)) steps+=1 if round(x,8) == round(new_x, 8): break else: x = new_x return new_x, steps x = sym.Symbol('x') f = x**2 - 104 print("Total steps taken in order to approximate the root {0} are {1}".format(*newton_approximation(f,3)))
@shardulpingale2431
@shardulpingale2431 Жыл бұрын
Do not forget to "import sympy as sym"
Monte Carlo Integration In Python For Noobs
15:32
Andrew Dotson
Рет қаралды 149 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 75 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 10 МЛН
One moment can change your life ✨🔄
00:32
A4
Рет қаралды 18 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 5 МЛН
The Newton-Raphson Method(NEW!!)| ExamSolutions
14:59
ExamSolutions
Рет қаралды 36 М.
Unlocking your CPU cores in Python (multiprocessing)
12:16
mCoding
Рет қаралды 297 М.
Newton-Raphson Formula And Derivation | Part 1 of 2
5:41
Alpha Theta Epsilon
Рет қаралды 66 М.
How To Code A Quantum Computer
20:42
Lukas's Lab
Рет қаралды 527 М.
The Man Who Solved the World’s Most Famous Math Problem
11:14
Newsthink
Рет қаралды 654 М.
The Coin Flip Game that Stumped Twitter: Alice HH vs Bob HT
28:57
Nonlinear System by NewtonRaphson - Example
6:35
Christi Patton Luks
Рет қаралды 58 М.
Newton's method for solving nonlinear systems of Algebraic equations
18:37
threading vs multiprocessing in python
22:31
Dave's Space
Рет қаралды 566 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 75 МЛН