The focal length \( f \) of a lens can be calculated using the lensmaker's formula:
\[
\frac{1}{f} = (n - 1) \left( \frac{1}{R_1} - \frac{1}{R_2} \right)
\]
where:
\( n \) is the refractive index of the lens material,
\( R_1 \) and \( R_2 \) are the radii of curvature of the two surfaces of the lens.
For a convex lens, both surfaces have radii of curvature of 40 cm, so:
\[
R_1 = 40 \, \text{cm}, \quad R_2 = -40 \, \text{cm}
\]
Note that \( R_2 \) is negative because the second surface of the lens is curved in the opposite direction.
Substitute these values into the lensmaker’s formula:
\[
\frac{1}{f} = (1.5 - 1) \left( \frac{1}{40} - \frac{1}{-40} \right)
\]
\[
\frac{1}{f} = 0.5 \left( \frac{1}{40} + \frac{1}{40} \right)
\]
\[
\frac{1}{f} = 0.5 \times \frac{2}{40} = \frac{1}{40}
\]
\[
f = 40 \, \text{cm}
\]
Thus, the focal length of the lens is 40 cm.