## How do I implement custom integral transform with kernel $\cos^2 (zx)$ or $|\cos (zx)|$ in Mathematica?

Since $ \cos^2(t)=\frac{1}{2}+\frac{1}{2}\cos t$ you have $ $ F\{f\}(z)=\int_{-\infty}^{\infty} f(x) \cos^2(zx)dx= \int_{-\infty}^{\infty} f(x) \left(\frac{1}{2}+\frac{1}{2}\cos(2zx)\right)dx $ $ So you can use `FourierCosTransform`

as

```
F[f_] := (Integrate[f, {x, -Infinity, Infinity}] +
FourierCosTransform[f, x, 2 z])/2
```