Math Is Fun Forum

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

You are not logged in.

#1 2006-09-01 01:17:09

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Possible Project: Integrator/Differentiator

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

#2 2006-10-06 08:16:20

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

Re: Possible Project: Integrator/Differentiator

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

Offline

#3 2006-10-07 03:18:55

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

Re: Possible Project: Integrator/Differentiator

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

#4 2006-10-07 03:35:08

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

Re: Possible Project: Integrator/Differentiator

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

Offline

#5 2006-10-20 23:05:02

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

Re: Possible Project: Integrator/Differentiator

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

#6 2006-10-20 23:22:02

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

Re: Possible Project: Integrator/Differentiator

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

#7 2006-10-21 00:35:46

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Possible Project: Integrator/Differentiator

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

#8 2006-10-21 03:21:09

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

Re: Possible Project: Integrator/Differentiator

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

#9 2006-10-21 11:50:53

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Possible Project: Integrator/Differentiator

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

Board footer

Powered by FluxBB