A nice and simple one is $$\int_0^\infty (2x^4-x^3)e^{-x}\, dx$$ This works, since for any natural number $n$, $$\int_0^{\infty} x^ne^{-x}\,dx = n!$$


Because $42$ is the fifth Catalan number then using the known integral representation of the Catalan's numbers we have that

$$C_5=\frac1{2\pi}\int_0^4x^5\sqrt{\frac{4-x}x}\,\mathrm dx=42$$

Playing with some change of variable above you can get different integral expressions. By example with the change of variable $(4-x)/x=t$ we can build the following improper integral

$$C_5=\frac{16}{\pi}\int_0^\infty\sqrt t\left(\frac12+\frac{t}2\right)^{-7}\mathrm dt=42$$


Maybe more interesting integral representations can be achieved considering first the integral representations for $21$, what is a number with more interesting properties.