Is the approach of using a function to simulate Longitudinal Wave not suitable?

do i need a another way to find the stationary Longitudinal Wave ?

it seems to be correct from traveling Longitudinal Wave.

thanks!