Optional Practical: 1D Waves simulation (GeoGebra)


In this exercise GeoGebra will be used to build a simulation of wave from individual oscillating particles but first let’s consider a single particle. This worksheet is written for students who already know the basics of using GeoGebra.

Simple Harmonic motion

When a particle undergoes simple harmonic motion its displacement (y) from the equilibrium position varies with time (t) according to a sine function.

y = rsin(2πft)

r = amplitude
f = frequency

  • Create sliders for r (0 to 5), f (0 to 5) and t (0 to 10)
  • Place a point A on the graph, double click it an replace the coordinates displayed with (0, r*sin(2*pi*f*t))
  • Right click the t slider and run animation

Point A should now oscillate up and down with SHM.

Phase difference

When two oscillations are in time with each other they are said to be in phase

  • Add a second point B and replace its coordinates with (2, r*sin(2*pi*f*t-pi))
  • Run the animation and observe the phase difference, the phase difference is π
  • Double click the point and edit the phase difference so it is 2*pi and observe the difference.

To make a variable phase difference you can base the phase angle on a slider.

  • Create a slider k (0 to 10)
  • Replace the phase angle for point B with k*2*pi.
  • Run the animation to see how the phase changes as you change the value of k. Remember the phase angle is k x 2π.

A wave is made from a line of points that are oscillating out of phase with one another. The points get more and more out of phase as they get further from the origin, so their phase is related to the distance from the origin. To model this you can make the phase angle related to the x value.

  • Hide point B.
  • Add a 3rd point, C that has coordinates (k, r sin(2π f t - k π))
  • Observe how the phase change is related to the position of the particle.
  • Set the k value to 2 and see how the particles are in phase.

The distance between two consecutive in phase points on a wave is known as the wavelength (λ).

  • Create a slider for λ (0 to 5).
  • Change the phase angle of point C to 2*pi*k/λ
  • Run the simulation and observe how the phase of point c changes as you vary its position (k).
  • What is the phase difference when k = λ?
  • What is the phase difference when k = λ/2?

Making a wave

To create a simulation of a wave we need to have a line of points that oscillate with slightly different phase. This can be done in GeoGebra with the sequence function.

  • Type sequence in the input bar and choose the following

Sequence[ Expression, Variable, Start Value, End Value, Increment ]

Let’s first make a line of points on the x axis from 1 to 10 separated by 0.1

  • Input Sequence[(i,0),i,0,10,0.1]

This makes a point for coordinates (i,0) where i varies from 1 to 10 with separated by 0.1. For a wave the line of points has y = 0 but each point should have a displacement that depends on its position

  • Input Sequence[(i, r sin(2π f t - 2π i / λ)), i, 0, 10, 0.1] this will make the y coordinate of each point depend on the x coordinate (i)
  • Try varying the values of f, r and λ
  • Calculate wave velocity by inputting v = f*λ
  • Try changing the sign of the phase angle from - 2π i / λ to +2π i / λ, what effect does this have on the wave?

Longitudinal wave

The previous example is a transverse wave since the displacement of the particles is perpendicular to the wave direction the equation of a longitudinal wave is the same except the displacement is in the x direction. This is a bit tricky, see if you can work out how to do it, the answer is hidden below.

Sequence[(r sin(2π f t - 2π i / λ) + i, 0), i, 0, 10, 0.1]

Each point has y = 0
For each value i the point has an x value which varies with time with phase angle dependent on x
Adding i to r sin(2π f t - 2π i / λ) makes each value of x one step along the axis

  • Try varying f, r and λ
  • Display the longitudinal and transverse waves at the same time and observe the relationship.

All materials on this website are for the exclusive use of teachers and students at subscribing schools for the period of their subscription. Any unauthorised copying or posting of materials on other websites is an infringement of our copyright and could result in your account being blocked and legal action being taken against you.