Large difference in wavelength:
Small difference in wavelength:
Click to download: waves_beat.tex • waves_beat.pdf
Open in Overleaf: waves_beat.tex


Edit and compile if you like:
% Author: Izaak Neutelings (December 2020)\documentclass[border=3pt,tikz]{standalone}\usepackage{amsmath}\usepackage{etoolbox} % ifthen\usepackage{tikz}\usetikzlibrary{arrows.meta} % for arrow size\tikzset{>=latex} % for LaTeX arrow head\colorlet{xcol}{blue!70!black}\colorlet{vcol}{green!60!black}\colorlet{myred}{red!80!black}\colorlet{myblue}{blue!80!black}\colorlet{mypurple}{blue!50!red!80}\colorlet{metalcol}{blue!25!black!30!white}\tikzstyle{vvec}=[->,vcol,very thick,line cap=round]\tikzstyle{node}=[xcol,scale=0.8]\tikzstyle{metal}=[draw=metalcol!10!black,rounded corners=0.1,top color=metalcol,bottom color=metalcol!80!black,shading angle=10]\tikzstyle{ring}=[metalcol!20!black,double=metalcol!70!black,double distance=1.2,line width=0.3]\tikzstyle{rope}=[brown!20!black,double=brown!70!black,double distance=1.2,line width=0.6] %very thick,line cap=round\tikzstyle{wood}=[draw=brown!80!black,rounded corners=0.1,top color=brown!80,bottom color=brown!80!black!80,shading angle=10]\def\tick#1#2{\draw[thick] (#1) ++ (#2:0.1) --++ (#2-180:0.2)}\begin{document}\def\xmax{6.48}\def\ymax{0.9}\def\A{0.78} % amplitude\def\s{4.7*\A} % shift\def\N{400} % number of points for plot\def\fa{1.775} % wavelength 1\def\fb{2.20} % wavelength 2\def\waves{% TWO WAVES\draw[->,thick] (-0.2*\ymax,0) -- (0.4+\xmax,0) node[right=4,below left=1] {$t$};\draw[->,thick] (0,-\ymax) -- (0,0.2+\ymax) node[below=2,above left=-3] {$y$};\tick{0,\A}{0} node[scale=0.9,left=-1] {$A$};\tick{0,-\A}{0} node[scale=0.9,left=-1] {$-A$};
Click to download: waves_beat.tex • waves_beat.pdf
Open in Overleaf: waves_beat.tex
Shouldn’t the variable be “t” ?
Hi Nora, Yes, you’re right. I fixed it. Thank you for commenting.