Fraud Blocker
Hopp til innholdet
Hjem » Solving a Classic Engineering Puzzle with Mathcad: How Deep Is The Shaft?

Solving a Classic Engineering Puzzle with Mathcad: How Deep Is The Shaft?

    Mathcad Article

    This deceptively simple question turns into a classic engineering puzzle involving gravity, sound propagation and iterative solving. In this article, we walk through how engineers can model and solve interdependent equations using Mathcad — turning a “back-of-the-envelope” physics riddle into a clear and auditable engineering calculation. Along the way, we’ll see why this type of problem shows up far more often in real engineering work than you might expect.

    The Scenario 

    A stone is dropped into a vertical shaft.

    You measure the total time until you hear it hit the bottom.

    The depth of a mine shaft can be calculated by timing how long it takes a rock to fall (neglecting air resistance and the time it takes for the sound to get from the bottom of the shaft up to our ears) by using the equation: d = ½a*t² where a is the acceleration due to gravity and t is the fall time.

    We know that the acceleration of gravity is 9.807 m/s². Once we know the time, we can calculate the depth of the shaft.

    Creating User-Defined Functions with Mathcad 

    We will create a function in Mathcad called “Depth” with a variable of time (t). Simply define the variable and then list the inputs to the function in parenthesis and then tell Mathcad the equation using the input variables.

    Mathcad

    You can type the equation and put the value of t in parenthesis. Then, attach the units of seconds. Now you can test several variables of time and assign a variable to the results of the function.

    mathcad

    This illustrates the ease of user-defined functions in Mathcad.

    If we now include the time it takes the sound to travel from the bottom of the shaft to our ears, the calculation requires some iteration to find the depth of the shaft.

    We will write an equation for how long it takes the sound to get to your ears as a function of depth.

    The first part of the equation will calculate the time it takes for the rock to hit the bottom of the shaft and the second part of the equation will calculate how long it takes for the sound to get from the bottom of the shaft to reach your ears.

    Using the Solve function in Mathcad

    To solve the problem, create a function that will provide a solution using the solve keyword from the symbolic engine.

    Mathcad

    The time it takes for sound to get to the surface is the depth of the shaft divided by the velocity of sound.

    Mathcad

    Creating a Function in Mathcad

    To solve the problem, create a function that will provide a solution using the solve keyword from the symbolic engine.

    Mathcad

    Test the function for a measured time of 8 seconds.

    Mathcad

    The larger value comes from the negative value of time and can be ignored. Therefore, modify the function to select the minimum value of depth by using the min function.

    Mathcad

    Now that you have created a function to calculate the depth of the shaft, you can simply enter the measured time and get a direct solution of shaft depth.

    Mathcad

    Why Engineers Use Mathcad for Problems Like This

    This example mirrors many real engineering tasks:

    • Variables that depend on each other 
    • Equations that can’t be rearranged analytically 
    • A need for unit-aware, auditable calculations 
    • Clear documentation for review and reuse 

    With Mathcad, engineers can:

    • Write equations exactly as they appear on paper
    • Solve iterative problems automatically 
    • Keep calculations, assumptions, and results in one readable document 

    If your work involves complex calculations, iterative solving or technical documentation, Mathcad is built for exactly that.

    Bruker du ikke Mathcad enda?
    Calculations are at the heart of engineering. PTC Mathcad is mathematical software that lets you easily perform, analyse, document and share your calculations.