Lesson 12 of 15

Wave Superposition

Superposition of Two Waves

When two waves of equal frequency but different phases and amplitudes meet, their amplitudes add vectorially. The resultant amplitude is:

A=sqrtA12+A22+2A1A2cosphiA = sqrt{A_1^2 + A_2^2 + 2A_1 A_2 cosphi}

  • A1,A2A_1, A_2 — individual amplitudes
  • phiphi — phase difference (radians)
  • A — resultant amplitude

Two Extremes

phiphiResultName
0A1+A2A_1 + A_2Constructive interference
pipi$A_1 - A_2
pi/2pi/2sqrtA12+A22sqrt{A_1^2 + A_2^2}Quadrature

Examples

A1A_1A2A_2phiphiA
1102.0000 (double)
11pipi0.0000 (cancel)
11pi/2pi/21.4142 (sqrt2sqrt{2})
3407.0000

Your Task

Implement superpose(A1, A2, phi) returning the resultant amplitude.

Run the code to hear constructive then destructive interference.

Web Audio API loading...
Loading...
Click "Run" to execute your code.