I have some data as shown in the figure, and I just want to collapse all the 4 curves into a single curve.
The 4 curves correspond to 4 different values $a$ mentioned in the legend.
I think the best way may be is to multiply the $y$ values with an expression which is a function of both $a$ and $x$ to get $y = 1$ in all the 4 curves.
For this, I can multiply the purple and green curves with something like $(1/a)^{f(x)}$. But this function is proving good for the purple curve and not the green one.
Moreover, when I use this for the blue and red curves too, their values shoot up a lot.
So I am thinking how best to collapse the curves using a single function, $f(a,x)$ which on multiplying with the purple and green curves give 1, and on multiplying with the red and blue curves do not change its value.
I tried some exponential functions, but I am not quite getting any success.
Any solution to this or advice?

Except for a=0.25, all the curves look pretty linear. You might try a standard linear least squares fit of each data set to get y = mx+b and see what m and b look like as functions of a.
Do you have a model of what the curves should look like? If you do, I think you should try to fit that type of curve to each data set.