Math 325: Differential Equations	Assignment 	Fall 1998

Name:

Section:

Professor:

This assignment is due Monday, Nov 23, 1998.   Print out your answer to the
problems.  This assignment will be counted as one homework.

Initialization

<<Calculus`LaplaceTransform`

Problem 1

Find the indefinite integral of the following functions
	E^t Cos[t]^3 Sin[t]^5;      (t-1)^10 Log[t+1]

Solution

Integrate[E^t Cos[t]^3 Sin[t]^5, t]

Integrate[(t-1)^10 Log[t+1],t]

Problem 2

Verify that the functions
	y1[t_] = 1;      y2[t_] = t;
	y3[t_] = E^(-t); y4[t_] = t*E^(-t);
are solutions of the differential equation
	y''''[t] + 2y'''[t] + y''[t] == 0
and calculate their Wronskian.

Solution

y1[t_] = 1;      y2[t_] = t;
y3[t_] = E^(-t); y4[t_] = t*E^(-t);

L[y_]:=D[y, {t, 4}]  +  2 D[y, {t, 3}]  +  D[y, {t, 2}];
{L[y1[t]], L[y2[t]], L[y3[t]], L[y4[t]]} // Simplify

\(w[f1_, f2_, f3_, f4_]\  := \ 
      Det[
{{\ \ f1, \ \ \ \ \ \ \ \ \ f2, \ \ \ \ \ \ \ \ \ f3, 
            \ \ \ \ \ \ \ \ \ f4\ \ \ }, 

          \ {D[f1, t], \ \ \ \ D[f2, t], \ \ \ \ D[f3, t], \ \ \ \ D[f4, t]}, 
          
\ {D[f1, {t, 2}], D[f2, {t, 2}], D[f3, {t, 2}], D[f4, {t, 2}]}, 

          \ {D[f1, {t, 3}], D[f2, {t, 3}], D[f3, {t, 3}], D[f4, {t, 3}]}}]; 

    w[y1[t], y2[t], y3[t], y4[t]]\)

Problem 3

Show that the Wronskian of Cos[t], Cos[t]^3, Cos[t]^5, and Cos[5t] is 0.
Establish this result without direct evaluation of the Wronskian.

Solution

TrigExpand[Cos[5t]]

\(\(% /. {Sin[t]^2 -> 1 - Cos[t]^2, \ 
          Sin[t]^4 -> \((1 - Cos[t]^2)\)^2} // ExpandAll
\)\)

Problem 4

Find all the 10th roots of 1024, including complex numbers. Convert these to points in the plane and plot them.

Solution

Solve[z^10 == 1024]

\(\(ListPlot[{Re[z], \ Im[z]} /. %]
\)\)

Problem 5

Solve the Differential Equation 
 y'''[t] + 17y''[t] + 22y'[t] -40y[t] == 0
with the initial conditions:
	y[0] == 1, y'[0] == 99, y''[0]==999, 
using DSolve[].

Solution

DSolve[{y'''[t] + 17y''[t] + 22y'[t] + -40y[t] == 0, y[0] == 1, y'[0] == 99, y''[0] == 999},y[t],t]

Problem 6

Find the solutions to the following differential equation:
	y''''[t] + 2y'''[t] + 5y''[t] + 8y'[t] + 4y[t]==Sin[2t] + t*E^(-t)
with the initial conditions
	y[0] == y0, y'[0] == 0, y''[0] == 0, y'''[0] == 0
Superimpose plots of the particular solutions for several values of y0. Explain why all these solutions seem to pass through the t-axis at the same points and at regular intervals for large values of t. Try to determine the length of this common interval.

Solution

DSolve[{y''''[t] + 2y'''[t] + 5y''[t] + 8y'[t] + 4y[t]==Sin[2t] + t*E^(-t),y[0] == y0, y'[0] == 0, y''[0] == 0, y'''[0] == 0}, y[t],t]

\(\(\ z[t_, y0_] = y[t] /. %
\)\)

\(\(
Plot[{z[t, 0], z[t, 1], z[t, 3], z[t, 5]}, {t, 0, 15}, \ 
      PlotRange -> {\(-1\), 5}]\)\)

Problem 7

a) Find the Laplace transforms of the functions t*E^(3t) and t^2 Sin[5t] by using 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 InverseLaplaceTransform[].

Solution

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

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

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

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

Problem 8

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

Solution

Y[s_]=LaplaceTransform[y[t],t,s];
Solve[LaplaceTransform[{y''[t] + 9y[t] == Cos[2t]},t,s]/.{ y[0] -> 1, y'[0] -> 0},Y[s]]

\(\(InverseLaplaceTransform[{Y[s] /. %}, s, t]
\)\)

\(\(
Plot[%, {t, 0, 5}]	\)\)

Problem 9

For each of the matrices A below, find the fundamental matrix Phi[t] such that Phi[0] is the identity matrix for the system X'[t] == A.X[t]. Verify that Phi'[t]==A.Phi[t]. Then use Phi[t] to find a solution satisfying the given initial condition.

a)  A = {{-7,-8, 2},
        { 9,11,-3},
        { 9, 8, 0}};
  X[0]=={3,-1,1};

b)  A = {{-4,-2,-1},
        { 2, 6,-3},
        { 2, 4,-1}};
  X[0]=={1,1,-2};
 
c)  A = {{  5, 3,-1},
        {-16,-6,-1},
        { -4,-3, 2}};
  X[0]=={1,1,1};

Solution

a)

A = {{-7,-8, 2},
     { 9,11,-3},
     { 9, 8, 0}};

Eigensystem[A]

Fundamental solutions:

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

A fundamental matrix has columns given by X1[t], X2[t], and X2[t]. We use Transpose[] to covert these vectors from rows into columns.

Psi[t_] = Transpose[{X1[t], X2[t], X3[t]}];
MatrixForm[Psi[t]]

To get a fundamental matrix Phi[t] such that Phi[0] is the identity matrix, we multiply Psi[t] on the right by the inverse of Psi[0].

Phi[t_] = Psi[t].Inverse[Psi[0]];
Phi[t]//MatrixForm

Phi[0]//MatrixForm

Let's check that Phi[t] satisfies the equation:

Phi'[t]-A.Phi[t]//Simplify

A.Phi[t]//Simplify//MatrixForm

The solution satisfying the given initial condition is simply:

X[t_] = Phi[t].{3,-1,1}//Simplify

An alternative method for finding general solution and Special solution:

A = {{-7,-8, 2},
     { 9,11,-3},
     { 9, 8, 0}};
X[t_]:={x1[t],x2[t],x3[t]};
DSolve[{x1'[t]==Part[A.X[t],1],     x2'[t]==Part[A.X[t],2],  x3'[t]==Part[A.X[t],3]}, X[t],t]

DSolve[{x1'[t]==Part[A.X[t],1],     x2'[t]==Part[A.X[t],2],  x3'[t]==Part[A.X[t],3],
x1[0]==3,x2[0]==-1,x3[0]==1}, X[t],t]

b)

A = {{-4,-2,-1},
     { 2, 6,-3},
     { 2, 4,-1}};

Eigensystem[A]

We get two fundamental solutions from this:

X1[t_] = {-3,1,1}E^(-3t);
X2[t_] = {-1,2,2}E^(2t);

The eigenvalue 2 is repeated and Eigensystem[] finds only one non-trivial eigenvector, {-1,2,2}. A generalized eigenvector is found by solving

Solve[(A - 2*IdentityMatrix[3]).{w1,w2,w3} == {-1,2,2}]

For example, {w1,w2,w3} = {-1,5/2,2}, from which we can derive a third independent solution:

X3[t_] = {-1,2,2} t*E^(2t) + {-1,5/2,2} E^(2t);

The general solution is:

X[t_] = c1 X1[t] + c2 X2[t] + c3 X3[t]

Check:

X'[t]-A.X[t]//Simplify

Fundamental matrix:

Psi[t_] = Transpose[{X1[t], X2[t], X3[t]}];
Psi[t]//MatrixForm

Phi[t_] = Psi[t].Inverse[Psi[0]];
Phi[t]//MatrixForm

The solution satisfying the given initial condition is:

X[t_] = Phi[t].{1,1,-2}//Simplify

An alternative method for finding general solution and Special solution:

A = {{-4,-2,-1},
     { 2, 6,-3},
     { 2, 4,-1}};
X[t_]:={x1[t],x2[t],x3[t]};
DSolve[{x1'[t]==Part[A.X[t],1],     x2'[t]==Part[A.X[t],2],  x3'[t]==Part[A.X[t],3]}, X[t],t]

DSolve[{x1'[t]==Part[A.X[t],1],     x2'[t]==Part[A.X[t],2],  x3'[t]==Part[A.X[t],3],
x1[0]==1,x2[0]==1,x3[0]==-2}, X[t],t]//Simplify

c)

A = {{  5, 3,-1},
     {-16,-6,-1},
     { -4,-3, 2}};

Eigensystem[A]

X1[t_] = {-1,2,2}E^t;
Z[t_] = {-1,2-I,1}E^(3I*t);

X2[t_] = Re[Z[t]]//ComplexExpand

X3[t_] = Im[Z[t]]//ComplexExpand

General solution:

X[t_] = c1 X1[t] + c2 X2[t] + c3 X3[t];
X[t]//MatrixForm

Check:

X'[t]-A.X[t]//Simplify

Fundamental matrix:

Psi[t_] = Transpose[{X1[t], X2[t], X3[t]}];
Psi[t]//MatrixForm

Phi[t_] = Psi[t].Inverse[Psi[0]]//Simplify;
Phi[t]//MatrixForm

The solution satisfying the given initial condition is:

X[t_] = Phi[t].{1,1,1}//Simplify

An alternative method for finding general solution and Special solution:

A = {{  5, 3,-1},
     {-16,-6,-1},
     { -4,-3, 2}};
X[t_]:={x1[t],x2[t],x3[t]};
DSolve[{x1'[t]==Part[A.X[t],1],     x2'[t]==Part[A.X[t],2],  x3'[t]==Part[A.X[t],3]}, X[t],t]

X[t] /. % // ComplexExpand

DSolve[{x1'[t]==Part[A.X[t],1],     x2'[t]==Part[A.X[t],2],  x3'[t]==Part[A.X[t],3],
x1[0]==1,x2[0]==1,x3[0]==1}, X[t],t]

X[t]/.%//ComplexExpand//Simplify

Problem 10

Use the method of variation of parameters to find the general solution of the system X'[t] == A.X[t] + G[t] for each of the matrices A and vector functions G[t] below. . Then find the solution that satisfies the given initial condition.

(see Problem 9a)
   A = {{-7,-8, 2},
        { 9,11,-3},
        { 9, 8, 0}};
  G[t_] = {t^2,t,1};
  X[0]=={3,-1,1};

Solution

A = {{-7,-8, 2},
     { 9,11,-3},
     { 9, 8, 0}};
G[t_] = {t^2,t,1};

A solution to the associated homogeneous problem,  X'[t] == A.X[t], was found in Problem 9a :

X1[t_] = {-1,1,1}E^(-t);
X2[t_] = {-2,3,3}E^(2t);
X3[t_] = {-2,3,2}E^(3t);
Psi[t_] = Transpose[{X1[t], X2[t], X3[t]}];
InversePsi[t_] = Inverse[Psi[t]];
InversePsi[t]//MatrixForm

A particular solution to the non-homogeneous problem is given by
Y[t_] = Psi[t].U[t] where U[t] satisfies U'[t] == InversePsi[t].G[t].

InversePsi[t].G[t]

U[t_] = Integrate[InversePsi[t].G[t], t]//Simplify

Y[t_] = Psi[t].U[t]//Simplify

The general solution to the given system is then

X[t_] = c1 X1[t] + c2 X2[t] + c3 X3[t] + Y[t]

Check:

X'[t]-A.X[t]-G[t]//Simplify

We now solve for the constants c1 and c2 that satisfy the given initial condition.

cs = Solve[X[0]=={3,-1,1}]

The solution to the initial value problem is thus

X[t_] = X[t] /. First[cs] //Simplify