The above serve as guides to the selection of the proper ultrasonic frequency for a particular application but may be a little "long-winded" for those looking for answers regarding just 25 and 40kHz. So let me summarize.
First off, the difference between the cleaning performance of frequencies in this lower frequency range is usually not seen as quantum changes but, rather, in subtle differences in cleaning. Lower frequency produces larger cavitation bubbles which results in each implosion of a cavitation bubble having a higher energy level. As frequency is increased, the size of the cavitation bubbles becomes smaller which means that each bubble implosion will have relatively less energy. The difference in energy levels is compensated for by the fact that more cavitation bubbles are produced as the frequency is increased. This relationship is described in more detail in the blog
A lower frequency ultrasonic cleaner, then, provides more aggressive cleaning than a higher frequency unit with an equivalent power output. But, there are some not-so-beneficial consequences of using lower frequency as well.
Because of the higher energy implosion of cavitation bubbles at a lower frequency there is a risk of causing physical damage to the parts being cleaned. More specifically, softer metals such as aluminum and brass, may show "cavitation burning" as minute particles of the substrate are physically removed from the surface. Lower frequency equipment also tends to create more audible sound as the operating frequency is only slightly above the range of human hearing.
Higher ultrasonic cleaning is more gentle in nature and less likely to create "cavitation burning" of the parts being cleaned. Higher frequency also results in less audible sound being produced by the ultrasonic cleaning equipment.
As I said earlier, don't expect to see any quantum change in cleaning resulting from a change in frequency in this frequency range. Twenty five and 40kHz frequencies are, as I said earlier, "workhorse" frequencies usually intended to remove gross contaminants from relatively robust parts. The fine points of frequency selection described in some of the references above come into play only when one is cleaning delicate parts or when the -removal of micron or sub-micron sized particles is the primary concern.
In conclusion, in my 40+ years of experience in ultrasonic cleaning, I can count on my fingers the number of applications that could be accomplished using 25 or 40kHz which could absolutely not be accomplished using the other by adjusting the parameters of time, temperature and chemistry.