필터 지우기
필터 지우기

How to solve a second order ODE with variable coefficients with an excitation.

조회 수: 2 (최근 30일)
Enterprixe
Enterprixe 2017년 2월 28일
편집: Enterprixe 2017년 3월 1일
Hello, after knowing how to solve an homogeneous 2nd order ODE i was wondering how to solve the same problem just adding and armonic excitation. I would also like to have it solved using the symbolic math toolbox. The problem will be like the following:
y'' + sen(10*t)y' + 5y = p(t)
p(t) = sen( 0.5*t + 2*t^2)
y(0)= 0
y'(0)= 1
  댓글 수: 2
Enterprixe
Enterprixe 2017년 3월 1일
편집: Enterprixe 2017년 3월 1일
i try this
syms t y(t) Y
D1y = diff(y,t);
D2y = diff(y,t,2);
Eqn = D2y + [-0.11674*(1-exp(-10*t)) + 0.5351*(1-cos(10*t))]*D1y + 3.2137*y == 0.2029*sin((0.89634+0.8102476*t)*t);
yode = odeToVectorField(Eqn);
Yodefcn = matlabFunction(yode, 'Vars',[t Y]);
% Yodefcn = @(t,Y) [Y(2);-exp(t.*-1.0e1)-sin(t.*1.0e1).*Y(2)-Y(1)];
tspan = [0:0.0254:50];
Y0 = [0 1.8989];
[T,Y] = ode45(Yodefcn, tspan, Y0);
plot(T, Y(:,1))
ylabel('coordenada 1')
xlabel('tiempo')
grid
but the problem is that the solution is almost equal to the homogeneous one( without the sin at the right side of the equation) and that makes me doubt im making things right. Also it would be nice how to program the excitation to a p(t) which after solving the equations gives me the values of it for each time.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by