Granit Xhaka’s Switzerland is out of the World Cup, after losing to Sweden in the round of sixteen. While that’s better for us as Arsenal fans, because we get him back quicker, this is surely not how our midfielder wanted his team’s tournament to end—but at least he’ll go home having scored this beauty in Switzerland’s group stage game against Serbia:

Xhaka found the ball sitting a few yards outside the box for him, spinning clockwise as he looked at it from overhead at quite a clip. He hit it with his left foot and left some of the spin on it, and it sliced away from Vladimir Stojković and into the right side of the goal.

Why did this ball slice—and why do other shots like this one also slice? Why do shots spinning the opposite way hook? What about that one that floats up into the seats, finally lands in the nineteenth row, and makes the striker look a bit silly? All of these shots bend because they move through the air, and the air behaves according to the principles of fluid dynamics.

Hold onto your hats; it’s about to get mathematical.

A quick warning before we continue: everything I say here is going to be quite simplified. Fluid dynamics in its entirety is insanely complex and often impossible to do analytically—that is, physicists resort to making approximations and grinding numbers through long series of equations because there’s no other way to do it.

I’m going to gloss over some steps and ignore complicating factors like viscosity, because that would involve vector calculus and this is a soccer blog, not a math blog. We will look at a handful of equations, though, as an illustration of the forces acting on a soccer ball in flight—starting with Bernoulli’s equation.

Bernoulli’s equation is essentially an expression of the law of conservation of energy, tailored specifically for fluids. The air above a soccer pitch, being a fluid, behaves according to this equation:

P/ρ + gz + ½u^2 = k

This is a simplified, approximate version of Bernoulli’s equation that’s good enough for our purposes. The *P/ρ* term includes the pressure and density of the fluid, the *gz* term involves gravity, and the *½u^2* term accounts for the velocity of the fluid, if it’s moving. On the other side of the equation, *k* is a constant. This is what makes the equation work—if the fluid starts in one configuration and one of the three terms on the left changes, then either one or both of the other two must also change in order to keep *k* constant.

What does this mean for a soccer ball? If it’s sitting on the pitch, then its velocity term is zero, and the other two terms have to take care of *k* on their own. But if Xhaka has just put his foot through it, then its velocity term is larger than zero, and to compensate and keep *k* constant, the pressure term gets smaller. (If the ball rises off the ground, then the gravity term would change, too.)

And what if the soccer ball is spinning, like it was for Xhaka’s World Cup goal? For that, it’s better to use a more complete version of Bernoulli’s equation, along with the vector calculus associated with vortices. A spinning ball is like a spinning bit of fluid, a vortex, and we can describe the flow in and around a moving vortex mathematically. Vortex equations involve another k variable, but not the little generic constant *k*—a big *K*, which denotes vortex strength and takes into account the size and rotation speed of the vortex.

In this scenario, pressure depends on where we look on the ball’s surface. Are we looking at the front of the ball, pointed toward the goal with the surface of the ball moving from Xhaka’s left to his right, or the back of the ball, pointed toward Xhaka and moving from right to left? To orient themselves, physicists use angles, and with angles come trigonometric functions. The one we’ll need is sine, which, in this scenario, is positive to Xhaka’s right and negative to his left.

We’re interested in the pressure term of Bernoulli’s equation, and if we work through the calculus, we find that in certain directions—here, front to back, from Xhaka to the goal—pieces of the equation cancel each other out and disappear, which means that pressure is balanced. The front side of the ball experiences the same amount of pressure as the back side of the ball. But from Xhaka’s left to his right, there’s a pressure imbalance, and we’re left with this:

P = ρUKsin(θ) / πr

There are a few new variables in there—*ρ* is the density of the air, *U* is the forward speed of the ball, *r* is the radius of the ball, and *θ* is the direction in which we’re looking. Physical properties like density and ball speed and size stay about the same as the ball flies into the goal. *K* also stays about the same, and in this case it’s negative, which gives us the the pressure imbalance when combined with *sin(θ)*. A negative multiplied with a positive gives a negative, and a negative multiplied with another negative gives a positive. Pressure on the ball to Xhaka’s left is positive, and pressure to his right is negative, and the ball moves toward the area of lower pressure.

I should stress that these calculations are all extremely rough. The math I’ve been doing is for a vortex, which is a cylinder, not a sphere. Furthermore, I’ve been ignoring viscosity, and in real life air is viscous and creates eddies and turbulence on the surface of and in the wake of the ball. But the general idea of pressure imbalance holds, and a pressure imbalance will cause a soccer ball to move—to bend in the direction of backspin.

For this shot, the leading edge of the ball spun to Xhaka’s right, and the ball bent to his right. If we flipped it over, the leading edge would go to the left, and so would the whole ball—a hook shot. If we give it a quarter turn so that it has backspin, it will experience a lift force and bend upward, and go over the goal and land in row nineteen.

Xhaka and the other players, of course, may not know any of this—they know how to bend shots because they’ve practiced a lot and observed how the ball behaves when they strike it in different ways. And given that they often have only a fraction of a second to get a shot off, it’s probably good that they’re not trying to do fluid dynamics on the pitch.