I'm starting using Mathematica. I have two coupled differential equations and after using NDSolve the output is in the form of a Interpolating Function. I want to Plot the square modulus of one of the two solutions, but after several trials the plot is still empty. I want to know how to work with this function.
sol = NDSolve[{a1'[t] == -I*V12*Exp[-I*w21*t]*a2[t],
a2'[t] == -I*V21*Exp[I*w21*t]*a2[t], a1[0] == 1, a2[0] == 0},
{a1, a2}, {t, 40}]
(* {{a1->InterpolatingFunction[{{0.,40.}},"<>"],
a2->InterpolatingFunction[{{0.,40.}},"<>"]}} *)
f1=a1->InterpolatingFunction[{{0.,40.}},"<>"]
f2 = Conjugate[fun] // ComplexExpand
f3 = fun*gun Plot[f3, {t, 0, 40}]
Where fun is f1 and gun is f2.

{{a1->InterpolatingFunction[{{0.
– user13722 Apr 15 '14 at 07:32,40.}},"<>"],a2->InterpolatingFunction[{{0.,40.}},"<>"]}},40.}},"<>"] – user13722 Apr 15 '14 at 07:33I think I have no idea what I am doing
– user13722 Apr 15 '14 at 07:34