ClearAll["Global`*"]
AA[x_, y_, t_] := Sqrt[3 + 2*Cos[(t*x)/E^(t^2/2)] + Cos[2*y] + 2*Cos[(t*y)/E^(t^2/2)]]
Dx[x_, y_,t_] := (Cos[2*(3/E^9 + t/E^t^2 + x)] + 2*Cos[3*(3/E^9 + t/E^t^2) + x]*Cos[y] + (2*I)*Cos[y]*Sin[2*(x + (3/E^9 + t/E^t^2)*x)])/ Sqrt[1 + Abs[Cos[2*(3*(3/E^9 + t/E^t^2) + x)]]]
F[t_] := E^-t^2 (1 - 2 t^2)
Rx[x_, y_, t_] := Dx[x, y, t] E^(-I Integrate[AA[x, y, r], {r, -3, t}])
L[x_, y_, t_] := -I F[t] Rx[x, y, t]
M[x_, y_, t_] := -I F[t] Conjugate[Rx[x, y, t]]
eqn[x_, y_, t_] := {A1'[t] == L[x, y, t] A2[t],
A2'[t] == A1[t] M[x, y, t],
A1[-3] == 0, A2[-3] == 1}
sol := {A1, A2} /. (NDSolve[eqn[x, y, t],{A1, A2}, {t, -3, 3}])
P=Table[sol, {x, 1, 2}, {y, 1, 2}]
I am having a problem getting a solution. It just keeps running. And, considering the fact I need it for a wide range of x
and y
, I definitely need some help.
Integrate
. Have you tried running parts of your code individually (which should always be the first debugging step you take)? $\endgroup$NDSolve
has a hard time to solve a differential equation with symbolic parametersx
andy
. Have a look intoParametricNDSolve
which, of course, includes reading its documentation. $\endgroup$Rx[1, 2, t]
, and notice that the integral is not solved. $\endgroup$NDSolve
, representing the integral (differentiating it byt
just gives the integrand). $\endgroup$