[Tutor] integration of polynomials in Python
Deirdre Saoirse Moen
deirdre@deirdre.net
Tue, 1 May 2001 23:20:42 -0700
> What can I do to make it integrate?
Oh geez, I had calculus in 1976. If I get it wrong, don't yell too loudly. :)
A simple integral is simply the reverse of the differential.
So, given the equation:
2x^2 + 4x + 3 = 0
The differential would be:
4x + 4
For that equation, the process would be something like:
The first exponent coefficient (you call this 'deg') is 1; it will be
increased 1 to 2;
You also divide by the new coefficient:
Thus:
(4/2)x^2 + (4/1)x + k = 2x^2 + 4x + k
There's always a k (because that x^0 component drops off when you do
the differential).
--
_Deirdre Stash-o-Matic: http://weirdre.com http://deirdre.net
"I love deadlines. I like the whooshing sound they make as they fly by."
- Douglas Adams