\(\frac{sin20}{cos20}+\frac{sin40}{cos40}+\frac{\sqrt{3}sin20.sin40}{cos20.cos40}=\frac{sin20cos40+cos40sin20}{cos20cos40}+\frac{-\frac{\sqrt{3}}{2}\left(cos60-cos20\right)}{cos20cos40}\)
\(=\frac{sin60}{cos20cos40}-\frac{\frac{\sqrt{3}}{2}\left(\frac{1}{2}-cos20\right)}{cos20cos40}=\frac{\sqrt{3}}{2}\left(\frac{1-\frac{1}{2}+cos20}{cos20cos40}\right)=\frac{\sqrt{3}}{2}\left(\frac{\frac{1}{2}+cos20}{\frac{1}{2}\left(cos60+cos20\right)}\right)\)
\(=\sqrt{3}\left(\frac{\frac{1}{2}+cos20}{\frac{1}{2}+cos20}\right)=\sqrt{3}\)