A hydraulic cylinder consists of a piston which can slide in a cylinder, and which is connected to an external rod.
Hydraulic fluid is in communication with the two ends of the cylinder, separated by the piston.
A good sliding seal is needed to let the rod slide in and out of the cylinder easily, yet without fluid leaking around it. The force f shown in the figure is, as always, the force applied to the piston rod by whatever it connects to. If A is area of the piston, the fluid exerts a force AP 1 to the right, and AP 2 on it to the left. The minus sign is due to the fact that when V is positive, fluid flows opposite the flow definitional arrow. Check the signs carefully against the polarity of the variables, as defined in the figure above.