I am trying to find a solution to this system of differential equations but the program gives the same output without any messages. I would like help. Please find the Mathematica code posted here. a and d are Constants, $I=\sqrt{-1}$

S1 = I y' == Cos[a t] Exp[- I d t] x;

S2 = I x' == Cos[a t] Exp[ I d t] y;

S = {S1, S2};

DSolve[S, {y, x}, t]

I haven't found a way to get DSolve to crack it, so turn to NDSolve

  I y'[t] == Cos[a t] Exp[-I d t] x[t], I x'[t] == Cos[a t] Exp[I d t] y[t],
  y[0]==1,x[0]==1}, {y[t], x[t]}, {t,0,2}][[1]];

which instantly gives you plots of the real and complex components of x and y.

| improve this answer | |
  • $\begingroup$ Thank you 'so much for this good idea it's really effective @Bill $\endgroup$ – Mohammed Omran Sep 10 '19 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.