This sounds like a homework assignment. If that's correct, show us the code you've written so far to try to solve the problem and ask a specific question about where exactly you're having difficulty and you may receive some guidance.
Despite this is a standard homework question, professors almost never use MATLAB to demo a rigorous Lyapunov or LaSalle stability proof for this kind of nonlinear system. However, this is how I would use MATLAB to assist me in the stability analysis.
To begin with, I'll just state that the only equilibrium point for this system is at the origin .
The only trajectory that can stay identically inside E forever is the origin itself, .
By LaSalle's Invariance Principle, every trajectory approaches M as . Because our candidate function is also radially unbounded (meaning ) as ), this proof holds globally and implies that the equilibrium point at the origin is globally asymptotically stable as well.
However, despite the Lyapunov math says that the system converges to exactly zero as time approaches infinity, in practice, because of that weak cubic damping , the system converges so very slowly that the ode45 solver would have to run for an immense amount of time to get anywhere near absolute zero.
% Nonlinear system
function dx = system(t, x)
dx = zeros(2, 1);
dx(1) = x(2);
dx(2) = - x(1) - x(2)^3;
end
[t, x] = ode45(@system, [0 3500], [1; 0]);
plot(t, x(:,1)), grid on
xlabel('Time')
ylabel('Amplitude')
Warning: Graphics acceleration hardware is unavailable. Graphics quality and performance might be diminished. See MATLAB System Requirements.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.