Kinematics: Plotting displacement, velocity and acceleration

 Kinematics: 

Plotting displacement, velocity, and acceleration

"Curiosity is the key to problem-solving."

-Galileo Galilei


 This program can be used to plot displacement, velocity, and acceleration using the given equation for the position. To be more clear check the previous posts to get an idea about solving the equation for the position (CLICK HERE). 

The main function used in this program is np. diff() which is an alternative way to find the first and second derivatives and plot them in the same graph (CLICK HERE). diff(arr[, n[, axis]]) function is used when we calculate the n-th order discrete difference along the given axis. The first-order difference is given by out[i] = arr[i+1] – arr[i] along the given axis. If we have to calculate higher differences, we are using diff recursively. So the plot for the higher derivatives is provided by the discrete difference along the given axis.

Here in this program, it is done by Defining the first derivative naming it as D. We take in the xlist and ylist. yprime is the derivative of the y values.It can be done using a simple difference formula. np.diff() will Calculate the n-th discrete difference along the given axis. del y/del x will give us the derivative of the y. If we want to find the derivative b/w two points we need to take it in the middle. we use for loop in xprime because it will run till yprime runs.



OUTPUT




Hope this is useful to you. 
To know more and discuss follow the following link https://github.com/JohnpaulJ1509 https://www.instagram.com/phy.sci/?hl=en.
























Comments