# Solving coupled ODE symbolically for the parameters

I’m trying to solve the following system:

$$\dot{x_1} = -i w_1 x_1+ i s_1 x_2$$ $$\dot{x_2} = -i w_2 x_2- i s_2 x_1$$

For $$X(t)_{1,2}$$, where $$x_{1,2} = X(t)_{1,2}\cdot e^{ip(t)_{1,2}}$$

I know the solution is:

$$\dot{X_1}=s_1X_2sin(p_1 – p_2)$$ $$\dot{X_2}=s_2X_1sin(p_1 – p_2)$$

I tried the following:

x1 = X1[t]*E^(I*p1[t]); x2 = X2[t]*E^(I*p2[t]);  x1dot = -I*w1*x1 + I*s1*x2; x2dot = -I*w2*x2 + I*s2*x1;  x1d = D[x1, t]; x2d  = D[x2, t];  {{X1s[t], X2s[t]}} =   {X1[t], X2[t]} /.   Simplify[    Solve[     {x1d == x1dot, x2d == x2dot},     {X1[t], X2[t]}]] 

But The result I get is:

$$-\frac{i \left(\text{x1d} \text{p2}'(t)+\text{s1} e^{i \text{p2}(t)} \text{X2}'(t)+\text{w2} \text{x1d}\right)}{e^{i \text{p1}(t)} \left(-\text{w1} \text{p2}'(t)+\text{s1} \text{s2}-\text{w1} \text{w2}\right)},-\frac{i \left(\text{w1} \text{X2}'(t)+\frac{\text{s2} \text{x1d}}{e^{i \text{p2}(t)}}\right)}{-\text{w1} \text{p2}'(t)+\text{s1} \text{s2}-\text{w1} \text{w2}}$$

I’m not sure if Mathematica can use Euler’s formula to simplify the complex exponents and get to the known solution. I guess it’s possible but I’m not sure how to do it