 Good, we're back. We're going to calculate position and velocity given the acceleration vectors. I said we're going to work in reverse Now at least for these parts next few parts in these lectures I'm not going to do explicit coding by that. I mean the lines of code that you can write that will do all of this for you I'm not going to make use of these Images here to explain the physics behind things definitely later We're going to do the SMPI dot physics dot mechanics library and you can see you can do most of these things With the lines of code so I'm going to use sparse amounts of amounts of code You can see there's some down here just to explain stuff But today I would never use this code to solve this this kind of problem, but let's go So imagine you're given this acceleration of vector Consider vector in three space The x of t would be 60 the y of t would be 12t plus 2 and the z of t would be e to the power t So that what that describes is An acceleration vector so at every point in time for different values of t An acceleration vector is going to change it'll change in magnitude and it'll change in direction We are also given the velocity as far as an initial velocity vector time equals zero We have this velocity vector pointing in the direction to zero one. We're also given an initial Position vector zero three five. So that's a time equals zero. We have that now We asked can you calculate a velocity vector which will be a vector in three space With so it'll have three sections as well each containing the variable t. Can you do that? Now we are using the SMPI dot physics dot vector The library here and it does have a dot div. Remember we could say vector dot DIFF and With respect to what variable and in what reference frame, but there's not a dot integrate function So we have to we have to do this at least if I use this type of code the long way around so What I've done is I've introduced these three t Computer variables a underscore x a underscore y and a underscore z and you can see there As six times t which is the 6t up there the 12 times t plus 2 up there and the e to the power t up there So I've introduced that and now I can use The integrate function now. This is part of SMPI not part of the SMPI physics dot vector Library as part of the normal SMPI vector library, so I'm I could just use it because I in I imported from SMPI import integrate right at the top at the beginning of this lecture for So again, I'm making these three. I'm making these three computer variables velocity x velocity y and velocity z You could call them whatever you want and all I have to say is integrate and then the expression I want to integrate a underscore x is six times t comma what I want to integrate with respect to The same for y and the same for z now This is going to give you an indefinite integral without the constant coefficient You have to just put in that constant coefficient yourself Beware though here. We are dealing with a vectors. It's not going to be a constant coefficient For an indefinite integral. It's going to be a constant vector c is now going to be a vector not just a very not just a Constant of integration. So let's go So I now have vx vy in vz And if I just print that to the screen and you know the the the indefinite integral of 6t would be 3t squared and there you go So if I just this vx I'm just printing it to the screen the indefinite integral of 12 times t plus 2 is going to be 6t squared plus 2t and The indefinite integral of of e to the power t would just be e to the power t So just to bring the point home. I'm just going to I just show you here The an image of what it now looks like we have the v of t and for vx vy and vz There it is 3t squared 60 squared plus 2t and e to the power t plus c with a line under it That is now a constant vector and I have to figure out what that constant vector is and We do it in the following way remember We were given the initial velocity vector V at zero so if I take this v of t and I plug in zero for every t Which is what I've done here three times zero squared six times zero squared plus two times zero and e to the power zero plus this constant coefficient should equal This initial velocity vector that I was given to zero one remember up there We were given the initial velocity to zero one and there we have to zero one Remember, this is a constant vector C. So it has three components in The in the x y and z direction or otherwise the i j and k direction, whichever whichever way you want to call it Well, let's do this three times zero squared is to zero Six times zero squared plus two times zero is zero e to the power zero is one So I can simplify this bit as zero zero one Plus that should give me two zero one now. Remember how to do vector addition. We just sum the Individual components that will be a zero plus this C in the i direction Zero plus C in the j direction and one plus C in the k direction So I'm just simplifying this addition here. So that should give me two zero one. So we have that C sub C in the i direction is going to equal to C in the j direction equals zero and C in the k direction plus one equals one in other words If I take that negative one to the other side C in the k direction is zero So now I have solved C i C j C k is two zero zero that is two zero zero That is my constant vector. So Finally, I can get my velocity vector. It's going to be three t squared plus two So it's that three t squared plus two the six t squared plus two t plus zero and e to the power t plus zero So there I have solved because I was given the initial Conditions initial vector at v at time equals zero. I can solve for this Constant vector. So if you do integration of a vector you sit and it's an indefinite integral as we head up here Then most definitely that is going to be C with a line under it. It is a vector and you have to Write it in its component form there to solve this problem and the very same thing I haven't done it here will go for the position vector. You're going to do it in exactly the same. So given an initial Acceleration vector I can integrate it to get the velocity vector, which I can integrate again to get the position vector Just remember that you have the constant vector of integration there when you do integrate vectors