1
$\begingroup$

I am trying to recreate the following image in latex (pgfplots), but in order to do so I need to figure out the mathematical expressions for the functions

wavepacket

So far I am sure that the gray line is $\sin x$, and that the redline is some version of $\sin x / x$. Whereas the green line is some linear combination of sine and cosine functions.

Anyone know a good way to find these functions?

2 Answers 2

1

$f(x)=\frac{\sin\left(\frac{x-x_0}{k}\right)}{\frac{x-x_0}{k}}\cos\left(\frac{x-x_0}{h}\right) $

with $x_0=100$, $k=10$, $h=2$

enter image description here

1

The gray curve has maximum at $x=0$, so I'd use a cosine. All you need to do to write its function is determine the frequency. It completes one cycle ($2\pi$ radians) at the next peak.

The red line does indeed look like the form $\sin(x)/x$ but note that the peak is at $x=100$, and that the zero crossings occur three times for every $100$ units of $x$ (pretending there's a zero crossing at the peak; the sine has one even if the whole function doesn't). So you need to shift the position of the function and set its frequency. $\sin(a(x-100))\over{a(x-100)}$. All you have to do is figure out $a$ such that you get $\pi$ radians when $x$ changes by $33.333...$

The green curve looks like the product of the gray and red curves.