Fourier analysis. How to present a numerical solution of a nonlinear differential equation in the amplitude-frequency spectrum?

21 Views Asked by At

I have a system of nonlinear differential equations:

sol4 = NDSolve[{y1''[t] == -4*y1[t]^3 - 4*(y1[t] - y2[t])^3, 
                y2''[t] == -4*y2[t]^3 + 4*(y1[t] - y2[t])^3, y1'[0] == 0.5,
                y1[0] == 0, y2'[0] == 0, y2[0] == 0}, {y1, y2}, {t, 0, 300}]

The solution to this equation has no period.

Plot[y1[t] /. sol4, {t, 0, 100}]

I need to build a Fourier decomposition (amplitude versus frequency).

I was able to build a Fourier decomposition for a periodic given function

Npts = 128;xmax = 2 Pi;
dx = (xmax/(Npts - 1) // N);

noisyData1 = Table[Sin[5 x] + 0.8 Cos[10 x] , {x, 0, xmax, dx}];
FData5 = 2 Abs[Fourier[noisyData1]]/Sqrt[Npts];
angularfreq = Table[(k/(Npts dx)) (2 Pi), {k, 0, Npts - 1}];

FPlot5 = ListPlot[
           Transpose[{angularfreq, FData5}], Joined -> False, 
           AxesOrigin -> {0, 0}, PlotRange -> {{0, 30}, All}, 
           PlotStyle -> {RGBColor[0, 0, 1], PointSize[0.02]}, Frame -> True,
           FrameLabel -> {"wk", "»f(xk)»"}, 
           Epilog -> {Dashing[Small], Line[{{5, 0}, {5, 1}}], Line[{{10, 0}, {10, 1}}]}
         ]

But I do not know how to do this for the numerical solution of a nonlinear system whose solution does not have a period.

I want to note that the solution of a simple nonlinear equation $y'' = -y^3$ is a Jacobi function $cn(t,k=1/2)$. This is a non-harmonic function.