Solving Ordinary Differential Equations

Problem - Solve the system of equations and determinate x(t) and y(t):
Equation 1: mv * A * L* y'' + 2 * mv * A * g * y = - mv * A * B * sin (wf * t)
Equation 2: ( M+ mv * A * L ) * x'' + mv * A * B * y'' + M * ws^2 * x= - (M + mv * A * L) * sin (wf * t)
Constants: mv=1; A=7.5*10^-4; B=20*10^-2; L=50*10^-2; g=9.81; wf=5.3; ws=5.3; M=(0.373+0.306/3+0.306/3)*10^-3;
It´s a engineering problem, there are motion equations and x and y are, respectively, the horizontal and vertical displacement. Anyone can help me solve this system? Already have the Symbolic Math Toolbox.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 1월 23일

0 개 추천

In Maple it is
dsolve([mv*A*L*(diff(y(t), t, t))+2*mv*A*g*y(t) = -mv*A*B*sin*wf*t, (M+mv*A*L)*(diff(x(t), t, t))+mv*A*B*(diff(y(t), t, t))+M*ws^2*x(t) = -(M+mv*A*L)*sin*wf*t])
and you should be able to use a quite similar syntax with the symbolic toolbox.
You have the second derivative of x and the second derivative of y, so you would need at least 4 equations to resolve all the constants of integrations (the boundary conditions). Maple's answer leaves four constants of integration undefined.

댓글 수: 3

Igor
Igor 2012년 1월 23일
Thanks for the answer Walter Roberson.
I have some problems in MATHLAB because never now what window I introduce the code. I have a Editor with this code to solve that system (adapted from the MATHLAB Help):
function xprime = odetest(t,x)
% x(1) = x
% x(2) = y
% x(3) = w
% x(4) = z
mv=1;
A=7.5*10^-4;
B=20*10^-2;
L=50*10^-2;
g=9.81;
wf=5.3;
ws=5.3;
M=(0.373+0.306/3+0.306/3)*10^-3;
xprime(1) = x(3);
%x'=w
xprime(2) = x(4);
%y'=z
xprime(4) = (- mv * A * B * sin (wf * t) - 2 * mv * A * g * x(2))/(mv * A * L);
xprime(3) = (- (M + mv * A * L) * sin (wf * t) - mv * A * B * xprime(4) - M * ws^2 * x(1))/(( M + mv * A * L ));
xprime = xprime (:);
ti=0;
tf=20;
xi = [0 0 0];
[t,s] = ode45(@odetest,[ti,tf],xi);
x = s(:,1);
y = s(:,2);
Now I open the TOOLBOX MuPAD (for engenieering problems). But I don´t unsderstand how can I can get some results (the results are x(t) and y(t)) or if I really need that TOOLBOX. Can you help me with that?
Thanks
Walter Roberson
Walter Roberson 2012년 1월 23일
At the MATLAB command line, try
S = dsolve('mv*A*L*(diff(y(t), t, t))+2*mv*A*g*y(t) = -mv*A*B*sin*wf*t', '(M+mv*A*L)*(diff(x(t), t, t))+mv*A*B*(diff(y(t), t, t))+M*ws^2*x(t) = -(M+mv*A*L)*sin*wf*t');
Snum = subs(S);
The first line tries to solve the pair of differential equations completely symbolically, and the second line substitutes in the numeric values for the various constants.
Igor
Igor 2012년 2월 8일
Thank's for the help ;)

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

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2012년 1월 23일

편집:

2013년 10월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by