# Looking for a set of symbolic algebra Java classes

**URL:** <https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597>\
**Category:** Factual Questions\
**Created:** [December 28, 2010, 1:58pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597 "2010-12-28T13:58:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agent\_Foxtrot](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Agent\_Foxtrot](https://boards.straightdope.com/u/Agent_Foxtrot)\
**Post date:** [December 28, 2010, 1:58pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/1 "2010-12-28T13:58:01Z")

</div>

I’m working on a physics engine in Java for my own enrichment and I need a set of Java classes which would allow me to perform symbolic computation. I’ve looked on the internet and the only packages I’ve found so far are extremely large and have pretty specific applications. Does anyone know of a small, straightforward algebraic/calculus Java package for general use? Thanks.

---

<div class="post-metadata">

**Author:** ![Digital\_Stimulus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Digital\_Stimulus](https://boards.straightdope.com/u/Digital_Stimulus)\
**Post date:** [December 28, 2010, 8:39pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/2 "2010-12-28T20:39:21Z")

</div>

I must be unfamiliar with your math terminology, 'cuz I always figure that _every_ programming language (of which I’m aware, anyway) is capable of “symbolic algebra”. Even prolog, for instance. 🙂 So, I’m asking for clarification as to what you’re looking for.

The only higher math package not found in the native Java classes that I’ve used personally is [JAMA](http://math.nist.gov/javanumerics/jama/) (JAva MAtrix package). I don’t think it’s what you’re looking for; the reason I mention it is that there are links at the bottom of that page that may be helpful…

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [December 29, 2010, 5:46am UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/3 "2010-12-29T05:46:57Z")

</div>

Are you required to do this in Java? That’s about the last language I’d choose for doing symbolic computation.

> [@Digital\_Stimulus](#):
>
> I must be unfamiliar with your math terminology, 'cuz I always figure that _every_ programming language (of which I’m aware, anyway) is capable of “symbolic algebra”.

[Symbolic computation](http://en.wikipedia.org/wiki/Symbolic_computation) refers to manipulating mathematical expressions as expressions, not numerically.

---

<div class="post-metadata">

**Author:** ![Digital\_Stimulus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Digital\_Stimulus](https://boards.straightdope.com/u/Digital_Stimulus)\
**Post date:** [December 29, 2010, 2:29pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/4 "2010-12-29T14:29:49Z")

</div>

> [@ultrafilter](#):
>
> [Symbolic computation](http://en.wikipedia.org/wiki/Symbolic_computation) refers to manipulating mathematical expressions as expressions, not numerically.

Ah, thank you. I kinda figured it was my ignorance showing.

---

<div class="post-metadata">

**Author:** ![Agent\_Foxtrot](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Agent\_Foxtrot](https://boards.straightdope.com/u/Agent_Foxtrot)\
**Post date:** [December 29, 2010, 6:31pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/5 "2010-12-29T18:31:01Z")

</div>

> [@ultrafilter](#):
>
> Are you required to do this in Java? That’s about the last language I’d choose for doing symbolic computation.
> 
> [Symbolic computation](http://en.wikipedia.org/wiki/Symbolic_computation) refers to manipulating mathematical expressions as expressions, not numerically.

I’m using Java because I know it and want to get better at it. I guess I could learn another language to do this, but that would defeat the purpose of the exercise I created for myself.

What language would you suggest?

---

<div class="post-metadata">

**Author:** ![Digital\_Stimulus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Digital\_Stimulus](https://boards.straightdope.com/u/Digital_Stimulus)\
**Post date:** [December 29, 2010, 9:31pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/6 "2010-12-29T21:31:12Z")

</div>

> [@Agent\_Foxtrot](#):
>
> I’m using Java because I know it and want to get better at it.

I was gonna mention this, but didn’t think it would be very useful.

You could look for software with Java bindings (akin to what [JPL](http://www.swi-prolog.org/packages/jpl/) does for SWIProlog). Perhaps a “heavy-duty” package that you’ve already considered and passed over would supply such functionality.

Failing that, and if you’re _really_ intent on learning more Java functionality, you could look for software that you can access via [JNI](http://en.wikipedia.org/wiki/Java_Native_Interface). I’m not recommending it, mind you, but it’s a useful thing to be able to do.

Sorry, I’m still no help in suggesting actual software…

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [December 29, 2010, 10:01pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/7 "2010-12-29T22:01:27Z")

</div>

> [@Agent\_Foxtrot](#):
>
> I’m using Java because I know it and want to get better at it. I guess I could learn another language to do this, but that would defeat the purpose of the exercise I created for myself.
> 
> What language would you suggest?

Java is a general-purpose programming language, but it’s really geared towards systems and applications programming. If there’s a package out there that already does this stuff, you could use that, but if not, you should look into Mathematica or the open source alternatives. As a beginning programmer, you do not want to be doing this stuff yourself.

---

<div class="post-metadata">

**Author:** ![Agent\_Foxtrot](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Agent\_Foxtrot](https://boards.straightdope.com/u/Agent_Foxtrot)\
**Post date:** [December 30, 2010, 3:40pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/8 "2010-12-30T15:40:45Z")

</div>

> [@ultrafilter](#):
>
> Java is a general-purpose programming language, but it’s really geared towards systems and applications programming. If there’s a package out there that already does this stuff, you could use that, but if not, you should look into Mathematica or the open source alternatives. As a beginning programmer, you do not want to be doing this stuff yourself.

I’ll look into learnin Mathematica. Thanks. 🙂

By the way, I’m not a beginning programmer. I’m a third-year computer science major. 😉

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [December 30, 2010, 3:45pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/9 "2010-12-30T15:45:56Z")

</div>

> [@Agent\_Foxtrot](#):
>
> By the way, I’m not a beginning programmer. I’m a third-year computer science major. 😉

You’re not even a beginning programmer, then. 😛

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [December 30, 2010, 7:34pm UTC](https://boards.straightdope.com/t/looking-for-a-set-of-symbolic-algebra-java-classes/565597/10 "2010-12-30T19:34:30Z")

</div>

> [@Agent\_Foxtrot](#):
>
> By the way, I’m not a beginning programmer. I’m a third-year computer science major. 😉

You really need experience with multiple languages that are significantly different before you can claim not to be a beginner. Learning Mathematica will put you a long way down that road.
