Math 325: Differential Equations	Assignment 2 Solutions		Fall 1997

Initialization

<<Calculus`LaplaceTransform`

Problem 1

a) Find the Laplace transforms of the functions t*E^(3t) and t^2 Sin[5t] by using Integrate[]. Compare the result with LaplaceTransform[].
b) Find the inverse Laplace transform of the functions (s-1)/(s^2-4) and
(s^2 + s + 5)/(s^3 - 4s^2 + 5s) by using partial fraction decompositions (use Apart[]) and the tables on p.300 of the textbook. Compare the result with InverseLaplaceTransform[].

Solution

a)

Integrate[t*E^(3t)E^(-s*t), {t,0,Infinity}]

LaplaceTransform[t*E^(3t),t,s]

Integrate[t^2 Sin[5t]E^(-s*t), {t,0,Infinity}]

LaplaceTransform[t^2 Sin[5t],t,s]

Together[%]

b)

Apart[(s-1)/(s^2-4)]

By the table on p. 300, the inverse Laplace transform is
(1/4)E^(2t) + (3/4)E^(-2t)
	== (1/2)(E^(2t) + E^(-2t)) - (1/4)(E^(2t) - E^(-2t))
	== Cosh[2t] - (1/2)Sinh[2t]

InverseLaplaceTransform[(s-1)/(s^2-4),s,t]

Apart[(s^2 + s + 5)/(s^3 - 4s^2 + 5s)]

Since s^2 - 4s + 5 == (s-2)^2 + 1, the tables give the inverse Laplace transform as
1 + 5 E^(2t)Sin[t].

InverseLaplaceTransform[(s^2 + s + 5)/(s^3 - 4s^2 + 5s),s,t]

Problem 2

Solve the initial value problems using the Laplace transform. Compare the answers with the results given by DSolve[] and plot the solutions:
a) y''[t] + 9y[t] == Cos[2t], y[0] == 1, y'[0] == 0
b) y''''[t] - y[t] == 0, y[0] ==-1, y'[0] == 0, y''[0] == 0, y'''[0] == 1

Solution

a)

Y[s_] := LaplaceTransform[y[t],t,s]

eqn = LaplaceTransform[y''[t] + 9y[t] == Cos[2t],t,s]

tran = Solve[eqn/.{y[0]->1, y'[0]->0},Y[s]]

soln = InverseLaplaceTransform[Y[s]/.First[tran],s,t]

Plot[soln, {t,0,2Pi}]

DSolve[{ y''[t] + 9y[t] == Cos[2t], y[0] == 1, y'[0] == 0},
	y[t],t]

a)

eqn = LaplaceTransform[y''''[t] - y[t] == 0,t,s]

tran = Solve[eqn/.{y[0]->-1, y'[0]->0, y''[0]->0, y'''[0]->1},Y[s]]

soln = InverseLaplaceTransform[Y[s]/.First[tran],s,t]

Plot[soln, {t,0,4Pi}]

DSolve[{y''''[t]-y[t]==0,y[0]==-1,y'[0]==0,y''[0]==0,y'''[0]==1},
	y[t],t]

Problem 3

Solve the initial value problems using the Laplace transform and plot the solutions:
a) y''''[t] + 2y'''[t] + 2y''[t] + 2y'[t] + y[t] == 10 UnitStep[t-5],
	y[0] == 0, y'[0] == 0, y''[0]==0, y'''[0]==0
b) y''''[t] + 8y''[t] + 16y[t] == DiracDelta[t-Pi] - DiracDelta[t-4Pi],
	y[0] == 0, y'[0] == 0, y''[0]==0, y'''[0]==0

Solution

a)

Y[s_] := LaplaceTransform[y[t],t,s]

eqn = LaplaceTransform[
	y''''[t]+2y'''[t]+2y''[t]+2y'[t]+y[t] == 10UnitStep[t-5],t,s]

tran = Solve[eqn/.{y[0]->0, y'[0]->0, y''[0]->0, y'''[0]->0},Y[s]]

soln = InverseLaplaceTransform[Y[s]/.First[tran],s,t]

Plot[soln, {t,0,20}]

b)

eqn = LaplaceTransform[
	y''''[t]+8y''[t]+16y[t]==DiracDelta[t-Pi]-DiracDelta[t-4Pi],t,s]

tran = Solve[eqn/.{y[0]->0, y'[0]->0, y''[0]->0, y'''[0]->0},Y[s]]

soln = InverseLaplaceTransform[Y[s]/.First[tran],s,t]

Plot[soln, {t,0,8Pi}]

Problem 4

Consider the initial value problem
	y''[t] + 1/3 y'[t] + 4y[t] == f[k,t], y[0] == 0, y'[0] == 0
where f[k_,t_] = 1/(2k) if 4-k <= t < 4+k and is 0 otherwise.
Solve the equation using Laplace transforms by writing f[k,t] in terms of the unit step function.
Superimpose plots of f[k,t] for k == 3/2, 1, and 1/2 and then superimpose plots of the solutions to the initial value problem for the same values of k. Try to determine the limiting the solution as k approaches 0.

Solution

Y[s_] := LaplaceTransform[y[t],t,s]

f[k_,t_] = (1/(2k))(UnitStep[t-4+k] - UnitStep[t-4-k]);

f1 = Plot[f[3/2,t],{t,0,8},PlotStyle->RGBColor[0,1,0]]

eqn1 = LaplaceTransform[
	y''[t] + 1/3 y'[t] + 4y[t ] == f[3/2,t],t,s]

tran1 = Solve[eqn1/.{y[0]->0, y'[0]->0},Y[s]]

soln1 = InverseLaplaceTransform[Y[s]/.First[tran1],s,t]

p1 = Plot[soln1,{t,0,12},PlotStyle->RGBColor[0,1,0]]

f2 = Plot[f[1,t],{t,0,8},PlotStyle->RGBColor[0,0,1]]

eqn2 = LaplaceTransform[
y''[t] + 1/3 y'[t] + 4y[t]==f[1,t],t,s]

tran2 = Solve[eqn2/.{y[0]->0, y'[0]->0},Y[s]]

soln2 = InverseLaplaceTransform[Y[s]/.First[tran2],s,t]

p2 = Plot[soln2,{t,0,12},PlotStyle->RGBColor[0,0,1]]

f3 = Plot[f[1/2,t],{t,0,8},PlotStyle->RGBColor[1,0,0]]

eqn3 = LaplaceTransform[
y''[t] + 1/3 y'[t] + 4y[t]==f[1/2,t],t,s]

tran3 = Solve[eqn3/.{y[0]->0, y'[0]->0},Y[s]]

soln3 = InverseLaplaceTransform[Y[s]/.First[tran3],s,t]

p3 = Plot[soln3,{t,0,12},PlotStyle->RGBColor[1,0,0]]

eqn = LaplaceTransform[
y''[t] + 1/3 y'[t] + 4y[t]==DiracDelta[t-4],t,s]

tran = Solve[eqn/.{y[0]->0, y'[0]->0},Y[s]]

soln = InverseLaplaceTransform[Y[s]/.First[tran],s,t]

p = Plot[soln,{t,0,12}]

Show[f1,f2,f3]

Show[p1,p2,p3,p]

The solutions appear to be converging to the solution of the same equation where the right hand side is the Dirac Delta function at t==4.

Problem 5

Consider the initial value problem
	y''[t] + h y'[t] + y[t] == k*DiracDelta[t-1],
	y[0] == 0, y'[0] == 0
where k is the magnitude of an impulse at t==1 and h is the damping coefficient (or resistance).
a) Let h==0.5. Find the value of k for which the response has a peak value of 2. Call this value k0.
b) Repeat part a) for h==0.25.
c) Determine how k0 varies as h decreases. What is the value of k0 when h==0?

Solution

a)

Y[s_] := LaplaceTransform[y[t],t,s]

eqn = LaplaceTransform[
	y''[t] + 0.5 y'[t] + y[t] == k*DiracDelta[t-1],t,s]

tran = Solve[eqn/.{y[0]->0, y'[0]->0},Y[s]]

soln = Chop[InverseLaplaceTransform[Y[s]/.First[tran],s,t]]

Let's look at the graph for k==1. The other solutions are just scaled versions of this.

Plot[soln /. k->1,{t,0,4Pi}]

The first peak clearly occurs when the sine function hits it's first peak, i.e., when

Solve[0.968246 (-1+t) == Pi/2]

We plug in this value of t and set the solution equal to 2 to find the desired value for k0:

Solve[(soln/.{t -> 2.62231}) == 2]]

So k0 == 2.90506.

b)

Y[s_] := LaplaceTransform[y[t],t,s]

eqn = LaplaceTransform[
	y''[t] + 0.25 y'[t] + y[t] == k*DiracDelta[t-1],t,s]

tran = Solve[eqn/.{y[0]->0, y'[0]->0},Y[s]]

soln = Chop[InverseLaplaceTransform[Y[s]/.First[tran],s,t]]

Plot[soln/.k->1,{t,0,4Pi}]

The first peak occurs at:

Solve[0.992157 (-1+t)==Pi/2]

Plug this into the solution as before to get k0:

Solve[(soln/.{t -> 2.58321}) ==2]

So k0==2.41856.

c) The Laplace transform for any h is
E^(-s) k/(s^2 + h*s + 1) == E^(-s) k/((s+h/2)^2 + (1-h^2/4))
The solution is then
1/Sqrt[1-h^2/4] E^(-(t-1)h/2)Sin[Sqrt[1-h^2/4](t-1)]k*UnitStep[t-1]
The peak value occurs when t == 1 + Pi/(2Sqrt[1-h^2/4]) and
k0 == 2Sqrt[1-h^2/4]E^(h*Pi/(4Sqrt[1-h^2/4]))
As h->0 the solution becomes Sin[(t-1)]k*UnitStep[t-1] and k0 == 2.

eqn = LaplaceTransform[
	y''[t] + y[t] == k*DiracDelta[t-1],t,s]

tran = Solve[eqn/.{y[0]->0, y'[0]->0},Y[s]]

soln = InverseLaplaceTransform[Y[s]/.First[tran],s,t]

Problem 6

a) Use the Convolution Theorem 6.6.1 (p.326) to express the inverse Laplace transform of the function
H[s_] = s/((s+1)^2(s^2+9)) in terms of an integral. Evaluate this integral with Integrate[] and compare the final result with InverseLaplaceTransform[H[s],s,t].
b) Express the solution of the initial value problem
	y''''[t] + 10y''[t] + 9y[t] == g[t],
	y[0]==2, y'[0]==1, y''[0]==0, y'''[0]==0
in terms of a convolution integral. (Use LaplaceTransform[] and InverseLaplaceTransform[]).
c) Use the result of b) to generate solutions to the initial value problem when g[t_] is Cos[t],  E^t, and t^2. (You should only need to make a substitution and carry out the integration).

Solution

a) H[s] is the product of F[s_] = 1/(s+1)^2 and G[s_] = s/(s^2+9). The inverse Laplace transforms of these two functions are (see p.300):

f[t_] = E^(-t)t; g[t_] = Cos[3t];

By the Convolution Theorem, the inverse Laplace transform of H[s] is:

h[t_] = Integrate[f[t-u]g[u],{u,0,t}]

InverseLaplaceTransform[s/((s+1)^2(s^2+9)),s,t]

b)

Clear[t,y,g]

Y[s_] := LaplaceTransform[y[t],t,s];
G[s_] := LaplaceTransform[g[t],t,s];

eqn = LaplaceTransform[
      y''''[t] + 10y''[t] + 9y[t] == g[t],t,s]

tran = Solve[eqn/.{y[0]->2, y'[0]->1, y''[0]->0, y'''[0]->0},Y[s]]

{{LaplaceTransform[y[t], t, s] -> 
          -((-10 - 20 s - (s^2) - 2 (s^3) - 
                  LaplaceTransform[g[t], t, s])/(9 + 10 (s^2) + 
                  (s^4)))}}

soln = InverseLaplaceTransform[tran,s,t]

y[t] /. First[soln/.g[t1]->Cos[t1]] //Simplify

y[t] /. First[soln/.g[t1]->Exp[t1]] //Simplify

y[t] /. First[soln/.g[t1]->t1^2]

Problem 7

a)  Find the eigenvalues of the matrix
	A = {{ 7,-3, 3},
	     {-1, 5, 1},
	     { 2,-2, 8}}
by using Det[]. Then find the eigenvectors corresponding to each eigenvalue r by solving the appropriate linear system.
Compare your results to the output of Eigensystem[].
b) Find a matrix T such that Inverse[T].A.T == d where d is a diagonal matrix (see p. 362). Verify your choice of T by calculating Inverse[T].A.T.

Solution

a)

A = {{ 7,-3, 3},
	 {-1, 5, 1},
	 { 2,-2, 8}};

Det[A - r*IdentityMatrix[3]] == 0

Solve[%]

eqns = (A-r*IdentityMatrix[3]).{x1,x2,x3} == {0,0,0} //Simplify

Solve[eqns/.r->4]

An eigenvector for r == 4 is v1 = {1,1,0}.

Solve[eqns/.r->6]

An eigenvector for r == 6 is v1 = {0,1,1}.

Solve[eqns/.r->10]

An eigenvector for r == 10 is v1 = {1,0,1}.

Now we try Eigensystem[]:

?Eigensystem

Eigensystem[A]

b) The columns of T are the eigenvectors of A:

T = Transpose[{{1,1,0},{0,1,1},{1,0,1}}];
T//MatrixForm

Inverse[T].A.T //MatrixForm

Problem 8

Consider the vector functions
	X1[t_] = { t , t^2, t^3};
	X2[t_] = { t , t^2, 1  };
	X3[t_] = {t^2,  1 , t  };
a) For what values of t are the vectors X1[t], X2[t], X3[t] linearly independent?
b) On what intervals are the vector functions X1[t], X2[t], X3[t] linearly independent?
c) What conclusion can be draw about the coefficients in a system of homogeneous differential equations satisfied by
    X1, X2, X3?
d) Find such a system and verify the conclusions of part c).

Solution

First we compute the Wronskian of the vector functions:

Clear[X1,X2,X3]

X1[t_] = { t , t^2, t^3};
X2[t_] = { t , t^2, 1  };
X3[t_] = {t^2,  1 , t  };

w = Det[{X1[t],X2[t],X3[t]}]

Factor[w]

Since the Wronskian is not zero at any point t other than 0 or 1, the vectors x1[t], x2[t], and x3[t] are linearly independent at any point t other than 0 or 1. We can see directly that they are dependent at the two points t== 0, 1:

{X1[0],X2[0],X3[0]}//MatrixForm

{X1[1],X2[1],X3[1]}//MatrixForm

So, for example, 1*X1[0] + 0*X2[0] + 0*X3[0] == {0,0,0}, and
1*X1[1] - 1*X2[1] + 0*X3[1] == {0,0,0}.

As vector functions, X1[t], X2[t], and X3[t] are still linearly independent on any interval. The only linear combination of them that equals {0,0,0} for all values of t is when all coefficients are zero. To see this, we'll try to solve just three of the infinite number (all values of t) of equations the coefficients must satisfy:

eqns = {c1 X1[0] + c2 X2[0] + c3 X3[0] == {0,0,0},
        c1 X1[1] + c2 X2[1] + c3 X3[1] == {0,0,0},
        c1 X1[2] + c2 X2[2] + c3 X3[2] == {0,0,0}}

Solve[eqns]

We could also argue that a polynomial in t is identically zero if and only if all of its coefficients are 0:

c1 X1[t] + c2 X2[t] + c3 X3[t] == {0,0,0}

For example, the third coordinate c2 + c3 t + c1 t^3 == 0 for all t only if c1 == c2 == c3 == 0.

c)  The coefficients in the system of homogeneous differential equations satisfied by X1[t], X2[t], X3[t] must be discontinuous at the points t == 0 and 1. If they were continuous at these points, then Theorem 7.4.3 (p.367) would imply that the Wronskian w is never zero. (The assumption that the coefficients be continuous in Theorem 7.4.3 is actuall made on p. 365).

d)  To find a differential equation satisfied by X1[t], X2[t], and X3[t], let us solve for the coefficients pij in the following equations:

P = {{p11,p12,p13},
     {p21,p22,p23},
     {p31,p32,p33}};

eqns = {X1'[t] == P.X1[t],
        X2'[t] == P.X2[t],
        X3'[t] == P.X3[t]}

Solve[eqns]

The coefficients, indeed, are not  even all defined at the points t == 0 and 1.