Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

lopus Group Title

i have a question in the code newton method say that answer is: >>> poly =(-13.39, 0.0, 17.5, 3.0, 1.0) #x4 + 3.0x3 + 17.5x2 - 13.39 >>> x_0 = 0.1 >>> epsilon = .0001 >>> print compute_root(poly, x_0, epsilon) (0.80679075379635201, 8) my answer is: (0.806790753796352, 7) why 8?

  • 2 years ago
  • 2 years ago

  • This Question is Closed
  1. lopus Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    this is my code: http://dpaste.com/790245/

    • 2 years ago
  2. xilinix Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    yo creo que tu codigo esta bueno, porque haciendo el seguimiento si se cuenta desde 0 llega hasta 6 y si se itera desde 1 es hasta 7

    • 2 years ago
  3. xilinix Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    (3.7760990539788537, 1) (2.513165507392411, 2) (1.6266862300590645, 3) (1.0874006562988667, 4) (0.8541676766719186, 5) (0.8084748052947073, 6) (0.806790753796352, 7)

    • 2 years ago
  4. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    it took 8 iterations instead of 7. was epsilon the same? is anything different in the code

    • 2 years ago
  5. lopus Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    yes epsilon is the same

    • 2 years ago
  6. lopus Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    i think found the solution: def compute_root(poly,x_0,epsilon): i=1 while epsilon<=abs(Evaluate_poly(poly,x_0)): derive=compute_derive(poly) x1= x_0-(Evaluate_poly(poly,x_0)/Evaluate_poly(derive,x_0)) i+=1 # change that why? x_0=x1 result=(x1,i) print result

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.