Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,569

I have a "function parser" that seems to work OK for the Function Grapher and Calculator (try putting in a function and press the "calculate" button - you will see a "Formula Stack")

Do you think the Formula Stack could be used to create an "Integrator" and/or "Differentiator" ... ?

Does anyone have an inclination to try?

It is not a trivial thing, of course. But maybe it is something we could work together on from time to time.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**Devantè****Real Member**- Registered: 2006-07-14
- Posts: 6,400

It sounds good. But I have no idea how to create something like that...

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

I agree with Devente, sounds cool but I'm not sure where to start. I know little about AI programming. If someone here does, maybe they could help...

A differentiater shouldn't be that hard but an integrater? Good luck! I mean sometimes it takes a good bit of ingenuity to solve a problem. For instance, integrating sec x you need to multiply above and below by (sec x + tan x). Theres also the technique where you solve algebraicly for an integral, also there's trigonometric substitution, integration through partial fractions... there's a lot to it!

A logarithm is just a misspelled algorithm.

Offline

**Devantè****Real Member**- Registered: 2006-07-14
- Posts: 6,400

http://integrals.wolfram.com/index.jsp

Offline

**Devantè****Real Member**- Registered: 2006-07-14
- Posts: 6,400

As far as I'm aware, Wolfram Mathworld doesn't yet have a differentiator!

Maybe we can beat them to it if they plan on working on one.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

That probably implies that it's very hard to make one. For one thing, there are lots of different rules for differentiating different functions. You also need to recognise when to use the product, chain and quotient rules as well as sometimes having to rearrange an equation before you differentiate it.

And on top of all that, some functions aren't differentiable anyway. How would we be able to tell the difference between a non-differentiable function and just a function that the program couldn't differentiate? I'm not saying don't try to, I'm sure it would be a fascinating and challenging project, I'm just saying that it will probably be very difficult to get it to work.

Why did the vector cross the road?

It wanted to be normal.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,569

Well, maybe it could just be fun.

Pick some simple rules, work out when they could be used, and how.

Then when we can get those to work, we can think of taking another step.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

It would be fun... for instance it may be good to try to use Object oriented programming. Create a generalized function class and derive all other functions from this class. (inheritance) A class for simple power functions who's member includeds its exponant, its coefficient, and its variable name, a method to differentiate this is easy. getDerivative() it would multiply the exponent by the coefficient and decrease the exponant by 1. An exponential function a^x is easy also. sine and cosine functions easy to get derivative and you can use the quotent rule to calculate the other trig functions. The tricky thing I suppose would be setting up the order of precedence. In otherwords distinguishing between the "inside" and "outside" functions to use the chain rule properly.

Another problem would likely be ending up with long expressions that need to be simplified.

When I get better at programming I may take a crack at it and see how far I get.

*Last edited by mikau (2006-10-21 03:24:16)*

A logarithm is just a misspelled algorithm.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,569

Cool.

Part of the idea would be for several of us to work together on it.

In my experience programmers love to have complete control of what they are doing, so it would be a good idea to divide the project up. Someone could work on turning the user's input into a well-defined data structure (like the "formula stack" I already have), someone else could work on identifying simplification rules, and so on.

Lots of other things to sort out, of course. Such as language.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline