# Resolva um oscilador com valores complexos

Resolva um oscilador harmônico sobre uma região de disco 2D. A opção de matriz de massa é fornecida a fim de resolver a EDP com coeficientes de valor complexo.

 In[1]:= X\[CapitalOmega] = Disk[{0, 0}, 10]; uif = NDSolveValue[ {I \!\( \*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[CapitalPsi][t, x, y]\)\) == -(1/2) Inactive[Laplacian][\[CapitalPsi][t, x, y], {x, y}] + 3/2 (x^2 + y^2) \[CapitalPsi][t, x, y], \[CapitalPsi][0, x, y] == E^- ((x - 1)^2 + y^2), DirichletCondition[\[CapitalPsi][t, x, y] == 0, True]}, \[CapitalPsi], {x, y} \[Element] \[CapitalOmega], {t, 0, 5}, Method -> {"EquationSimplification" -> "MassMatrix"} ];

Visualize as partes real e imaginária do resultado.

 In[2]:= XRow[{Plot3D[Re[uif[1, x, y]], {x, y} \[Element] \[CapitalOmega], PlotRange -> All, Boxed -> False, Axes -> None, PlotPoints -> 40, Mesh -> None], Plot3D[Im[uif[5, x, y]], {x, y} \[Element] \[CapitalOmega], PlotRange -> All, Boxed -> False, Axes -> None, PlotPoints -> 40, Mesh -> None]}]
 Out[2]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »