This week's book giveaways are in the Java EE and JavaScript forums. We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line! See this thread and this one for details.

Given two points on a graph (you know, each with a x-coordinate and a y-coordinate) which method could I use to determine the slope of a line between those two points? Which method could I use to determine the distance between those two points? Given three integer coefficients, A, B, C, which method could I use to solve a quadratic function of the form: Ax^2 + Bx + C = 0 ? Given four integer coefficients, A, B, C, D which method could I use to find the derivative of a cube polynomial function: Ax^3 + Bx^2 + Cx + D?

Given two points on a graph (you know, each with a x-coordinate and a y-coordinate) which method could I use to determine the slope of a line between those two points?

If point one has coordinates x1,y1 and point two has coords x2,y2 then the slope is (y2 - y1) / (x2 - x1)

Which method could I use to determine the distance between those two points?

Given three integer coefficients, A, B, C, which method could I use to solve a quadratic function of the form: Ax^2 + Bx + C = 0 ?

Oh dear how embarrassing that I had to look that one up One root is x = [ -B + sqrt( B^2 - 4*A*C) ] / (2*A) The other is x = [ -B - sqrt( B^2 - 4*A*C) ] / (2*A)

Given four integer coefficients, A, B, C, D which method could I use to find the derivative of a cube polynomial function: Ax^3 + Bx^2 + Cx + D?

Yikes... er ... .... hey what's that thing behind you !? .... *RUNS* (hee hee hee) [ March 20, 2004: Message edited by: Carlos Failde ]

derivative function would be 3Ax^2+2Bx+C for each x.

Given four integer coefficients, A, B, C, D which method could I use to find the derivative of a cube polynomial function: Ax^3 + Bx^2 + Cx + D?

Will Carpenter
Greenhorn

Joined: Mar 17, 2004
Posts: 26

posted

0

Thanks Carlos and Chi Lin! (Although I though for sure there would be some methods that did those. You know, something like slope(int a, int b, int c, int d). Now I guess I'll have to do some work. )

There's a proof in number theory that there's no formula for the zeroes of an order-5 polynomial (ie, p(x) = ax^5 + bx^4 + cx^3 + dx^2 + ex + f), or any polynomial of greater order. OK, when I say "formula", I mean a function f(a, b, c, d, e, f) which yields the zeroes to p(x) above. IIRC there are formulae for the zeroes of polynomials of orders 3 and 4, but they're sufficiently complex that in almost all circumstances an approximation is better.