Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

elis-cool

Cubics...

This topic is 6014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I have a test soon and I need to know some stuff How do you find the turning points of a cubic in the form of: ax^3+bx^2+cx+d [edit]I think you have to differentiate or something then the second derivitive tests for the max or min...[/edit] And how do you find the roots using the Bisection method and the Newton-Raphson method? CEO Plunder Studios [edited by - elis-cool on June 24, 2002 12:24:34 AM]

Share this post


Link to post
Share on other sites
Advertisement
Want to find turning points of f(x) = ax^3 + bx^2 + cx + d, ie, want to find where the first derivative is zero.

f'(x) = 3ax^2 + 2bx + c
solve f'(x) = 0, use quadratic formula
x = (-2b +- sqrt(4b^2 - 12ac)) / (6a)
x = (-b +- sqrt(b^2 - 3ac)) / (3a)


EDIT: you want to find the roots, too.

x^3 + ax + b = 0 (all cubics can be simplified to this)

Suppose x = s - t

(s - t)^3 + a(s - t) + b = 0
s^3 - 3s^2t + 3st^2 - t^3 + as - at + b = 0
s^3 - t^3 + b + (s - t)(a - 3st) = 0


We have some flexibility over the values of s and t. Suppose s^3 - t^3 + b = 0 and a - 3st = 0. Then the above equation certainly holds true. Now:

s = a/(3t)
a^3/(27t^3) - t^3 + b = 0
-t^6 + bt^3 + a^3/27 = 0


The rest shouldn't be too hard

[edited by - Beer Hunter on June 25, 2002 6:57:03 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!