Tag Archives: math

Puzzle Time – Rate Of Growth Of Shadow

Note: The draft of this article had been staring back at me since April 2022. I’m only now getting around to publishing it. Consistent, timely and regular publishing is a natural skill of mine.

Have you ever walked at night on a street that’s lit with street lights? As you pass the lamp post, you start to see a small shadow in front of you. Slowly, as you walk further, the shadow grows, and it keeps growing until it fades to the point where you can’t see it, the next lamp post’s illumination overpowers it or both.

I had this question pop in my mind about the rate at which such a shadow grows, and if is a constant speed or somehow accelerating as the person goes further and further away from the pole. To find it for myself, I spent some time figuring it out today; a lazy rainy Sunday afternoon.

Assuming that

  • A person 1.8m tall
  • Walks at 2m/s
  • Past a lamppost 9m tall

We’re asking,

  1. How fast is the head of the shadow moving away from the lamppost and
  2. How fast is the head of the shadow moving away from the person

Let’s draw some figures to better visualize the question.

To solve this problem, the first piece of information that we note is that the top of the pole, the bottom of the pole and the head of the shadow form a right angled triangle.

The top of the person’s head, their feet and the head of the shadow also form a right angled triangle.

Since we drew a line from the lamp to the person’s head extending all the way to the head of the shadow, the angles thus formed at the lamp and the person (θ) are the same. We conclude here that the smaller triangle is similar to the larger triangle.

Using the property of similar triangles, we get an equation of x in terms of y.

or x = 4y

Since we already know the rate of change of x, which is just the walking speed of the person, we can take derivative on both sides to get the rate of change of y.

So the shadow is growing at 0.5m/s relative to the walking person. Or, if we want to get rate at which the head of the shadow is moving away from the lamppost, we express z in terms of y and then apply derivative on both sides.

2.5m/s away from the lamppost or 0.5m/s faster than the person walking, which it why it seems to grow in length away from us the further we go from the lamppost.

In closing

Hope you enjoyed reading this silly thought, and perhaps even learned something. Thank you for reading!

Recover the cost of a BVG ticket via the USB charging port inside the bus

So I was merrily riding a bus yesterday on my way to Potsdamer Platz for a Dosa lunch when I noticed this:

Image of a usb port inside of the buses in Berlin

And a couple of thoughts hit me: What’s up with the piss stains? 🤷

And something I could actually answer: How long would I need to use this USB port to make up for the 3.20 that I paid for this ticket.

Now, a day later, I have a calm Sunday morning to ponder all of life’s most urgent questions so let’s get back to the thought from yesterday.

Power draw from a USB port

The best way to know exactly how much power I can draw from that port would have been to test it.

The next best thing is to try and guess based on some indicators. From the color of the port, it is safe to conclude it is a USB 2.0 port, and not a USB 3.0 port. From Wikipedia, we see that a USB 2.0 port intended for high power devices allows for a current draw of a minimum of 0.5 amps. The voltage is also standardized to 5 volts.

Amperes times Voltage gives us the power output of the port, which is 0.5 amps x 5 volts which is 2.5 watts (again, at a minimum).

Measuring power consumption

2.5 watts is the power that can be drawn from the port. To calculate how much energy can be consumed over a given time period, we need to simply multiple the watt number by the time number. Typically, it is measured in watt-hours.

My electricity company bills me for the kilowatt-hours I consume. If I use my TV that’s rated at 100 watts for 10 hours, it will be billed as 1000Wh, or 1kWh of energy consumption.

Price of electricity in my area

Electricity does not cost the same everywhere, and not even in the same area. Even the same provider might use different prices depending on the time of consumption and a whole list of other factors.

Looking at Vattenfall’s website (an electricity provider here in Berlin), I can see prices range between 25.07 cents / kWh and 33.37 cents / kWh. To make it easy for calculations, I’m going to go with 30 cents / kWh (all cents).

How much electricity can I buy for the cost of a BVG ticket?

For €3.20, the price of a single BVG ticket at the time of writing, I can consume (3.20 / 0.30) kWh, which is 10.667 kWh (or 10,667 Wh) of energy with my current electricity provide.

How long do I need to use the USB port to cover the cost of the ticket?

To find the time duration in which our 2.5W port will output 10,667Wh of energy, we simply need to divide the target consumption number by our consumption rate:

10,667 (Wh) / 2.5 (W) = 4,266.8 hours (the Watt unit nicely cancels out giving us the number of hours)

Which is roughly 177.8 days, or just under 6 months.

This time can roughly be cut by half if BVG changes the USB ports to 3.0 guaranteeing a minimum current draw of 900mA but I’m not holding my breath.

How much will a ticket effectively cost if I make full use of my ticket’s validity to charge a device?

Now of course being in a bus for 6 months is going to cost more money for season ticket and I might never recover my full ticket.

But what about the journey that I’ve already paid for? A BVG single ticket is valid for 2 hours. If I make 100% use of the time a ticket is valid for to charge my device, what’s the effective cost of my ticket?

At a minimum of 2.5W for 2 hours, I’ll consume at least 5Wh. At 30 cents / kWh, that’s 0.15 cents worth of electricity.

That’s 0.15 cents or €0.0015 that I can immediately recover from my ticket price, effectively making my single journey BVG ticket cost not €3.20, but a jaw dropping €3.1985 😎🫡

In conclusion

So there you have it. Go grab your 0.047% discount on BVG tickets! Subscribe for more financial tips. Thank you for reading!

Puzzle Time – Distance To Horizon

A couple of months ago I was on a flight and had a thought: How far is the horizon at this very moment?

I got my notebook and pen out and tried to solve this using only the knowledge I had, since there was no internet anyway. Of course, many assumptions were made as were convenient for the calculation.

I planned on checking my answer once I landed. If you want to attempt it, stop reading here and come back later when you have a solution. Unfortunately for me, I made a little error subtracting between two big numbers and got a completely wrong answer.

Assumptions

I assumed the following

  • Perfect visibility, no degradation due to atmosphere
  • Earth is a perfect sphere with a radius of 6400km
  • Aeroplane flying at an altitude of 10km

Solution

Thanks to the assumptions, the problem reduces to primary school geometry problem and is trivial to solve once visualized clearly on a piece of paper.

Using Pythagoras Theorem we know how to calculate the third side of a right angled triangle give the first two. We also know that a tangent to a circle (the line of sight from an aeroplane) meets the circle in a way that it is perpendicular to the radius drawn from the point of contact.

Combining the two pieces of knowledge, the problem can be trivially arranged as follows

(R + r)² = R² + Dh²

Where

  • R is the radius of the earth (in Kilometers)
  • r is the distance of the aeroplane from the surface of the earth (in Kilometers)
  • Dh is the distance to the horizon

Rearranging, we get

Dh² = (R + r)² – R²

Expanding the (a + b)² equation

Dh² = R² + 2Rr + r² – R²

Dh² = 2Rr + r²

Taking square root on both sides

Dh = √(2Rr + r²)

Substituting the values

Dh = √(2*6400*10 + 10²)

Dh = √(128000 + 100)

Dh = √(128100)

Dh = 357.9

Distance to horizon is about 358 kilometers when the aeroplane is at an altitude of 10 kilometers. Now looking at the map while sitting in a flying aeroplane is a lot more insightful as I can guess which cities I’m looking at outside the window.

That’s it for this little post. Thank you for reading!