Closed form solution for this?

I have an equation describing a waveform:

f(x) = a0 * sin( x ) + a1 * sin( 2 * x + p1 ) + a2 * sin( 3 * x + p2 )

This is a periodic waveform with period 2 * pi

For fixed values of a0, a1, and a2, I would like to find values of p1
and p2 which maximise the asymmetry of the waveform. This would be:

max( f(x) ) - min( f(x) )

It is extremely easy for me to write a search based optimiser likely
to find an optimal or very close to optimal solution. But is there a
closed form solution to this?