# commons-issues mailing list archives

##### Site index · List index
Message view
Top
From Bernhard Grünewaldt (JIRA) <j...@apache.org>
Subject [jira] Commented: (MATH-250) Solver for rational and other equations
Date Thu, 19 Mar 2009 09:15:50 GMT
```
[ https://issues.apache.org/jira/browse/MATH-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683380#action_12683380
]

Bernhard Grünewaldt commented on MATH-250:
------------------------------------------

Ok, nice.

How can I contribute to nabla?
Can give me a task of what to do?

And how about having a parser that can parse the "standard mathematical notation" into java
form.
It would be nice to have a method like "eval(...)" that parses the string and creates a java
equation.
Using cglib, velocity or whatever.

> Solver for rational and other equations
> ---------------------------------------
>
>                 Key: MATH-250
>                 URL: https://issues.apache.org/jira/browse/MATH-250
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Bernhard Grünewaldt
>            Priority: Minor
>             Fix For: 2.0
>
>
> In addition to the existing PolynomialFunction class a RationalFunction class would be
a good idea.
> http://en.wikipedia.org/wiki/Rational_function
> For package:
> http://commons.apache.org/math/userguide/analysis.html
> The goal should be to calculate derivates of functions like:
> f(x) = [ x + 2*x^3 ] / [ x -1]
> or
> f(x) = [ e^x + 2*x ] / [ cos(x) ]
> Therefore it would be best to have classes for all the inner equations like "e", "sin,cos,tan
...", "sqrt", a.s.o
> These inner equations would then be put together to an outer equation.
> This outer equation can then be derived using the "chain rule", "product rule" and all
other rules for getting the derivative.
> One of this inner classes is the existing PolynomialFunction class from the analysis
package.
> For easy rational functions the outer equation is of the form:
> f(x) = PolynomialFunction / PolynomialFunction
> Now just use the rule to derive it:
> f(x) = g(x) / h(x)   =>  f'(x) = [h(x) * g'(x) - g(x) * h'(x) ] / [ h(x) ]^2
> Here we can use the inner derivate of the PolynomialFunction by calling PolynomialFunction.derivative()
> That's the idea, now the topics that have to be discussed:
> 1. We should have a parser that can parse the "standard mathematical notation" into a
tree of function classes.
>     http://en.wikipedia.org/wiki/Mathematical_notation
> 2. A class for every type of function should be implemented with an interface that has
the common methods like:
>     subtract(Object o)
>     multiply(Object o)
>     divide(Object o)
>     derivative(Object o)
>     a.s.o
> 3. We need to implement Excptions that are thrown for sqrt(-1) a.s.o
> 4. We need a mother class that implements all the complex derivation rules like:
>     http://en.wikipedia.org/wiki/Chain_rule
>     http://en.wikipedia.org/wiki/Product_rule
>     a.s.o.
>     the sub classes the PolynomialFunction or the RationalFunction just implement their
derivation rules, but the mother class implements the complex rules to derivate a complex
structure of any type of equation by using the inner derivation rules and the complex chain
rules a.s.o

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

```
Mime
View raw message