Комментарии •

  • @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 года назад +5

    Amazing video thank you helped me so much in my computational class!

  • @souadmassi7683
    @souadmassi7683 4 года назад +6

    It is a long time, welcome again on RUclips. Please, make more videos on Matlab

  • @AJ-et3vf
    @AJ-et3vf 2 года назад

    Awesome video sir! Thank you!

  • @SS-zq5sc
    @SS-zq5sc Год назад

    thank you very much that was so helpful and well explained.

  • @amirahsalsabila7782
    @amirahsalsabila7782 3 года назад

    Terimakasih bapak

  • @googlegoogle1610
    @googlegoogle1610 2 года назад

    the best explanation ever :)

  • @juliomurillo1850
    @juliomurillo1850 4 года назад +3

    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 года назад +1

      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.

  • @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

  • @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

  • @alvarocarrillo4410
    @alvarocarrillo4410 4 года назад +2

    How can I do it but for the unreal roots?

    • @mechtutorcom
      @mechtutorcom 4 года назад +6

      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.

  • @bidhayakgoswami2564
    @bidhayakgoswami2564 3 года назад +2

    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

  • @amalabdallah568
    @amalabdallah568 3 года назад +2

    That was really useful 🧡👍🏼

    • @dellpi3911
      @dellpi3911 3 года назад

      ruclips.net/video/kxftUHk7NDk/видео.html

  • @ccuuttww
    @ccuuttww 3 года назад

    how do u add the bee sound every time u run the program

  • @fairouzbadis7975
    @fairouzbadis7975 4 года назад

    YOU SAVED ME

  • @fahadtufailsahib
    @fahadtufailsahib 11 месяцев назад

    How to solve an equation with logx

  • @biswarajpalit
    @biswarajpalit 4 года назад +2

    Zoom ur code...really appearing small

  • @Dusadof
    @Dusadof 2 года назад

    What if I have 7 nonlinear equations

  • @kaasbaas5906
    @kaasbaas5906 3 года назад +1

    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

  • @ulisesalejandrogutierrezsa8334
    @ulisesalejandrogutierrezsa8334 3 года назад

    ♥♥♥♥♥♥♥♥♥♥♥♥♥♥

  • @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)))