In: Mechanical Engineering
1. Use Laplace transforms to solve the following differential equations for ?(?) for ? ≥ 0. Use ?(0) = 0 and ?̇(0) = 1 for each case.
i. 0 = ?̈(?) + 2?̇(?) + 4?(?)
ii. 0 = ?̈(?) + 3?̇(?) + 2?(?)
iii. 5 = ?̈(?) + 5?̇(?) + 6?(?)
3. For the three differential equations from problem one determine the steady-state value of the system using:
a. lim?→0 ??(?),
b. lim ?→∞ ?(?) analytically,
c. lim ?→∞ ?(?) using MATLAB
Please solve #3 and show MATLAB code
(i)
clear;
clc;
t = [0 10];
y0 = [0 1];
[t,y] = ode45(@myfun,t,y0);
plot(t,y(:,1))
xlabel('Time (s)')
ylabel('y(t)')
fprintf('The steady-state value is %.2f.\n',y(end,1))
function ydot = myfun(t,y)
ydot = [y(2);-2*y(2)-4*y(1)];
end
The steady-state value is -0.00.
(ii)
clear;
clc;
t = [0 10];
y0 = [0 1];
[t,y] = ode45(@myfun,t,y0);
plot(t,y(:,1))
xlabel('Time (s)')
ylabel('y(t)')
fprintf('The steady-state value is %.2f.\n',y(end,1))
function ydot = myfun(t,y)
ydot = [y(2);-3*y(2)-2*y(1)];
end
The steady-state value is 0.00.
(iii)
clear;
clc;
t = [0 10];
y0 = [0 1];
[t,y] = ode45(@myfun,t,y0);
plot(t,y(:,1))
xlabel('Time (s)')
ylabel('y(t)')
fprintf('The steady-state value is %.2f.\n',y(end,1))
function ydot = myfun(t,y)
ydot = [y(2);5-5*y(2)-6*y(1)];
end
The steady-state value is 0.83.