# Calculation max speed for a particular speed profile, distance and time?

For work I have to calculate the maximum speed for a machine. The machine has a certain speed profile which must be followed. Besides this this speedprofile has to be followed within a certain time (Tcycle) and Distance (Xcycle).

The picture shows a speed/distance graphs of the machine.
The speed and acceleration in the green boxes are fixed, so the distance and time are also fixed.

The acceleration parts from Vslow to Vmax are variable, the orange boxes. The part Vmax must be calculated, red box. This will be used to determine if it's within system boundaries.

But now I have hit a problem the analysis below is how far i have come:

Vmax = deltax/deltat

deltaX = Xcycle - 2*Xgreenbox - 2*Xorangebox

deltaT = Tcycle - 2*Tgreenbox - 2*Torangebox

so i know xcycle and Tcycle and the greenbox values are fixed but now comes te problem :

Torangebox = (Vmax-Vslow)*(Tmax-Tslow)*0,5+Vslow(Tmax-Tslow) where Tmax = (Vmax-Vslow)/Acceleration

so now the input of the function is also the output of the function. Does this mean I need to formulate it as an differential equations ? If yes how to approach this ?