DSolve only works with redefinition of functions?

Hello,

I am trying to solve the following system of two coupled differential equations.

sol1 = DSolve[
  {
   a'[t] == - 2 I g (a[t] + Exp[- I 2 g t] * b[t]),
   b'[t] ==   2 I g (b[t] + Exp[  I 2 g t] * a[t]),
   
   a[0] == 0,
   b[0] == 1
   }, {a, b}, t]

which does not work. And I do not understand why as it has an analytic solution. It is simple to see by
substituting a[t],b[t] in the following way:

a[t_] := Exp[-2 I t g]  aa[t]
b[t_] := Exp[ 2 I t g ]  bb[t] 
   
sol1 = DSolve[
  {
   a'[t] == - 2 I g (a[t] + Exp[- I 2 g t] * b[t]),
   b'[t] ==   2 I g( b[t] + Exp[  I 2 g t] * a[t]),
   
   a[0]== 0,
   b[0]== 1
}, {aa, bb}, t]

I do not understand, why one version works, while the other does not? Any hints would be appreciated. What did I miss?

Does none have any advise, or maybe just a guess/idea what I could research on to find out by myself, why one case is working and the other is not?

Marius,

You should report this to technical support. It fails for me in version 12.2 but in a different version of Mathematica it solves properly (both give the same answer)

Hi Neil,

Thanks for your reply. Oh ok. That’s kind of sad, because now I can’t really learn from it. But I reported it to the technical support!

Thanks for looking at it.
Marius