Area Under a Curve Using Numerical Calculations in Python

preview_player
Показать описание
Here is part III - in which I again find the area under the function:

f(x) = 3x^2+2 from 1 to 2.

In this version, use a numerical calculation.

Here is part 1: Using summation notation

Part 2: integrals with antiderivatives

Here is the code
Рекомендации по теме
Комментарии
Автор

Pretty amazing how good these results are for such small amount of code. I'm finding that Python is a really smooth, but powerful language.

fizixx
Автор

Thanks for this video. I made some similar code in C# as a console application that just prints text. This UI and visualization really helps one see what is happening.

One thing though. The red curve is not off by the constant. You need to subtract the left side of the integral.

Your fad plot should be " fad.plot(x, Aa(x)-Aa(1))", to remove the area under the curve from 0-1, which is 3.

Thanks again!

rayreese
Автор

Thank you, sir! Your video can help me to understand trapz rule and check myself to find mistakes.

syuo