开发者

there is something wrong with nonlinear differential equation. the result is very large. i want to solve it by numerical methods

I want to solve a nonlinear differential equation and I have tried many methods, such as ode45,ode15s, but failed. Could you please give me a help. The equation is x''+0.01x'+x+2(x'-0.55x)^3=sin(0.1t)% (I will expand it in my program).

I have wrote the ode method in Matlab, please have a look.

%system governing function
function xdot=ForcedOscillator1(t,x,dummy,zeta,a,b,c,d,Omega,Xo) 
xdot=[x(2);-zeta*x(2)-x(1)-a*x(2)^3-b*x(2)^2*x(1)-c*x(2)*x(1)^2-d*x(1)^3+Xo*sin(Omega*t)];
    %ode program
    clear all
    clc
    zeta=0.01; 
    a=2; 
    b=-3.3; 
    c=1.815; 
    d=-0.3328;
    Omega=0.1; Xo=1;
    tspan=[0 100]
    options=odeset('RelTol',1e-8,'AbsTol',[1e-8 开发者_如何学C1e-8]);
    for m=1:1
    [t,x]=ode15s('ForcedOscillator1',tspan,[0 0]',options,zeta,a(m),b(m),c(m),d    (m),Omega,Xo);
        plot(t,zeta.*x(:,2)+x(:,1)+a.*x(:,2).^3+b.*x(:,2).^2.*x(:,1)+c.*x(:,2).*x(:,1).^2+d.*x(:,1).^3); 
        grid on
        xlabel('t(s)');
        ylabel('F_t(N)');
        title('Response of a nonlinear system');
    hold on
end

As you can see, when I run this file, the output will be extraordinarily large, it will reach about 10^49. I think it must be something wrong in my program or the system is unstable. could you please help solve this question in the numerical methods. Or prove this equation is unstable.


your system is just unstable...

there is something wrong with nonlinear differential equation. the result is very large. i want to solve it by numerical methods

If you need proof, I suggest finding good ode textbook

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜