Math question

This is a discussion on Math question within the A Brief History of Cprogramming.com forums, part of the Community Boards category; No, I am not looking for a code solution, I am looking for where to go to get a "tutorial" ...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    5

    Math question

    No, I am not looking for a code solution, I am looking for where to go to get a "tutorial" on how to solve the attached equation.

    Thanks.
    Attached Images Attached Images  

  2. #2
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    what has this got to do with C++ programming?
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    5
    I am attempting to implement it in C++, but have not touched this level of math in at least a decade. I don't even know what to call this type of formula. I don't want to get a C++ solution. I am looking for a bord that might discuss this type of math or how discussion/tutorial on implementing such math in C++

  4. #4
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    well, I'd start by reading up on polynomial equations
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  5. #5

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,415
    Moved to General Discussions.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    How? Matlab or mathematica

  8. #8
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    One common way to find the roots of an arbitrary polynominal is to construct a matrix with the desired roots as eigenvalues (search for "companion matrix"). Then use an iterative way ("power iteration" is simple, "QR algorithm" is somewhat more advanced, but popular) to find the eigenvalues.

    You can also try to find a root using Newton's method and then divide the polynominal by (x-root) to reduce it to degree 4. There will always be at least one real root.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  9. #9
    Registered User
    Join Date
    Sep 2001
    Posts
    752
    Quote Originally Posted by leonm54 View Post
    No, I am not looking for a code solution, I am looking for where to go to get a "tutorial" on how to solve the attached equation.

    Thanks.
    Viola!
    Code:
    float solve_poly (float a0, float a1, float a2, float a3, float a4, float a5, float x) {
       return a0 + a1 * x + a2 * x * x + a3 * x * x * x + a4 * x * x * x * x + a5 * x * x * x * x * x;
    }
    Honestly... 'solve' is a very vague word.
    Callou collei we'll code the way
    Of prime numbers and pings!

  10. #10
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Quote Originally Posted by QuestionC View Post
    Honestly... 'solve' is a very vague word.
    Is it?´He said "how to solve the attached equation". I think it is pretty clear what he meant.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another exercise question
    By luigi40 in forum C# Programming
    Replies: 3
    Last Post: 11-28-2005, 02:52 PM
  2. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 08:22 PM
  3. More a math question than an algorithm
    By Gustaff in forum C Programming
    Replies: 1
    Last Post: 01-28-2003, 12:10 PM
  4. Stupid Math Question....really stupid
    By ToLazytoSignIn in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-16-2003, 06:36 PM
  5. Math Question
    By DarkEldar77 in forum C++ Programming
    Replies: 2
    Last Post: 09-17-2001, 12:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21