Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

i need the solution for number 5 but i posted problme 4 and the solution for it

ID: 2081971 • Letter: I

Question

i need the solution for number 5 but i posted problme 4 and the solution for it so you can sovle number 5

For each problem below: Use Laplace-transform methods to get an expression for X (s); Then use the residue() function in matlab to figure out the analytic solution for x(t) from the partial-fraction expansion it provides. I have done (a) to show you the idea. (a) x(t) + x(t) = sin(t); x(0) = 1; x(0) = 1; (b) 5x(t) + x(t) + 10x(t) = t e^-2t; x(0) = 4; x(0) = -2; (c) 4x(t) + 3x (t) + 16x (t) = 12sin (t); x(0) = x(0) = 0; x(0) = 5;

Explanation / Answer

4a)

function pr4_pub()
tt=linspace(0,5,41);
%problem 4a
[r,p]=pr4_pub();
exact4a=@(t)-3/2*exp(-t)-1/2*(cos(t)+sin(t))+3;
plot(tt,exact4a(tt),tt,rp2f(r,p,tt),'+');
legend('exact','residue/pole','location','northwest');
title('problem 4a')

function ff=rp2f(r,p,t)
% residue/pole=>f(t)
ff=r(1)*exp(p(1)*t);nn=0;
for jj=2:length(r)
    if p(jj)==p(jj-1),nn=nn+1;
    else nn=0;
    end
    ff=ff+r(jj)*exp(p(jj)*t).*(t.^nn)/(factorial(nn));
end
BIG=1e10; ff=round(BIG*ff)/BIG;

4b)

function pr4_pub()
tt=linspace(0,5,41);
%problem 4a
[r,p]=pr4_pub();
exact4b=0.1199*exp(-2*t)+exp(-1.9758*t)*(-0.2*cosh(0.5598*t)+j*2.82*sinh(0.5598*t));
plot(tt,exact4b(tt),tt,rp2f(r,p,tt),'+');
legend('exact','residue/pole','location','northwest');
title('problem 4b')

function ff=rp2f(r,p,t)
% residue/pole=>f(t)
ff=r(1)*exp(p(1)*t);nn=0;
for jj=2:length(r)
    if p(jj)==p(jj-1),nn=nn+1;
    else nn=0;
    end
    ff=ff+r(jj)*exp(p(jj)*t).*(t.^nn)/(factorial(nn));
end
BIG=1e10; ff=round(BIG*ff)/BIG;

4c)

function pr4_pub()
tt=linspace(0,5,41);
%problem 4a
[r,p]=pr4_pub();
exact4c=-1*exp(-0.72*t)*(0.92*cosh(1.5*j*t)-j*0.76*sinh(1.5*j*t)+0.818*exp(-1.43*t)+0.0466*cosh(j*t)-j*0.37*sinh(j*t));
plot(tt,exact4c(tt),tt,rp2f(r,p,tt),'+');
legend('exact','residue/pole','location','northwest');
title('problem 4c')

function ff=rp2f(r,p,t)
% residue/pole=>f(t)
ff=r(1)*exp(p(1)*t);nn=0;
for jj=2:length(r)
    if p(jj)==p(jj-1),nn=nn+1;
    else nn=0;
    end
    ff=ff+r(jj)*exp(p(jj)*t).*(t.^nn)/(factorial(nn));
end
BIG=1e10; ff=round(BIG*ff)/BIG;