Applying mathematical equations to JAVA code

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Oct 2007
Posts: 280
Reputation: joshmo is an unknown quantity at this point 
Solved Threads: 19
joshmo joshmo is offline Offline
Posting Whiz in Training

Applying mathematical equations to JAVA code

 
0
  #1
May 27th, 2009
hello. I would like to know how I can make out a Java code from a given mathematical equation like differentiation equations, summation and integration
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 17
Reputation: bluerose is an unknown quantity at this point 
Solved Threads: 1
bluerose bluerose is offline Offline
Newbie Poster

Re: Applying mathematical equations to JAVA code

 
0
  #2
May 27th, 2009
You need to understand the logic of those equation first and use the javadocs (api) to help you with the functions available to solve mathematical problems.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 280
Reputation: joshmo is an unknown quantity at this point 
Solved Threads: 19
joshmo joshmo is offline Offline
Posting Whiz in Training

Re: Applying mathematical equations to JAVA code

 
0
  #3
May 28th, 2009
Ofcourse I can get to understand the logic..What I want to know is how i can get, say a given equation to integrate or differentiate a number, then change that logic, to JAVA code..is there any application or tool that can do this?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,642
Reputation: BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold 
Solved Threads: 206
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso

Re: Applying mathematical equations to JAVA code

 
0
  #4
May 28th, 2009
Probably, do a google search for them. If you're talking about simple differentiation and integration (i.e. power rule) then it is trivial anyway, and so is chain rule for differentiation. Why don't you mention the specific formula you're trying to code and then show some progress or ideas etc on it.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,837
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 503
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: Applying mathematical equations to JAVA code

 
0
  #5
May 28th, 2009
Originally Posted by joshmo View Post
Ofcourse I can get to understand the logic..What I want to know is how i can get, say a given equation to integrate or differentiate a number, then change that logic, to JAVA code..is there any application or tool that can do this?
Depends on the equation. A lot of equations are done for you and are included in Math.

  1. double theta = 0.5;
  2. double cosinetheta = Math.cos (theta);

Some equations you'll have to write out or combine with Math functions.

  1. double x = 0.5;
  2. double y = Math.cos (x) + Math.pow (theta, 1.5) - 2 * x + 6.3;

[edit]
And Math is just one of many classes you can use. There is all sorts of stuff out there, both from Sun and from individuals who have posted work.
[/edit]
Last edited by VernonDozier; May 28th, 2009 at 2:44 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Applying mathematical equations to JAVA code

 
0
  #6
May 28th, 2009
It all depends, if you want a numerical analysis approach it is a piece of ****. i.e using the trapezium rule for integration.

Something more than that, such as mathematica's engine would be a lot more involved.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,721
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 501
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Applying mathematical equations to JAVA code

 
0
  #7
May 28th, 2009
You may use mathematics open source API for your purpose. Mathemaca, /Link is a toolkit that integrates Mathematica and Java. http://reference.wolfram.com/mathema...w-summary.html

J/Link JavaDoc Documentation

http://www.wolfram.com/solutions/mat...mentation/api/


Open source :

http://ojalgo.org/what.html
Last edited by adatapost; May 28th, 2009 at 6:12 am.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC