What you are doing wrong is using equations that apply only when the acceleration is constant to a situation where the acceleration is variable.
If you had a function that gave the velocity vs time, you could integrate that from $t_0$ to $t_{final}$.
EDIT:
For example. suppose the velocity, $v$, as a function of time is given by:$$v=18-12t+0.1t^2$$Then the displacement, $d$, at a time $T$, is given by:$$d=\int_{0}^{T}{v}dt=\int_{0}^{T}{18-12t+0.1t^2}dt=18T-6T^2+\frac{0.1}{3}T^3$$
Given a graph, one solution is to plot the curve very carefully on some graph paper, and then count the squares between the velocity curve and the x-axis (the time axis). Remember that squares below the x-axis are negative...
In Newtonian mechanics, including various extensions, like Lagrangian mechanics and Hamiltonian mechanics, the fundamental law determining the equation of motion of a system can always be stated into the form of a system of differential equation of second order in normal form. Namely,
$$\frac{d^2X_i}{dt^2}= F_i\left(t,X_1(t), \ldots, X_N(t), \frac{dX_1}{dt}(t), \ldots, \frac{dX_N}{dt}(t)\right)\:, \quad i=1,\ldots, N\tag{1}$$
where $X_i$ are the coordinates also in a generalized sense of the points of the system. Provided the functions $F_i$ are sufficiently regular, the system (1) admits a unique solution in a set including $t_0$ when initial conditions
$$\left(X_1(t_0), \ldots, X_N(t_0), \frac{dX_1}{dt}(t_0), \ldots, \frac{dX_N}{dt}(t_0)\right) = \left(X_{10}, \ldots, X_{N0}, \dot{X}_{10}, \ldots, \dot{X}_{N0}\right)$$
are given.
Since the functions $X_i=X_i(t)$ must be differentiable up to the second order, the first derivatives must be defined at every instant $t$ where the motion is defined. As a consequence none of $\frac{dX_i}{dt}(t)$ can attain an infinite value.
The graphical representation you discuss is referred to the case $N=1$. The instants of time where the tangent is vertical are associated to infinite velocities and this is not permitted.
Obviously, limit, unphysical strictly speaking, cases can always be produced assuming the functions $F_i$ (essentially the forces acting to the system) affected by some pathology.
Best Answer
As you said, the next derivative of the velocity with respect to time is the acceleration. And the acceleration could in principle have a step somewhere due to a force starting to act on the object.