And we'll come back to a class of our course about the complete introduction to data science with the
use of Python.
So in this class, we are going to talk about another package that is included inside of SCoPI.
And in this case, it's going to be the integration package which is integrated.
So basically, to understand this package well, to understand what is it?
Have a simple definition.
Basically, the SCoPI integrates a package, will provide several integration techniques that includes
an ordinary differential equation integrated, and the review of the model is provided by the HELP Command.
So basically, you can use the help integrate methods for integrating functions, given function objects.
In other words, the integration function is simply used to find displacement areas and it can deal
with adding slices to the whole.
So the complete hold that we have.
So yes, it gets complicated at first.
But once you are used to use this well, those functions, you'll see it's not that complicated.
So to understand the integrated integrating support package, I have two functions that are not that
complicated, but you need some basic mathematical knowledge that it's the quite function and the so
basically the quad function will simply calculate the integral of a function which has one variable
and the DBL quad function will calculate the double integral of a function which has to value.
So basically we'll work with one as well as two tables.
Once again, my goal right here is not for you to understand completely those functions, but simply
to understand how they work.
And after that it will simply be practice.
All right.
So let's start.
So the first thing that we need to do is pretty simple.
It's important Kibuye, as we always do.
So we'll import Skype as S.P..
Then what I want to do is want to import our sub package in this case, the supposition that we will
work with will be integrated.
So basically, how do we import our sub package?
It's pretty simple, right, from Skype import.
So what exactly we want to import.
We want to import, integrate.
So here we have our sub package that we have the suppliers that we have just imported and now we want
to do is want to work with our first type of function.
So in this case, our first function will be the quad function.
So basically the quad function will is a mirror that will that can get the integration of a given function
from limit eight to be using our function.
So in other words, what does it mean?
It will simply calculate integral of a function which has one value in the difference the debulked,
the function that we are going to talk about a bit later, we'll calculate in double integral of a function
which has to be able.
So basically the first one has one variable and the second one has two variables, but it's going to
be a double integral as well.
All right.
So how exactly does everything work?
Pretty simple.
First thing that we need to do is we need to create a value.
So let's create a variable.
And this value, let's call it variable.
Once we or one in this variable, what we what we'll set we'll write down our parameters.
In this case, it's going to be lambda.
So Lambda X two points.
And what how exactly we want lambda x.
So basically we want to actually X exponent three.
So X multiplication multiplication sign two times three.
Then why do we want to create our calculation variables, a variable where we are going to store all
our calculation.
So let's call it function one.
So function one in this case will be equal to integrate.
So once again, right now what we write down, why write down integrate?
Because we are going to look for a function that is inside, integrate some package and the name of
this function is Quad.
So since we're working with the function that is integrate inside of the integrate some package we write
down, integrate that QUAT, then next thing that we need to write down is will be our parameters.
So the first our parameters are stored inside of one.
So we just write down one and then we need to write down our limits or limits would be, let's say,
between zero and six.
All right.
Next thing that we want to do is print everything.
So simply write down print and what exactly what the print want to print function.
So here it is right there.
Then we run our up.
So you'll see it's going to take a little bit of time.
But in this case it was pretty automatic.
So this would be the answer of this integration.
So basically it will look something like this.
All right.
So right now that we have that, you guys saw what it looks like to to make the integrate quad function.
Let's make it a bit more complicated and work with the double.
So basically the double integration of in this case to viable.
So basically, we'll have a function that has two variables.
So X and Y.
So what we'll do right now, we'll simply delete the first part and we'll keep everyone.
So basically, here are one in this case will be equal to we need an X and a Y because we have in this
case two variables.
So basically, we'll have our Y at first, then we'll have our x ray done X and Y two points, and then
we can write down our operations.
Let's say in this case it's going to be X multiplied by I don't know why exponent for something like
this.
All right, then, when we have this, the next thing that we need to do, we'll do the exact same thing.
So we need to create our function so the our variable, where we will store our calculation and we can
write down our function.
So it will work that pretty much the same way.
So it's going to be integrated point.
So right now, since we are since we're working with the integrated package, we start with integrate,
then write down our function, which will be Dibbell Quod.
So in this case, we have it right here.
First thing that we'll write down will be our parameter parameters.
So the one then we write down our in this case, our limits.
So our limits, let's say, would be between zero and six like we did in our first example.
And then we'll write down our function, which would be, let's say, for example, Lambda.
X would be equal, will be zero and lambda X.
One.
All right, so we have everything that we need.
Next thing that will do, it will simply print our function.
So we'll print function one and we can run or so what we'll do once again, it will give us the answer
of the double integration.
All right.
So as you can see, guys, yes, it's a bit more complicated to understand and to to be able to explain
all this.
I need to make a separate course about all those functions, because you need a good mathematical knowledge.
You need really good mathematical knowledge.
Once again, my goal here is really to give you an introduction so you guys understand a little bit
how all this works.
So if you guys are able to write down those functions, have been able to write down those functions,
and as you can see, you have this sub package inside of Python, inside of SCoPI, sorry, that is
inside of Python that you can use if you guys decide to make some more advanced Python apps in the future.
So that's it for us guys, guys.
And see all our next class.