Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Zeros of a Function
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
randint




PostPosted: Fri Dec 30, 2011 9:51 pm   Post subject: Zeros of a Function

This is more of a math question than a computer science one, but close enough, I posted this program that calculates the local minimum and maximum of a cubic function last week, but here is a problem: to do that, you have to find the first derivative of the function (which is easy in Java) then find the root(s) of the derivative. The problem comes in if I want to find the derivative of a quartic (which is a cubic) and find the zeros, what should I do? Factor theorem is not foolproof as it does not work for rational roots even if they are real. But the formulae for higher polynomial roots are too complex and if I mess up one thing, everything else is over, what should I do?

EVEN THE CUBIC FORMULA IS TOO COMPLEX TO RE-CREATE IN JAVA AS IT IS VERY LONG AND HAVE CUBE ROOTS! Math.pow (r, 0.3333) IS NOT SO NICE AFTER ALL!
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: