how to solve for sine square triangular wave problem how to solve for sine square triangular wave problem