k_0 = 1.5 (slider from 0.05 to 5, step 0.05)
σ = 0.5 (slider from 0.05 to 2, step 0.05)
N = 1 (slider from 1 to 100, step 1)
l: (3 * σ)
f(x) = sin((k_0 * x))
g(x) = exp(((-(x - k_0)^(2))) / ((2 * σ^(2)))) / ((σ * sqrt((2 * pi))))
l1 = Sequence(Segment[(k_0 - l + (((n - 2) * 2) * l / (N + 1)), 0), (k_0 - l + (((n - 2) * 2) * l / (N + 1)), g(k_0 - l + (((n - 2) * 2) * l / (N + 1))))], n, 3, N + 2)
h = Sum((sin(((k_0 - l + (((n - 2) * 2) * l / (N + 1))) * x)) * g(k_0 - l + (((n - 2) * 2) * l / (N + 1)))), n, 3, N + 3)