Trebuchet Problem Equations (v. 2.0)
CS-150, Fall ’02, Dr. C. S. Tritt

Schematic:

Take the launch point as the origin of a Cartesian coordinate system. Assume negligible air resistance, so vx = Vx,0 = V0cosθ and the acceleration in the y‑direction is –g. The initial velocity in the y direction, Vy,0, is V0sinθ.

Since the x-direction velocity is constant, the x-displacement as a function of time is x(t) = Vx,0t (Eq. 1). Since the acceleration in the y-direction is constant, the y-velocity as a function of time is vy = Vy,0 + ayt = Vy,0 – gt. Integrating the velocity with respect to time gives the displacement, so y(t) = ∫vy(t)dt = – gt2/2 + Vy,0t + C. Using the initial condition y = 0 at t = 0 gives C = 0, so y(t) = – gt2/2 + Vy,0t (Eq. 2).

The solution to this problem is much easier if y as a function of x is known, so solve Equation 1 for t and substitute into Equation 2 to give y(x) = – gx2/(2Vx,02) + Vy,0x/Vx,0 (Eq. 3). Use this equation evaluated at x = Xw to determine if the projectile clears the wall.

In the problem assigned, the elevation of the target is taken to be the same as that of the launch site so Yt = 0. However, I might want a more general solution for my program. In general, the point of impact with be the value of x where y = Yt. So, Yt = – gx2/(2Vx,02) + Vy,0x/Vx,0 or – gx2/(2Vx,02) + Vy,0x/Vx,0 – Yt = 0 (Eq. 4). So finding the point of impact becomes a matter of finding the roots (x such that f(x) = 0) of Equation 4.

Applying the quadratic equation to Equation 4 gives:

where a = –g/(2Vx,02), b = Vy,0/Vx,0 and c = –Yt. For the special case of Yt= 0, ximpact = 0 or –b/a. Since x = 0 is simply the launch point, the point of impact in this case is –b/a = 2Vx,0Vy,0/g.