MATLAB: How to force a non-trivial solution for a second order ODE

MATLABnon-trivialrunge kuttasecond order ode

I am trying to solve the second order ODE x''=[ 9/4-(12/(5-3exp(2t)))exp(2t)] x(t), with ICs x'=x=0 at t=-1 for -1<=t<=0, using Runge-Kutta 4. Here is my MWE:
a = -1; b = 0; N = 1000;
t = zeros(1, N);
w1 = zeros(1, N);
w2 = zeros(1, N);
w1(1) = 0; w2(1) = 0;
h = (b – a)/N;
t(1) = a;
F1 = @(t, x1, x2) x2;
F2 = @(t, x1, x2) ((12*exp(2*t))/(3*exp(2*t) – 5) + 9/4)*x1;
for i = 1:(N-1)
K11 = h*(F1(t(i), w1(i), w2(i)));
K21 = h*(F2(t(i), w1(i), w2(i)));
K12 = h*(F1(t(i) + 0.5*h, w1(i) + 0.5*K11, w2(i)+ 0.5*K21));
K22 = h*(F2(t(i) + 0.5*h, w1(i) + 0.5*K11, w2(i)+ 0.5*K21));
K13 = h*(F1(t(i) + 0.5*h, w1(i) + 0.5*K12, w2(i)+ 0.5*K22));
K23 = h*(F2(t(i) + 0.5*h, w1(i) + 0.5*K12, w2(i)+ 0.5*K22));
K14 = h*(F1(t(i) + h, w1(i) + K13, w2(i)+ K23));
K24 = h*(F2(t(i) + h, w1(i) + K13, w2(i)+ K23));
w1(i+1) = w1(i) + (K11 + 2*K12 + 2*K13 + K14)/6;
w2(i+1) = w2(i) + (K21 + 2*K22 + 2*K23 + K24)/6;
t(i+1) = a + i*h;
end
My issue is that the trivial solution x=0 is returned. I have tried the code with various other second order ODEs that I know the solution for and I get the expected results. If I make the ICs tiny instead of zero (say 0.000001) it seems to force a correct-ish looking, but obviously incorrect, solution. Any help is appreciated. I am new to Matlab. I get the same thing using ode45. Perhaps there is no non-trivial solution but there should be.

Best Answer

Your equation is x''=[ 9/4-(12/(5-3exp(2t)))exp(2t)] x(t) with initial conditions x'=x=0. You are a racecar at the starting line (since x = 0), the car is not moving (since x' = 0 its speed is 0 miles [or kilometers] per hour), and your foot is off the accelerator (evaluating the right hand side gives x'' = 0 regardless of what value t has.)
Is your car ever going to move under those circumstances? It will when they bring the tow truck over to pull you out of the way so others can race, but that's outside the scope of this ODE.
As for your simpler example, with x'' = -x+6*t+t^3, that's different than this example. You're not multiplying by x.
A closer example would be x'' = (-x+6*t+t^3)*x and again, with the initial conditions x = 0 and x' = 0 you never start accelerating.