Starting with the expression
eq1 = 5 Exp[1 + 2 x + 3 x^2 + 4 x^3];
I want to implement the following transformation:
eq1 /. Exp[a_ x^2 + b_ x^3] -> f[a/b]
However, I am not getting the desired output $5 f[3/4]\exp(1+2 x)$.
Further, I also need to perform the following transformation.
eq2 = c Exp[a SuperStar[\[Alpha]] + b \[Alpha]];
eq2 /. d1_ Exp[d2 SuperStar[\[Alpha]_]] -> f[d2]
I am providing the above expressions again in latex font for clarification. $$ \text{eq2}=c \exp \left(a \alpha ^*+\alpha b\right); $$
$$ \text{eq2}\text{/.}\, \text{d1$\_$} \exp \left(\alpha \_{}^* \text{d2}\right)\to f(\text{d2}) $$
Any help will be appreciated.