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

shinda Group Title

What code would I use to get the positive root of a quadratic equation?

  • 2 years ago
  • 2 years ago

  • This Question is Open
  1. across Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    There are several numerical methods that accomplish this task; try looking into Newton's method.

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

    why not use an if ans to the quadratic eq is positive use it otherwise ignore it?

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

    try it this way 1) function that computes the roots 2) filter out the positive one`s for the 1st part i remember that`s there a problem set that covers this part using newton`s method check that out...

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

    Do you remember the old quadratic equation from grade school?\[x =\frac{ \pm \sqrt{b ^{2}-4ac}\ }{2a }\] Because of the plus or minus, two roots will be given. However, it is very important to note that zero, one, or both of the roots could be positive. If I were to write a program given your specifications, I would create a function that plugs an x into the quadratic formula for a given a, b, and c, and then return the positive roots (if any). Let me know if you have any more questions!

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