Click to See Complete Forum and Search --> : where code to integration symboly ?
DavidHooper
Jun 25th, 2001, 02:19 PM
Nowhere. there is no thing. it would be sooo hard to program. seriously, don;t even try it! numerical intergration is the best we can hope for.
unformed
Jun 25th, 2001, 04:34 PM
no, it's definitely not impossible. The TI-89/92 calculators do it well. And the program Mathematica does it astonishingly well, and not only basic integration, but full-fledged complex differential equations, LaPlace transforms, etc...
I just don't know how to actually program it myself, because it'd get very difficult to determine what method to use...
Destined Soul
Jun 25th, 2001, 07:19 PM
unformed is right, there are programs out there that do this. However, it's not an easy task. You might have a better tasking using Maple, Mathematica, or anything similar to this as the actual calculator for your program instead of coding it yourself. (And save a LOT of time..) If you have access to any of these programs, it's definitely worth a look into. As for how to do it, I'm not sure how to go about that.
Destined
DavidHooper
Jun 26th, 2001, 02:05 AM
Mathematica's Integrate function represents the fruits of a huge amount of mathematical and computational research. It doesn't do integrals the way people do. Instead, it uses powerful, general algorithms that often involve very sophisticated math. There are a couple of approaches that it quite often takes. One involves working out the general form for an integral, then differentiating this form and solving equations to match up undetermined symbolic parameters. Even for quite simple integrands, the equations generated in this way can be highly complex and require Mathematica's strong algebraic computation capabilities to solve. Another approach that Mathematica uses in working out integrals is to convert the integrals to generalized hypergeometric functions, and then to use collections of relations about these highly general mathematical functions. The internal code that implements the Mathematica integrate function is about 500 pages of Mathematica code and 600 pages of C code.
like i said, there is no thing for vb.:mad:
anyway, check out these links for online intergration and differentiation:
http://integrals.wolfram.com/
http://www.calc101.com/;)
Destined Soul
Jun 26th, 2001, 02:58 AM
True, creating a true symbolic integrating "function" is quite insane. However, I was suggesting something more towards taking, say, Maple's command line executable and figuring out a way to manipulate it with VB. Calling it shouldn't be too much of a problem, but getting the output text might be. Unless there's a dll or something similar that you could use directly.
I wasn't really suggesting coding Maple or Mathematica. It's taken those guys years to get where they are now, and I'm sure they've made a fair chunk of cash from writing those programs.
thingtrier, if you want to actually program some symbolic integration, I'd have to ask what you want to integrate. Do you want something that integrates very simple equations, or are you going for more complex areas? Once we know that, we can probably better help you along. If it's the first one, you MIGHT be able to code some of it, but it won't work for a lot of equations. If it's the latter, you'll probably have to do some researching in how to access a program that can already do the math.
Just take your time, though, and don't get discouraged. Humans can do it, so a machine should be able to as well. :D
Destined.
Guv
Jun 26th, 2001, 05:16 PM
You can always do numerical integration if you can evaluate the integrand for all values in the interval.
However, there are many simple looking functions which have no indefinite integral. For example.
dA / SquareRoot(X - 2*R*cos(A) + R^2*cos^2(A) + R^2), where X & R are treated as constants, and A is the variable of integration.
The above simplifies to dA / SquareRoot( [X - R*cos(A)]^2 + R^2)
If anybody can provide an indefinite integral for the above, I would love to know what it is. If you could supply a function which is the definite integral of the above between zero and 2*pi, I would also be very happy.
I believe the above integral is the gravitational potential of the point (X, 0) for a circle of radius R. If I could get a general expression for that integral, I could get a formula for the gravitation force due to mass uniformly distributed around a circle. I would love to have such a formula. It would allow me to calculate the gravitational field around a torus, which intrigued me years ago.
Guv
Jun 27th, 2001, 04:45 PM
DavidHooper: I am trying to integrate the reciprocal of the function you posted. Also, I think you have a typo in your result. It looks as though you have an extra right parenthesis, which I assume is a divison operator. If this assumption is correct, the result you specified is the following.
SquareRoot( X^2 + [X - cos(A*R)]^2 ) / A, whose derivative seems to me to be the following.
[X - cos(A*R)] * sin(AR) / SquareRoot( X^2 + [X - cos(A*R)]^2 )
The above derivative is not equal to either your integrand or my integrand.
unformed
Jun 27th, 2001, 10:02 PM
another really basic integral that can't be done is:
Integral( e^(x^2) dx )
interesting actually, even more so since it provides the graph for naturally-occurring standard deviation
DavidHooper
Jun 28th, 2001, 01:58 PM
guv i think this also can be done. try
http://integrals.wolfram.com
tho it integrates with respect to x so your variable letter and constant letter must be changed...
unformed, this site also has the answer to Integral( e^(x^2) dx )
Guv
Jun 28th, 2001, 02:30 PM
DavidHooper Thanx for the Wolfram site. It might be handy in the future. As expected, it could not cope with the integral I posted.
I never tried researching it, but I have often wondered if there is some technique analogous to Taylor series expansions which would provide a series or an approximating function for integrals.
Like e^x = 1 + x/1 + x^2/2 + x^3/6 + . . .
which is generated using derivatives of e^x
I took a lot of math courses and have read a lot, but have never encountered any such method.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.