Two masses sit in a chain: m₁ is tied to a fixed wall by spring k₁ and damper c₁, and m₂ hangs off m₁ through spring k₂ and damper c₂. An applied force F(t) drives the second mass.
Each mass gets its own coordinate, x₁ and x₂, both measured from equilibrium and both positive to the right. A system with two masses has two degrees of freedom and therefore two equations. Declare both coordinates in the Workspace, along with the constants.
Cut each mass out on its own. On m₁: the wall spring and damper pull back, -k₁x₁ and -c₁ẋ₁, and the connecting spring pulls toward m₂, +k₂(x₂-x₁). On m₂: that same connecting spring pulls back the other way, -k₂(x₂-x₁), plus the applied force.
The connecting element is the part worth slowing down on. One spring produces two forces, equal in size and opposite in direction, one on each mass. Leaving the second one out is the most common way a multi mass derivation goes wrong.
Add a body for each mass. Give it its coordinate, its inertia, and the signed forces from its own free body diagram. A grouped term can be typed the way you wrote it, k₂(x₂-x₁), and the tool distributes it.
Applying ΣF = ma to each body in turn gives m₁ẍ₁ + (c₁+c₂)ẋ₁ - c₂ẋ₂ + (k₁+k₂)x₁ - k₂x₂ = 0 and m₂ẍ₂ + c₂ẋ₂ - c₂ẋ₁ + k₂x₂ - k₂x₁ = F. Terms in the other mass's coordinate are what couple the two equations together.
If the off diagonal terms do not match up, the Checks panel says so. That is the missing reaction force from step 2 showing itself.
Stacking the equations puts them in matrix form, M ẍ + C ẋ + K x = F, where row i is body i and column j is coordinate j. Transforming under zero initial conditions collapses all three into one impedance matrix, Z(s) X(s) = F(s) with Z(s) = Ms² + Cs + K.
From there any transfer function is Cramer's rule: Xᵢ(s)/Fⱼ(s) is a cofactor of Z over det Z(s). The determinant is the characteristic polynomial, degree 2n, and its roots are the poles every transfer function in the system shares. With numbers in place, det(K - ω²M) = 0 gives the undamped natural frequencies and each mode shape.
This is not a black box that guesses your equations of motion from a picture. It builds them the way you would by hand: from a list of forces you supply for each mass, every one signed relative to a direction you pick. The tool's job is arithmetic and bookkeeping, not judgment. Deciding what forces act on which body, and which way they push, is still yours to do.
That division of labor matters. A tool that hides the free body diagram from you teaches you nothing and gives you no way to catch your own mistake. This one keeps the physics in your hands and takes over only once the physics is settled: summing terms, assembling the matrices, transforming to the Laplace domain, running Cramer's rule, and solving the eigenvalue problem for the modes.
Systems of one to four masses are supported. One mass gives the familiar second order equation. More than one gives a coupled set, and the coupling is where most of the work and most of the mistakes live.
A mechanical system with one coordinate has one equation of motion. For a mass on a spring and damper, Newton's second law states that the sum of the forces acting on the mass equals its mass times acceleration. Collecting the inertia term, the damping term, and the stiffness term on the left and the applied forcing on the right gives the standard second order form.
m ẍ + c ẋ + k x = F(t)
Here m is the inertia, c the viscous damping coefficient, k the stiffness, and F(t) the applied force. The overdots denote derivatives with respect to time, so ẋ is velocity and ẍ is acceleration. Any single degree of freedom mechanical system reduces to this same shape once the forces are summed, which is why the classification below depends only on the three coefficients and not on the particular springs, dampers, or geometry that produced them.
A restoring force such as a spring opposes the coordinate, so kx enters the force balance with a negative sign when the positive direction points along increasing x. Damping opposes velocity, so c ẋ is also negative. The applied force keeps whatever sign it has relative to the chosen positive direction. Moving the coordinate dependent terms to the left of the equals sign flips their signs, which is how the familiar all positive left hand side arises. Getting a sign wrong does not produce an error message from an equation solver. It produces a physically wrong model that looks correct, which is why the tool asks you to state each sign explicitly rather than inferring it.
Every inertia in a system contributes one equation. Two masses give two equations, three give three, and so on. Each one is Newton's second law applied to that body alone, along that body's own coordinate, with every force acting on it accounted for.
What ties the equations together is the elements that span two bodies. A spring joining m₁ and m₂ exerts a force on both, equal in magnitude and opposite in direction. Written from the first mass's free body diagram it is +k₂(x₂ − x₁), and from the second's it is −k₂(x₂ − x₁). Both must appear, in their own equations, or the model is not the system you drew.
m₁ ẍ₁ + (c₁+c₂) ẋ₁ − c₂ ẋ₂ + (k₁+k₂) x₁ − k₂ x₂ = 0
m₂ ẍ₂ − c₂ ẋ₁ + c₂ ẋ₂ − k₂ x₁ + k₂ x₂ = F(t)
Terms in the other coordinate are the coupling. Without them the two masses would move independently and the whole point of the problem would be gone.
Stacking the coupled equations and pulling out the coefficients gives the standard matrix form, where row i is the equation for body i and column j holds the terms in coordinate j.
M ẍ + C ẋ + K x = F
The mass matrix M is usually diagonal, since a body's own inertia multiplies its own acceleration. Off diagonal mass terms do turn up when a coordinate is not aligned with a single body, as with a rigid bar that both translates and rotates. The damping matrix C and stiffness matrix K carry the coupling, and for a system built from ordinary springs and dampers both come out symmetric: the entry in row 1 column 2 matches the entry in row 2 column 1.
That symmetry is a free correctness check, and the tool runs it for you. If the off diagonal pair does not match, a note appears, because the usual cause is a reaction force that got left out of one of the free body diagrams. It is flagged rather than blocked, since genuinely one way coupling does exist in systems with followers or gyroscopic terms.
The Laplace transform turns the differential equation into an algebraic one. Under zero initial conditions each time derivative becomes a factor of s: acceleration ẍ maps to s² X(s), velocity ẋ maps to s X(s), and position x maps to X(s). Applying this to the equation of motion gives the transformed relation.
(m s² + c s + k) X(s) = F(s)
The polynomial multiplying X(s) is the characteristic polynomial of the system. Solving for the ratio of the transformed output to the transformed input gives the transfer function, which describes how the system responds to any input without re solving the differential equation each time.
X(s) / F(s) = 1 / (m s² + c s + k)
With several masses the same transform applies to every equation at once, and all three matrices fold into a single impedance matrix.
Z(s) X(s) = F(s), Z(s) = Ms² + Cs + K
Now there is a transfer function for every pairing of an output coordinate with an input force, and the way to get any one of them is Cramer's rule. Inverting the impedance matrix means dividing its adjugate by its determinant, so the ratio of output i to input j is one entry of that adjugate over the determinant.
Xᵢ(s) / Fⱼ(s) = adj Z(s)ᵢⱼ / det Z(s)
The denominator is the same for every pair. Only the numerator changes with which output you are watching and which input you are driving, which is why the poles of a system belong to the system and not to any one input output pair. For a two mass chain driven at the first mass, the numerator of X₁/F₁ comes out as m₂s² + c₂s + k₂, the impedance of everything hanging off the driven mass, and the numerator of X₂/F₁ is just c₂s + k₂, the connecting element on its own.
Setting that shared denominator to zero gives the characteristic equation of the system.
det (Ms² + Cs + K) = 0
For n degrees of freedom it is a polynomial of degree 2n, so a two mass system is quartic and a three mass system is sextic. Its roots are the poles: each conjugate pair corresponds to one damped mode, with the distance from the origin giving that mode's natural frequency and the angle giving its damping ratio. Real roots correspond to non oscillating decay. The tool expands the determinant symbolically when the result is short enough to be worth reading and otherwise leaves it in determinant form, since an expanded three mass determinant with general damping runs to dozens of terms and helps nobody.
Drop the damping and the forcing and a multi degree of freedom system has a set of natural frequencies, one per degree of freedom, each with a shape describing how the masses move relative to one another. Assuming a synchronous motion x = φ sin(ωt) turns the equations into a generalized eigenvalue problem.
(K − ω² M) φ = 0
A nonzero φ requires the matrix to be singular, so the natural frequencies come from det(K − ω²M) = 0, a polynomial of degree n in ω². Substituting each root back and finding the null space of K − ω²M gives that mode's shape. Shapes are reported scaled so the largest entry is 1, since only the ratios between entries mean anything.
The shapes are worth reading physically. In the first mode of a two mass chain both entries usually share a sign, so the masses move together. In the second they differ, so the masses move against each other, which is why the second natural frequency is the higher one. A zero natural frequency means a rigid body mode, a direction in which the whole system can drift without any spring resisting.
When the three coefficients are numeric, the second order system has two standard descriptors. The undamped natural frequency and the damping ratio follow directly from the coefficients.
ωn = √(k / m) ζ = c / (2 √(k m))
The natural frequency sets how fast the system oscillates in the absence of damping, and the damping ratio sets whether and how quickly those oscillations decay. The roots of the characteristic polynomial, the poles of the transfer function, determine the response type:
The tool reports these values automatically once every coefficient is a number. With symbolic coefficients it leaves the results in symbolic form, since a damping ratio has no numeric value until m, c, and k do.
Leaving the force list empty models free vibration: the system moves only under its own inertia, stiffness, and damping. In that case the transfer function is replaced by the characteristic equation, whose roots are the poles that govern the natural response. Adding a force term models forced response, where the constant step input F₀ transforms to F₀/s. Both cases run through the same force accounting; the only difference is whether a right hand side term is present.
Not every moving coordinate needs solving for. A vibrating base under a suspension moves in a way you already know, so it belongs on the right hand side as a known input rather than in the matrix as an unknown.
The rule the tool follows is simple: a coordinate that has a body of its own is a degree of freedom and goes into the matrix, and a coordinate with no body stays on the right as a prescribed input. Declare z, use it in force terms, and give it no body, and a base excited system reduces to the standard form m ẍ + c ẋ + kx = c ż + kz, with the transfer function view showing the transmissibility X(s)/Z(s). Add a body for z later and the same entry becomes a two degree of freedom problem instead, with no retyping.
Most of what goes wrong in a multi mass derivation is not algebra, it is bookkeeping, so the Checks panel watches for the specific mistakes that produce a plausible looking but wrong model. A stiffness or damping matrix that is not symmetric usually means a connecting element was written into one equation and forgotten in the other. An effective damping or stiffness that comes out negative usually means a sign slipped. A pole with a positive real part means the response grows rather than decays, which is worth knowing before you trust the answer.
None of these block you, because each one is legitimate in some system somewhere. They are the questions a marker would ask, raised at the point where you can still answer them.
One to four inertias, with linear stiffness and damping, and any additional coordinates appearing as prescribed inputs. Every term must be linear in the coordinates and their derivatives, and derivatives above second order are rejected, since second order systems are the intended scope. Nonlinear terms, nonzero initial conditions, time domain response plots, and schematic entry are not supported. The four body cap is deliberate: a four degree of freedom determinant is already degree eight, and past that the output stops being something you can check by hand, which is the whole point of the exercise.
Enter every force term acting on each mass, tag its sign relative to your chosen positive direction, and build up the equations the same way you would on paper. The tool sums the terms, assembles the mass, damping, and stiffness matrices, applies the Laplace transform, forms any transfer function you ask for by Cramer's rule, and reports the natural frequencies, mode shapes, damping ratios, and poles when the coefficients are numeric. It runs entirely in the browser with no account required.
The equation of motion is a differential equation in the time domain: it relates the coordinate and its derivatives directly, as in m ẍ + c ẋ + kx = F(t). The transfer function is the same relationship after a Laplace transform, expressed as a ratio of polynomials in s. Both describe the same system; the transfer function form is what you use for block diagram algebra, frequency response, and control design.
A transfer function is defined as an output over an input. If no force term is entered, there is no input, so there is nothing to divide by. The tool falls back to the characteristic equation, ms² + cs + k = 0, whose roots are still the poles that set the system's natural response.
The natural frequency and damping ratio are only numbers once m, c, and k are all numbers. If any constant is left as a symbol, the tool keeps the equation of motion and transfer function in symbolic form and does not attempt to compute a natural frequency or damping ratio from an unknown.
No. The Laplace transform used here assumes zero initial conditions, which is the standard assumption for deriving a transfer function. A nonzero initial condition problem is solved differently, by carrying the initial position and velocity terms through the transform, and is outside the scope of this tool.
Yes, up to four. Add one body per mass, give each its own coordinate and its own force list, and the tool writes one equation of motion per body, assembles the mass, damping, and stiffness matrices, and solves the coupled set together. A coordinate that has no body of its own is treated as a prescribed input instead, which is how base excitation is handled.
Enter both masses as separate bodies with numeric values throughout. Once every coefficient is a number, the tool solves det(K − ω²M) = 0 for the undamped natural frequencies and takes the null space of K − ω²M at each root as that mode's shape. Shapes are scaled so the largest entry is 1 and listed in the order the coordinates were declared, so [0.59, 1] means the first mass moves 0.59 units for every 1 the second moves, in the same direction.
The determinant of the impedance matrix set to zero, det(Ms² + Cs + K) = 0. For n degrees of freedom it is degree 2n in s, and its roots are the poles shared by every transfer function of the system. It is the same object as ms² + cs + k = 0 for a single mass, just with matrices in place of scalars.
Because a spring or damper joining two bodies exerts a force on both, and one of them is missing. If +k₂(x₂ − x₁) appears in the first equation, then −k₂(x₂ − x₁) has to appear in the second. The tool compares the off diagonal entries of the stiffness and damping matrices and raises a note when they do not match, which is almost always this.
For summing forces or moments before setting up an equation of motion, see the vector resultant calculator. For finding the mass moment of inertia of a composite shape, see the centroid and inertia tool.