1. ## Integration

Does anybody know how to do a maths integration in C? I have been looking around and am finding it difficult to produce this piece of code and was wondering if anybody code help me? Thanks for your help

2. What exactly is your problem? What piece of code are you trying to compile?
Post the code that's giving you problems and the errors you are having.

3. Originally Posted by westclok
Does anybody know how to do a maths integration in C? I have been looking around and am finding it difficult to produce this piece of code and was wondering if anybody code help me? Thanks for your help
ya right... do a bit of genetic algo with some artificial intelligence..

4. Well I'm interested, but I have questions.

Do you mean numerical integration or symbolic (if this is the right word) integration?

What's the nature of the data to be integrated?

5. if its numerical, that is definite integration, then it is easy. one has to know stuff like the trapezoidal rule or simpsons one-third rule and stuff like that. if it is indefinite (its not symbolic jez) then one has to know many other things..if you've heard of mathematica, there is an entire book written on the techniques used to write the code for mathematica. i dont know the name though.

6. indefinite (its not symbolic jez)
Thanks Ping! I couldn't think of the right word.

Don't suppose he really wants symbolic integration though. I was merely highlighting the fact that we have little information to go on.

7. i agree with you jez..coz making something that gives you the value of the indefinite integral is not that simple you know.. i hope this westclok guy tells us exactly what he wants..instead of his vague question..lol

8. I've got an easy answer:

You've got to do it on your own, and you have to know how to do it in order to implement it in C.

If you are just doing symbolic (indefinite) integration, then I assume that means you're just doing something like parsing functions, and then finding its general anti derivative (give it limits and a starting value and you've got a definite integral).

If you are doing numerical integration, you are basically writing a numerical differential equation solver. Here are some terms you want to look for:

-Euler integration (least accurate)
-Improved euler integration (semi accurate)
-runge kutta (most accurate)

each of those are numerical techniques employed for taking the numerical route to integration. Also look for taylor series expansion (you will have to know it in order to implement runge kutta).

9. Wolframs Mathematica is also an excellent maths package Matlab. they are both quite advanced though and a much simpler/cheaper program (with much of the functionality) is Derive from TI interactive.

I have been looking at writing something similar to westclock and have found writing something to interpret user input is no small task in itself.