Perform a Laplace transform of

% Tell matlab what variables we'll be using

syms A a t

% Use function laplace() to get the Laplace transform

laplace(A*exp(-a*t))

The final answer is

Find the inverse Laplace transform of

% Tell matlab what variables we'll be using

syms s

% Use function ilplace() to get the inverse Laplace transform

ilaplace(1/(s+3)^2)

The final answer is

Perform a partial-fraction expansion of

% Define the numerator polynomial coefficients

num = 2;

% Define the denominator polynomial coefficients

% The conv() function will multiply (s+1)(s+2) to

% get the coefficients of the polynomial

denom = conv([1 1],[1 2]);

% Use residue function to get residues and poles

[r,p] = residue(num,denom)

We see that the residuals are and and that the poles are and . The expanded partial fraction looks like this:

Perform a partial fraction expansion of

% Define numerator

num = 2;

% Define denominator

denom = conv([1 1],conv([1 2], [1 2]));

% Use residue function to get residues and poles

[r,p] = residue(num,denom)

The residues are , , and . The poles are , and . The expanded partial fraction is:

Expand the fraction

% Define numerator

num = 3;

% Define denominator

denom = conv([1 0],[1 2 5]);

% Use residue function

[r,p]=residue(num,denom)

This expansion has three residues and three poles: , , and . Poles are , , and . The expanded partial fraction looks like:

Multiply

% Use conv() to multiply polynomials together

% The coefficients go in an array []

% So (s+1) looks like [1 1]

% and (s^2+5s-3) looks like [1 5 -3]

conv([1 1],[1 5 -3])

The final polynomial is

Find the roots of

% Use the roots() function to find the roots of a polynomial

% given an array of the coefficients

roots([1 6 2 -3])

The roots are equal to , , and .

Solve the following set of equations for and .

% Define symbols

syms s R1 R2 L C I1 I2 V

% Enter each equation on a line

eqn1 = -V + R1*I1 + L*s*(I1-I2) == 0;

eqn2 = L*s*(I2-I1) + R2*I2 + I2/(C*s) == 0;

% Use Matlab to solve the equations for I1 and I2

[solI1,solI2]=solve([eqn1,eqn2],[I1,I2])

These are the answers for and . To get the transfer function we do this

% The transfer func G = I2(s)/V(s) is

G = solI2/V;

% To make it pretty, we can use collect() to group the coefficients of the

% polynomial before printing

collect(G,s)