7.Integrated Knowledge: changing acceleration to speed and speed to distance — an example of integra

本文深入探讨了速度、加速度与距离之间的关系,并通过简单的实例解释了如何通过积分和微分来转换这些概念。特别强调了在不同情境下应用这些数学工具的重要性,同时纠正了对微积分的误解,展示其在实际问题解决中的实用性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

This post is about acceleration, speed and distance, or: a little calculus.

In our last post, we dealt with speed and acceleration. There is a strong relation between these two things, and distance:

  • Distance: the amount travelled over time.
  • Speed: the rate at whichdistance increases over time.
  • Acceleration: the rate at whichspeed increases over time.

It can often be useful to change between the different levels on this scale. Moving downwards (distance->speed->acceleration) can be done with differentiation and moving upwards (acceleration->speed->distance) can be done with integration. Together these two things make up most of calculus. Calculus has achieved a reputation of being one of the most difficult areas of maths, but this post will try to convince you otherwise, by looking at the principles of integration. (Technical note: integration operates on a continuous scale, and what I’m doing here is actually summation ofdiscrete series, but it’s close enough to explain the gist.)

Basic Integration

Our example last time had an apple which accelerated downwards under gravity. The acceleration was 0.4 each frame. The speed to begin with (the 0th frame, if you like) was 0. Each frame, we added on the acceleration, so on the first frame the speed was 0.4, on the second frame it was 0.8, on the third frame it was 1.2, on the fourth frame it was 1.6 and so on. It doesn’t take a genius to see that if we call the frame number t (for time), the speed on any given frame is0.4 \times t.

That’s the principle behind the simplest form of integration: if acceleration is some constant acc, then the speed after a given time t is\text{speedAt(t)} = \text{startingSpeed} + \text{acc} \times t. Note that this is not specific to acceleration: if, instead, speed is some constant speed, then distance after a given time t is\text{distanceAt(t)} = \text{startingDistance} + \text{speed} \times t. This generalises to any other situation: if you have something that changes at a constant rate (read that carefully!), the value at any given time is the starting value, plus the constant change multiplied by the given time.

The complications in integration come when you inevitably need to integrate something more complicated than a constant. Let’s return to our example of having acceleration 0.4, which means a speed of0.4 \times t (0.4, 0.8, 1.2, 1.6 etc as the frames progress). So the distance travelled on the 0th frame is 0, the distance is 0.4 on the first frame, then 1.2 (0.4+0.8), then 2.4 (1.2+1.2), then 4.0 (2.4+1.6). To avoid making this blog post humongous, I’m going to skip the explanation, and just tell you that the pattern here is that if speed is \text{acc} \times t (where acc is constant), then distance travelled is0.5 \times \text{acc} \times t \times (t + 1) (so for the apple:0.2 \times t \times (t+1)). You can verify this by feeding in values of t and checked it against the distance values I mentioned earlier in the paragraph. (Technical note: this is the rule for a discrete series, the rule for continous data is different.)

Meet You at the Bottom

Let’s look at an example of actually using this. Did you notice in the previous post with the apples, thatthe apples started at the same place, and arrived at the bottom at the same time? I wanted that to happen, so that you could get a good idea of the different falling behaviours, without either apple having travelled faster than the other. I got the apples to arrive at the same time, not by guess-work or trial and error, but by using these calculations.

The green apple on the left-hand side was easy. Both apples started 500 pixels above the bottom of the world, so they had 500 pixels to travel. The green apple fell at 10 pixels per frame, so it would take\displaystyle\frac{500}{10}=50 frames to reach the bottom.

The red apple was accelerating at a rate that I could then choose. We’ve already seen that a constant acceleration means that distance travelled is0.5 \times \text{acc} \times t \times (t + 1). We know that  t here must be 50, because we are interested in the distance travelled after 50 frames (when the green apple will hit the bottom), and we know that we want the red apple to have travelled 500 pixels after 50 frames, to match the green apple, giving us this equation:

0.5 \times \text{acc} \times 50 \times (50 + 1) = 500

Working through a couple of steps:

0.5 \times \text{acc} \times 2550 = 500

\text{acc} \times 1275 = 500

\text{acc} = \frac{500}{1275}

The right hand side comes out to 0.392 (to 3dp), but I decided that 0.4 was close enough for our purposes. So by making the red apple accelerate at 0.4, I made it reach the bottom of the screen at about the same time as the green apple.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值