943,723 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 7998
  • Java RSS
May 27th, 2009
1

Applying mathematical equations to JAVA code

Expand Post »
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
Similar Threads
Reputation Points: 19
Solved Threads: 20
Posting Whiz in Training
joshmo is offline Offline
280 posts
since Oct 2007
May 27th, 2009
0

Re: Applying mathematical equations to JAVA code

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
bluerose is offline Offline
17 posts
since Apr 2009
May 28th, 2009
0

Re: Applying mathematical equations to JAVA code

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?
Reputation Points: 19
Solved Threads: 20
Posting Whiz in Training
joshmo is offline Offline
280 posts
since Oct 2007
May 28th, 2009
0

Re: Applying mathematical equations to JAVA code

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.
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
May 28th, 2009
0

Re: Applying mathematical equations to JAVA code

Click to Expand / Collapse  Quote originally posted by joshmo ...
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.

Java Syntax (Toggle Plain Text)
  1. double theta = 0.5;
  2. double cosinetheta = Math.cos (theta);

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

Java Syntax (Toggle Plain Text)
  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.
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,372 posts
since Jan 2008
May 28th, 2009
0

Re: Applying mathematical equations to JAVA code

It all depends, if you want a numerical analysis approach it is a piece of piss. i.e using the trapezium rule for integration.

Something more than that, such as mathematica's engine would be a lot more involved.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
May 28th, 2009
0

Re: Applying mathematical equations to JAVA code

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.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 21st, 2010
0

Unceartanity equation

how to solve uncertanity quation with the hep of java
Reputation Points: 10
Solved Threads: 0
Newbie Poster
GATUM is offline Offline
1 posts
since Jun 2010
Jun 21st, 2010
0
Re: Applying mathematical equations to JAVA code
Thanks for your sharing! I have learnt so much from your post!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ghdfans2010 is offline Offline
6 posts
since Jun 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Keeping Track of Data to save
Next Thread in Java Forum Timeline: Chi square test





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC