<jupyter_start><jupyter_text>Waves<jupyter_code>import numpy as np
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Contents1.[Progressive and stationary waves](Progressive_and_stationary_waves)- [Key terms](Key_terms)- [Longitudinal and transverse waves](Longitudinal_and_transverse_waves)- [Polarisation](Polarisation)- [Stationary waves](Stationary_waves)- [Principle of superposition](Principle_of_superposition)2.[Refraction, diffraction and interference](Refraction_diffraction_and_interference)- [Interference](Interference)- [Diffraction](Diffraction)- [Refraction](Refraction)  Progressive and stationary waves  Key terms Amplitude: - maximum displacement of a vibrating particle- distance from equilibrium to crest of trough Frequency (hertz Hz):- number of cycles of vibrating particle in a second- number of complete waves passing a point in a second- $f = \frac{1}{T}$ where T = time for 1 wave Wavelength ($\lambda$):- distance between 2 particles at same displacement and velocity at same time- distance between the same point on the wave cycle to the next/previous Wave speed:- speed of the wave- $\frac{\lambda}{f^{-1}} = \lambda f$- $c = \lambda f$ Phase:- fraction of cycle completed since start of cycle- phase difference if the distance between 2 particles of same frequency- phase difference in fraction of cycle = $\frac{d}{\lambda}$- phase difference in radians = $\frac{2\pi d}{\lambda}$- phase difference in degrees = $\frac{360 d}{\lambda}$  Longitudinal and transverse waves Longitudinal waves- direction of vibration of particles is parallel to direction of wave- eg. sound, primary seismic, compression waves- compressions and rarefaction Transverse waves- direction of vibration of particles is perpendicular to direction of wave- eg. electromagnetic, secondary seismic, waves on string Polarisation- Transverse waves are plane-polarised, vibrations stay in one plane- if vibrations change plane, its unpolarised- longitudinal waves cant be polarised- electromagnetic waves plane is the plane in which the electric field oscillates- the transmitter and receiver aerials need to be aligned to receive best reception  Stationary waves- When 2 progressive waves of same f meet- combine to create stationary waves- nodes: points where particles dont vibrate- antinodes: points where particles vibrate the most (midpoints between nodes)- distance between nodes = $\frac{\lambda}{2}$- first harmonic (fundamental mode of vibration) is when 2 nodes are on each end and 1 antinode in the middlefor first harmonic:$f = \frac{1}{2l}\sqrt{\frac{T}{\mu}}$where $\frac{1}{2l}$ = frequencyand T = tensionand $\mu$ = mass per unit length  Principle of superposition Superposition: At the point where waves meet, they combine until they move away total displacement = sum of individual displacements- supercrest: where 2 crests meet and combine- supertrough: where 2 troughs meet and combine- can cancel each other out eg. crest and trough- if amplitude is different its a minimum when canceling each other out<jupyter_code>x = np.linspace(0, 4*np.pi, 40*np.pi).astype(np.float32)

y = np.sin(x)
y2 = np.sin(x+np.pi)
y3 = y+y
y4 = y+y2

y5 = 1.2*y2+y


fig, ax = plt.subplots(figsize=(10,5))

ax.plot(x,y, '-g', label='progressive wave')
ax.plot(x,y2, '-r', label='progressive wave in other direction')
ax.plot(x,y3, '--g', label='progressive wave combining')
ax.plot(x,y4, '--r', label='progressive wave canceling')

ax.plot(x, y5, '--b', label='progressive wave minimum')

ax.grid(True)
ax.legend()
plt.show()<jupyter_output>/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py:1: DeprecationWarning: object of type <type 'float'> cannot be safely interpreted as an integer.
  """Entry point for launching an IPython kernel.
{'fraction_non_alphanumeric': 0.09695364238410596, 'fraction_numerical': 0.011920529801324504, 'mean_word_length': 5.476843910806175, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '431358', 'license': 'MIT', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1013, 'n_words': 439, 'path': 'Waves/Waves.ipynb', 'repo_name': 'KiranArun/A-Level_Physics', 'size': '3775'}