A light sprinkling of maths

I’ve got a house now which, amongst other things, means that all of my future posts will be depressingly domestic. In particular, as I sat watching a sprinkler water my new well-shaded lawn, I noticed that some parts of grass were being watered more than others. It wouldn’t be right to fix these kinds of problems without first wringing all possible interest from them however, so let’s first understand what’s going on from the safe, dry comfort of a computer screen.

The setup

Here’s what I see when I look out the kitchen window at the garden – the sprinkler is the blue blob, emitting water at an angle of \lambda from the vertical which travels a distance \ell before hitting the ground. The sprinkler rotates smoothly back and forth in \lambda.

To see the source of the uneven watering, we must first figure out how far the water stream goes for a particular \lambda.

How far the water travels

Once the water has left the sprinkler at a velocity v, it falls under gravity and so the equation of motion in the vertical direction is

\displaystyle{\frac{\text{d}^2y}{\text{d}t^2} = -g}

for which the general solution is

\displaystyle{y(t) = y_0 + y_1t - \frac{1}{2}gt^2}.

Given that at t=0 y=0 and \dot{y} = v\cos\lambda, the specific solution is

\displaystyle{y(t) = vt\cos\lambda - \frac{1}{2}gt^2}.

From this, we can figure out that the water touches the ground (y = 0) at two times – t = 0 (which is obvious), and a second time

\displaystyle{t_0 = \frac{2v}{g}\cos\lambda}.

While the water has been rising and falling over a time t_0, it has been travelling with constant speed in the x-direction of v\sin\lambda, and therefore has travelled a distance

\displaystyle{\ell = t_0 \cdot v\sin\lambda = \frac{2v^2}{g}\cos\lambda\sin\lambda = \frac{v^2}{g}\sin 2\lambda}.

This solution makes sense – when the sprinkler is pointing straight up (\lambda = 0), then \ell = 0 and the water doesn’t travel horizontally at all. The water reaches a maximum distance of v^2/g when \lambda = \pi/4, i.e. when the sprinkler is spraying at an angle of 45 degrees.

By symmetry, we therefore only need to think about the range of angles 0 < \lambda < \pi/4 – extending the sprinkler to larger angles will just re-water the lawn unnecessarily.

Calculating the water density

Once we have the relationship between \lambda and \ell, we can also figure out how the water gets distributed across the lawn. Consider a small span of time \delta t. In this time the sprinkler rotates by an angle of \delta\lambda, which causes the water jet to change its landing point by a distance \delta\ell:

Let’s also suppose that the sprinkler rotates at a constant rate \omega, such that \delta\lambda = \omega\delta t. The rate of water emission is also assumed to be constant, say f litres per second, so that the amount of water emitted in this time is f\delta t.

We also know that, from above,

\displaystyle{\delta\ell = \frac{\text{d}\ell}{\text{d}\lambda}\delta\lambda = \frac{2v^2}{g}\cos (2\lambda) \delta\lambda}

The density of water landing on the ground (\rho) in this time increment is therefore

\displaystyle{\rho = \frac{f \delta t}{\delta \ell} = \frac{f\delta t}{\frac{2v^2}{g}\cos (2\lambda) \delta\lambda} = \frac{fg\delta t}{2v^2\cos (2\lambda) \omega\delta t} = \frac{fg}{2v^2\omega\cos (2\lambda)} }

Here you can see the problem – because the water density is a function of \lambda, it is not constant across the watered area. Plotted below the variation is clear:

At the extremity of the watered area (\lambda \rightarrow \pi/4), the change in emitted water distance gets slower and slower (\text{d}\ell / \text{d}\lambda \rightarrow 0). Therefore the same amount of water is deposited in a smaller and smaller spot, increasing the density of water there.

Fixing the uneven watering

Looking at the expression above for \rho, to account for the inhomogeneity we can play with f (the water emission rate), v (the water emission speed), or \omega (the sprinkler rotation rate). Let’s go with \omega here, as that’s probably the simplest to tweak mechanically.

To keep \rho constant, we should remove it’s dependence on \lambda, implying

\displaystyle{\omega = \frac{\text{d}\lambda}{\text{d}t} \propto \frac{1}{\cos 2\lambda}}

This is a differential equation that can be solved (pop the \lambda terms on the left), with the solution

\displaystyle{\lambda(t) = \frac{1}{2}\sin^{-1}(t / t_0)}

assuming that \lambda = 0 when t = 0 and \lambda = \pi/4 when t = t_0. (I’ve left a constant t_0 there to remind us that t has dimensions of time, but it can be set to 1 without any loss of generality.)

As we can see in the plot below, the rotation speed sharply speeds up as \lambda \rightarrow \pi/4 to deposit less water in that region. This speedup is carefully contrived to exactly balance out the change in density of water derived above.

This is great – a simple analytic solution to our watery problem. So simple in fact, that it’s worth continuing a little longer to try and figure out how to actually implement it…

Constructing a varying rotation speed

Let’s say up-front that I am not a mechanical engineer, so I haven’t thought particularly deeply about the best way to smoothly vary the speed of a rotating element. Based mostly on how fun it would be to derive, here I look at using some specially-shaped gears.

To begin, consider the arrangement below – two gears with rotation centres a distance d apart with radii r_1(\theta_1) and r_2(\theta_2) which can vary with angle. At any given point in time, the gears have rotated angles \theta_1 and \theta_2, which need not be the same.

Just imagine the teeth on the gears, and that the left gear is rotating clockwise.

From physics there are two rules governing this setup:

  1. The distance between the gears is constant: r_1(\theta_1) + r_2(\theta_2) = d
  2. The gears don’t slip: r_1(\theta_1)\text{d}\theta_1 = r_2(\theta_2)\text{d}\theta_2

Then in addition we have particular constraints for the problem at hand:

  • We constrain the first wheel to be rotating at a constant speed \theta_1(t) = \omega t
  • We constrain the second wheel to be rotating at the speed we require for the sprinkler \theta_2(t) = \sin^{-1}(t / t_0) / 2

In this way we can drive the sprinkler with a simple constant-speed gear, and the special gear shapes will mean that the second gear, connected to the water output, will rotate at the speed we require for an evenly-watered lawn.

Solving the gear problem

Let’s derive the shape of the first gear. From rule 2

\displaystyle{r_1(\theta_1) \frac{\text{d}\theta_1}{\text{d}t} = r_2(\theta_2)\frac{\text{d}\theta_2}{\text{d}t}}

and substituting rule 1 plus the constraint for the gear rotation speeds

\displaystyle{r_1(\theta_1)\omega = \frac{d - r_1(\theta_1)}{2\sqrt{1 - (t / t_0)^2}},}

then rearranging and substituting for t in terms of \theta_1 we get the shape of the first gear to be

\displaystyle{r_1(\theta_1) = \frac{d}{1 + 2\sqrt{\omega^2t_0^2 - \theta_1^2}}.}

Awesome! The shape of the second follows once we know how \theta_2 varies with \theta_1 (which we do implicitly from the constraints we imposed above). Let’s double-check though – first take rule 2 and rearrange it:

\displaystyle{\frac{\text{d}\theta_2}{\text{d}\theta_1} = \frac{r_1(\theta_1)}{r_2(\theta_2)} = \frac{r_1(\theta_1)}{d - r_1(\theta_1)} \quad \Rightarrow \quad \theta_2(\theta_1) = \int \frac{r_1(\theta_1)}{d - r_1(\theta_1)} \, \text{d}\theta_1 }

Then do the integral using your method of choice (I chose squinting and shouting into Wolfram Alpha), impose the constraint that both gears start at an angle of 0, and you end up with the solution

\theta_2(\theta_1) = \frac{1}{2}\sin^{-1}\left(\frac{\theta_1}{\omega t_0}\right)

This is exactly what we want – assuming that the first gear rotates linearly with time, the second rotates with the required inverse-sin temporal profile.

Below you can see what these gears look like in motion. The first (blue) gear rotates smoothly by a full rotation, the second (orange) gear rotates just by 45 degrees and speeds up right at the end.

10 points to anyone that 3D prints these

Now there are many reasons you wouldn’t want to do this – in particular the required torque changes sharply with time, and the whole thing has to unphysically reverse direction – but it’s still a nice application of some pretty simple rules and basic physics.

While this has all been very interesting, it later turned out that my grass was so well watered that it grew too long too quickly and subsequently died. I would have noticed, but I was too busy deriving crack propagation dynamics for the plasterboard falling off my ceiling. For a very reasonable rate, I’ll come to your house and analyse your DIY problems too. They won’t get fixed, but where’s the fun in that?

4 thoughts on “A light sprinkling of maths

  1. On a related matter, what’s the best angle to leap off a swing if you want to land the furthest distance from the swing? Intuitively, you might think it would be 45°, but is that correct?


    1. Interesting question! I was about to say that it is the same, but of course it depends on the height of the swing, as that is an extra distance to fall from your launch position. The following are the solutions for optimal launch angle (x) as a function of (normalised) swing height (h) – they’re pretty crazy, and I might need to follow up with another blog post. Thanks for the question.



      1. Thanks! Some scary maths there. I got to thinking about this when I thought that when a swing is at the bottom of its cycle, it’s travelling fastest horizontally, but you’d hit the ground pretty quickly if you jumped off then (being not far from the ground). Conversely, if you hang on until the swing rope is horizontal, all your motion is in the vertical direction, which wouldn’t get you very far at all from the swing. Not that I plan on doing any such thing, mind you.


Leave a Reply to jasmcole Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s