Harmonic Wave Equation Calculator

Harmonic Wave Equation Calculator gives the displacement y of a wave at any position and time, or solves for the amplitude, time, position or initial phase when y is already known.

Quick Setup

y = A sin((2π ÷ λ)(x − v t) + φ): the displacement at one point and time.

Phase, Direction, Unitsφ 0 rad · +x · sin · SI

Phase shifts the wave. Direction flips the sign of the time term.

Displacement (y)
1.486 cm
Phase θ = 0.8378 rad (48° into the cycle), sin θ = 0.7431
−0.6727 m/s Particle Velocity
Particle Acceleration−37.55 m/s²
Wave Slope (∂y/∂x)0.05606
Each bit of the medium moves up and down, not along the wave. Its velocity is the time rate of y and its acceleration is −ω² times y.
1.005 m/s Peak Particle Velocity
Peak Acceleration50.53 m/s², 5.153 g
Next Crest Reaches x In110.4 ms
The fastest and hardest the medium ever moves: A ω as it crosses the middle, A ω² at the turning points. Neither depends on x.
4.189 rad/m Wave Number
Waves per Meter0.6667
Half Wavelength75 cm
How the wave is laid out in space. The crest pattern moves at the wave speed, which is ω ÷ k and also frequency times wavelength.
8 Hz Frequency
Period (T)125 ms
Angular Frequency (ω)50.27 rad/s
How the wave repeats in time. One period is the time for a full cycle at any fixed point, and ω is 2π times the frequency.
Step-by-Step Calculationy = 1.486 cm
  1. Amplitude: A = 2 cm = 0.02 m
  2. Wave number: k = 2π ÷ λ = 6.28319 ÷ 1.5 = 4.18879 rad/m
  3. Angular frequency: ω = k × v = 4.18879 × 12 = 50.2655 rad/s
  4. Phase: θ = k x − ω t + φ = 3.35103 − 2.51327 + 0 = 0.837758 rad
  5. Displacement: y = A × sin(θ) = 0.02 × 0.743145 = 0.0148629 m = 1.486 cm
  6. Particle velocity: ∂y/∂t = −0.672683 m/s
  7. Particle acceleration: −ω² × y = −37.5529 m/s², or −3.829 g
This Point Over One PeriodT = 125 ms
TimeDisplacementVelocity
50 ms1.486 cm−0.6727 m/s
65.63 ms1.047 mm−1.004 m/s
81.25 ms−1.338 cm−0.7471 m/s
96.88 ms−1.997 cm−52.61 mm/s
112.5 ms−1.486 cm0.6727 m/s
128.1 ms−1.047 mm1.004 m/s
143.8 ms1.338 cm0.7471 m/s
159.4 ms1.997 cm52.61 mm/s
175 ms1.486 cm−0.6727 m/s
Along the Wave at This Timeλ = 1.5 m
PositionDisplacementPhase
80 cm1.486 cm48°
98.75 cm1.997 cm93°
1.175 m1.338 cm138°
1.363 m−1.047 mm183°
1.55 m−1.486 cm228°
1.738 m−1.997 cm273°
1.925 m−1.338 cm318°
2.113 m1.047 mm3°
2.3 m1.486 cm48°
Wave Snapshottravels toward +x
wave travelstwo wavelengths, 3 m wide+A−A

The dot is the point at x = 80 cm, 1.486 cm above the rest line and moving down. The whole pattern slides toward +x at 12 m/s.

Displacement Is 74.31% of the Amplitude
At x = 80 cm and t = 50 ms the point sits 1.486 cm above the rest line, moving down at 0.6727 m/s. The wave itself travels toward +x at 12 m/s. That is the speed of the pattern, not of the medium.

Harmonic Wave Equation Calculator Formula

The Harmonic Wave Equation Calculator finds the displacement y of one point on a traveling sine wave at one moment. It works from the amplitude, the wavelength, the wave speed, a position x and a time t. It can also run backward and solve for the amplitude, time, position or initial phase when y is known.

A harmonic wave is a wave with a sine or cosine shape that moves along at a steady speed. Every point of the medium repeats the same up-and-down motion, only at a different stage of the cycle. The equation for a harmonic wave ties those points together.

$$y(x,t) = A \sin\left(\frac{2\pi}{\lambda}(x – vt) + \phi\right)$$

Textbooks often write the same wave in a shorter form with the wave number k and the angular frequency ω. OpenStax University Physics gives it as Equation 16.4.

$$y(x,t) = A \sin(kx – \omega t + \phi)$$

The two forms are one equation, because k = 2π ÷ λ and ω = k × v. The bracket is called the phase, and the Harmonic Wave Equation Calculator reports it as θ in radians and in degrees.

SymbolMeaningUnits accepted
yDisplacement of the point from its rest lineResult
AAmplitude, the largest displacementcm, m, mm, µm, in, ft
λWavelength, the length of one full cyclem, cm, mm, µm, nm, km, in, ft
vWave speed, how fast the pattern travelsm/s, cm/s, mm/s, km/s, km/h, ft/s
xPosition of the point along the waveSame length units as λ
tTime since the clock starteds, ms, µs, ns, ps, fs, min
φInitial phase, the phase at x = 0 and t = 0rad, degrees, multiples of π
kWave number, 2π ÷ λrad/m, rad/cm, rad/mm
ωAngular frequency, 2π × frad/s, degrees per second
fFrequency, cycles per secondHz, mHz, kHz, MHz, GHz, THz

Four Ways to Enter the Wave

Physics problems describe the same wave in different pairs of quantities. The “Wave Given As” list in the Harmonic Wave Equation Calculator takes four of those pairs and works out the rest. Amplitude, position and time are needed in every case.

Wave Given AsWhat is derivedResult at the default values
Wavelength and Speed (λ, v)k = 2π ÷ λ, ω = k × v1.5 m and 12 m/s give 8 Hz
Wave Number and ω (k, ω)λ = 2π ÷ k, v = ω ÷ k4 rad/m and 50 rad/s give 1.571 m and 12.5 m/s
Wavelength and Frequencyω = 2π × f, v = f × λ1.5 m and 10 Hz give 15 m/s
Frequency and Speed (f, v)λ = v ÷ f, k = ω ÷ v10 Hz and 12 m/s give 1.2 m

The second option suits a wave handed over as a finished equation. OpenStax Example 16.3 gives y = 0.2 m sin(6.28 x − 1.57 t). Enter 0.2 m, 6.28 rad/m and 1.57 rad/s, and the cards show a 1.001 m wavelength, a 4.002 s period and a wave speed of 0.25 m/s.

The textbook rounds those answers to 1.0 m, 4 s and 0.25 m/s. The small difference comes from 6.28 and 1.57 being rounded values of 2π and π ÷ 2.

The last option is the usual way a sound wave is stated. A 440 Hz tone at 343 m/s has a wavelength of 77.95 cm and a wave number of 8.06 rad/m. That also covers the wavelength in a medium, since λ is the speed in that medium divided by the frequency.

To go from wavelength to period, divide by the wave speed. A 1.5 m wave at 12 m/s has a period of 125 ms. The Frequency Calculator does the same conversion with preset speeds for sound and light.

Worked Example at the Default Values

The Harmonic Wave Equation Calculator opens with a 2 cm amplitude, a 1.5 m wavelength and a 12 m/s wave speed. The point sits at x = 0.8 m and the time is 0.05 s. The initial phase is zero and the wave travels toward +x.

The wave number comes first. It is 2π ÷ 1.5, which is 4.189 rad/m. The angular frequency is that figure times the speed, 50.27 rad/s. The frequency is therefore 8 Hz.

The phase is k × x minus ω × t. That is 3.351 − 2.513, which leaves 0.8378 rad, or 48° into the cycle. The sine of that angle is 0.7431.

The displacement is the amplitude times that sine. 2 cm × 0.7431 gives 1.486 cm above the rest line. The Step-by-Step Calculation panel lists each of these lines with six significant figures.

Two more panels put the answer in context. “This Point Over One Period” follows the same point through nine times, one eighth of a period apart. “Along the Wave at This Time” freezes the clock and moves along x in steps of λ ÷ 8, so the phase column rises 45° per row.

The second card also gives the wait until the next crest reaches the point. Here it is 110.4 ms, a little less than the 125 ms period, because a crest passed the point shortly before.

Solving for A, t, x or φ From y

The Calculate list at the top turns the harmonic wave equation around. Pick one unknown, type the Known Displacement, and the Harmonic Wave Equation Calculator solves for that unknown. The phase that produces a given y comes from an inverse sine.

$$\theta = \arcsin\left(\frac{y}{A}\right)$$

A sine wave passes through the same height twice in each cycle, once rising and once falling. The second phase is π − θ, so time, position and initial phase each come back with two answers.

CalculateAnswer with y = 1 cm and the other defaults
Amplitude (A) from y1.346 cm
Time (t) from y14.58 ms, next at 56.25 ms, repeating every 125 ms
Position (x) from y72.5 cm, next at 1.225 m, repeating every 1.5 m
Initial Phase (φ) from y−0.3142 rad (−18°), or 1.78 rad (102°)

Time and position answers are the first ones counted from zero. Later ones follow by adding whole periods or whole wavelengths. The phase answers sit between −π and π, and any whole number of turns can be added to them.

Some requests have no answer, and the tool says why. A displacement larger than the amplitude is refused. So is an amplitude solve where y is zero, or where y is on the opposite side of the rest line from the wave at that point.

One unknown is solved at a time. A problem with two unknowns, such as the wavelength and speed from two measured points, still needs the two equations worked by hand.

Phase, Direction and Sine or Cosine

Three settings sit in the “Phase, Direction, Units” panel of the Harmonic Wave Equation Calculator. Each one changes the answer without changing the wave’s size or speed.

The initial phase φ slides the whole pattern along. It can be typed in radians, in degrees or as a multiple of π, so π ÷ 2 is entered as 0.5.

Direction of Travel sets the sign of the time term. A wave moving toward +x uses kx − ωt, and a wave moving toward −x uses kx + ωt. With the default numbers, switching to −x moves the phase to 336° and the displacement to −8.135 mm.

Wave Function swaps sine for cosine. A cosine wave is a sine wave with π ÷ 2 added to the phase. The default wave gives 1.338 cm as a cosine, and the sine version gives the same 1.338 cm once φ is set to 0.5 π.

Transverse Wave Velocity and Acceleration

The wave pattern moves along x, but each piece of the medium only moves up and down. That transverse motion has its own velocity and acceleration, and the Harmonic Wave Equation Calculator works both out from the same phase.

$$v_y = -A \omega \cos(kx – \omega t + \phi)$$

$$a_y = -\omega^2 y$$

At the default values the point is moving down at 0.6727 m/s. Its acceleration is −37.55 m/s², which the step list also gives as −3.829 g. The Wave Slope row shows how steep the wave is at the point, 0.05606 here, and the wave speed times that slope is the same 0.6727 m/s.

The second card holds the limits of that motion. The peak particle velocity is A × ω and the peak acceleration is A × ω². For the default wave they are 1.005 m/s and 50.53 m/s², with the acceleration also shown as 5.153 g.

Neither figure is the wave speed. The pattern travels at 12 m/s while no part of the medium moves faster than 1.005 m/s. The two speeds are easy to mix up in transverse wave problems, so the message under the cards names each one.

Vibration work uses the same peak formulas with frequency and amplitude alone. Choose Wavelength and Frequency, enter 1 mm and 50 Hz, and leave any wavelength in place. The peak velocity is 0.3142 m/s and the peak acceleration is 98.7 m/s², or 10.06 g.

For ω from a spring or a pendulum, the Angular Frequency Calculator has those inputs. A motion that fades with each cycle needs the Damping Ratio Calculator as well.

Wavelength, Wave Number and 1/λ

In physics λ is the wavelength. OpenStax defines it as the length of the wave, measured between any two matching points such as neighboring crests. Its SI unit is the meter.

What is 1 lambda equal to?

One λ is one full wavelength, the distance the wave travels in one period. It equals the wave speed divided by the frequency, and it also equals 2π ÷ k. A phase change of 2π, or 360°, is one λ of travel.

What is 1/lambda equal to?

It is the number of wave cycles that fit in one unit of length. The third card shows it as Waves per Meter, and for a 1.5 m wavelength the value is 0.6667. Multiplying 1/λ by 2π gives the wave number k in rad/m.

How do you find lambda from Hz?

Divide the wave speed by the frequency. In the Frequency and Speed option of the Harmonic Wave Equation Calculator, 10 Hz at 12 m/s gives a 1.2 m wavelength. The speed has to be the speed in the medium the wave is actually in.

What is a 1000 nm wavelength?

It is near-infrared light, just beyond the red end of the visible range. Enter 1000 nm with a wave speed of 299,792 km/s and a time of 0. The frequency card reads 299.8 THz and the period is 3.336 fs.

Is this the λ used in linear algebra?

No. In linear algebra λ stands for an eigenvalue of a matrix, which is a pure number with no link to waves. Questions about eigenvalues and eigenvectors belong to that subject, not to the harmonic wave equation.

Sound, Light and Electromagnetic Waves

The harmonic wave equation is not limited to strings. OpenStax names three basic types of waves, which are mechanical waves, electromagnetic waves and matter waves. By motion there are two main kinds, transverse and longitudinal.

In a transverse wave the medium moves at right angles to the direction of travel, as on a guitar string. In a longitudinal wave it moves back and forth along that direction, as in sound. The same equation describes both, with y read as the sideways or the lengthwise shift.

For an electromagnetic wave y stands for the strength of the electric or magnetic field. NASA lists seven regions of that spectrum, running from radio waves through microwaves, infrared, visible light, ultraviolet and X-rays to gamma rays.

The amplitude field in the Harmonic Wave Equation Calculator takes length units only. A field strength in V/m or a sound pressure in pascals can still be typed as a number, and the result then carries the same proportion of that amplitude. The hero line gives that proportion as sin θ.

Light needs one extra step. Its phase grows by about 2 × 10¹⁵ radians every second, so an ordinary time such as 0.05 s is refused as too extreme. Set Time to 0, or switch its unit to fs and enter a few femtoseconds. At t = 1 fs the 1000 nm wave calculates normally.

Harmonic Wave, SHM and Harmonics

These three terms sound alike and mean different things. The Harmonic Wave Equation Calculator handles the first, and its velocity and acceleration cards overlap with the second.

What is the SHM equation?

Simple harmonic motion is the motion of a single oscillator, written x(t) = A cos(ωt + φ). Fix x in the harmonic wave equation and each point of the medium follows that same law. Here φ is the phase shift in radians and ω is the angular frequency.

Is F = −kx simple harmonic motion?

Yes. A restoring force that is proportional to the displacement and points back toward the middle is the condition for SHM. For a mass on a spring it leads to ω = √(k ÷ m). The Hooke’s Law Calculator works with that spring force.

How do you calculate velocity in SHM?

The velocity is v(t) = −A ω sin(ωt + φ), with a peak of A × ω at the middle of the swing. At a known displacement the speed is ω × √(A² − x²). The default wave checks out, since 50.27 × √(2² − 1.486²) cm/s is the same 0.6727 m/s.

How do you calculate energy in SHM?

The total energy of a spring oscillator is ½ k A², where k is the spring constant. A wave on a string carries ½ μ A² ω² λ in each wavelength, where μ is the mass per meter. Both need a mass or stiffness, so neither is an output of this tool.

How are harmonics calculated?

Harmonics are the standing-wave frequencies of a string or pipe. On a string fixed at both ends the formula is fn = n × v ÷ (2 L). The first harmonic is the fundamental, and the second and third are two and three times that frequency.

A standing wave is two equal harmonic waves moving in opposite directions, which add up to y = 2A sin(kx) cos(ωt). The Harmonic Wave Equation Calculator evaluates one traveling wave at a time and does not add two. The Frequency Calculator lists the first six harmonics of any frequency.

What is the law of harmonics?

For strings it is the rule above, that every harmonic is a whole-number multiple of the fundamental. The name is also used in astronomy for Kepler’s third law, which links the square of a planet’s period to the cube of its orbit size.

Is SHM important for JEE Main?

Oscillations and Waves is a unit of the JEE Main physics syllabus. It lists SHM and its equation, energy in SHM, the displacement relation for a progressive wave, standing waves and harmonics. The progressive wave relation is the harmonic wave equation worked here.

More tools for repeating motion are on the Rotational Motion Calculators hub, next to the angular speed and circular motion tools.