Anda di halaman 1dari 131

Universidad San Pablo - CEU

Dynamic Systems in Biomedical Engineering

Problems

Author:
Supervisor:
Second Year Biomedical
Carlos Oscar S. Sorzano
Engineering

June 29, 2015


1 Chapter 1

Kreyszig, 1.1.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


x2
y 0 + xe 2 =0
Solution:
dy x2
y0 = = xe 2
dx
By separating variables
x2
dy = xe 2 dx
and integrating Z Z
x2
dy = xe 2 dx

x2
y = e 2 +C

Kreyszig, 1.1.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


y 0 = 4ex cos(x)
Solution:
dy
y0 = = 4ex cos(x)
dx
By separating variables
dy = 4ex cos(x)dx
and integrating Z Z
dy = 4ex cos(x)dx

Let's integrate by parts:

ex cos(x)dx x
R
I1 = R [u = e x , dv = cos(x)dx]
x
= e sin(x) R sin(x)(e dx)
= ex sin(x) + sin(x)ex dx [u x
R = e , dv = sin(x)dx]
= e sin(x) + e ( cos(x))R ( cos(x))(ex dx)
x x

= ex sin(x) ex cos(x) cos(x)ex dx


= ex sin(x) ex cos(x) I1
2I1 = ex sin(x) ex cos(x)
I1 = ex sin(x)cos(x)
2

Finally

y = 4I1 + C = 2(sin(x) cos(x))ex + C

Kreyszig, 1.1.6

1
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


y 00 = y
Solution: Let us try a particular solution of the form

y = ex
y 0 = ex
y 00 = 2 ex

Then, substituting these functions in the ODE

2 ex = ex

2 = 1 = i
So the two functions
y1 = eix
and
y2 = eix
are solutions of the ODE. Actually, any function of the form

y = c1 y1 + c2 y2 = c1 eix + c2 eix

is also a solution. In fact, it is the general solution of the ODE. Let us check
this statement
y 0 = ic1 eix ic2 eix
y 00 = c1 eix c2 eix
Substituting in the ODE
y 00 = y
c1 eix c2 eix = (c1 eix + c2 eix )
As can be easily seen the function

y = c1 eix + c2 eix + C

with C 6= 0 is not a solution of the ODE

c1 eix c2 eix 6= (c1 eix + c2 eix + C)

Kreyszig, 1.1.7
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


y 0 = cosh(5.13x)
Solution: To solve the proposed ODE we rewrite it as

dy
= cosh(5.13x)
dx

2
Consequently
dy = cosh(5.13x)dx
Integrating Z Z
dy = cosh(5.13x)dx

1
y= sinh(5.13x) + C
5.13

Kreyszig, 1.1.8
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


y 000 = e0.2x
Solution: Let us dene
y1 = y 0
y2 = y10 = y 00
Then the ODE can be rewritten as

y20 = e0.2x

whose solution is
dy2 = e0.2x dx
1 0.2x
y2 = e + c1 = 5e0.2x + c1
0.2
Now we solve the equation

y10 = y2 = 5e0.2x + c1

dy1 = (5e0.2x + c1 )dx


y1 = 25e0.2x + c1 x + c2
And, nally, the equation

y 0 = y1 = 25e0.2x + c1 x + c2

dy = (25e0.2x + c1 x + c2 )dx
c1
y = 125e0.2x + x2 + c2 x + c3
2
1
Since c1 is an arbitrary constant, we can absorb the
2 factor into c1 , so that the
general solution is

y = 125e0.2x + c1 x2 + c2 x + c3

Kreyszig, 1.1.10
Carlos Oscar Sorzano, Aug. 31st, 2014

3
2
1. Verify that y = ce2.5x is a solution of the ODE

y 0 + 5xy = 0

2. Determine from y the particular solution of the ODE that satises the
initial condition y(0) = .
3. Graph the solution of the IVP.

Solution:
1. Let us calculate y0 and substitute it into the ODE

 y 0 = 5cxe2.5x
 
2 2
5cxe2.5x + 5x ce2.5x = 0
2 2
5cxe2.5x + 5cxe2.5x = 0
0=0
So y is actually a solution of the ODE.

2. To satisfy the initial condition we need

2
y(0) = = ce2.5(0) = ce0 = c
that is, we need c = . The particular solution fullling the initial condi-
tion is
2
yp = e2.5x

3. In MATLAB:

x=[-3:0.001:3]; plot(x,pi*exp(-2.5*x.2)); xlabel('x');

3.5

2.5

1.5

0.5

0
3 2 1 0 1 2 3
x

Kreyszig, 1.1.12
Carlos Oscar Sorzano, Aug. 31st, 2014

4
1. Verify that y 2 4x2 = C is a solution of the ODE

yy 0 = 4x

2. Determine from y the particular solution of the ODE that satises the
initial condition y(1) = 4.
3. Graph the solution of the IVP.

Solution:
1. Let us dierentiate the equation dening the implicit function

Dx (y 2 4x2 = C)
2yy 0 8x = 0
yy 0 = 4x

that is exactly the ODE, so the implicit function dened by y 2 4x2 = C


is actually a solution of the proposed ODE.

2. To satisfy the initial condition y(1) = 4 we need

y 2 4x2 = C

(4)2 4(1)2 = C
C = 16 4 = 12
So the particular solution satisfying the given initial condition is

yp2 4x2 = 12

3. In MATLAB:

h=ezplot('y.2-4*x.2-12',[-3 3 -10 10]);


set(h,'Color','b')

y24 x212 = 0
10

0
y

10
3 2 1 0 1 2 3
x

5
Kreyszig, 1.1.16
Carlos Oscar Sorzano, Aug. 31st, 2014

An ODE may sometimes have an additional solution that cannot be obtained


from the general solution and is then called a singular solution. The ODE
(y 0 )2 xy 0 + y = 0 is of this kind. Show by dierentiation and substitution
that it has the general solution y = cx c2 and the singular solution y = 14 x2 .
Explain the following gure.

Solution: Let us calculate the derivative of the proposed solution

y = cx c2 y 0 = c

Substituting in the ODE


(y 0 )2 xy 0 + y = 0
(c)2 x(c) + (cx c2 ) = 0
0=0
So the proposed solution is a solution of the ODE. However, the function y=
1 2
4 x is also a solution as can be easily veried

1 2 1
y= x y0 = x
4 2
(y 0 )2 xy 0 + y = 0
 2    
1 1 1 2
x x x + x =0
2 2 4
1 2 1 2 1 2
x x + x =0
4 2 4
0=0
The explanation of the proposed gure is the following. The dierent lines
correspond to dierent values of c in the general solution

y = cx c2

The function y = 41 x2 is the upper envelope of all these functions.


Kreyszig, 1.1.18

6
Carlos Oscar Sorzano, Aug. 31st, 2014

228
Radium 88 Ra has a half-life of about 3.6 days.

1. Given 1 gram, how much will still be present after 1 day?

2. After 1 year?

Solution: Radioactive desintegration responds to the linear ODE

dA
= Kt
dt
whose general solution is

A(t) = A(0)eKt t>0

Note that the units of K are [time1 ]. We can also write the general solution
as
t
A(t) = A(0)e t>0
where the units of are now [time].
A half-life of 3.6 days implies that

A(0) 3.6
A(3.6) = = A(0)e
2
3.6
log(2) =

3.6
= = 5.1937[days]
log(2)
At this point we can answer the two questions:
1 1
1. After 1 day there is: A(1) = A(0)e = 1e 5.1937 = 0.8249[g].
365 365
2. After 1 year there is: A(365) = A(0)e = 1e 5.1937 = 3 1031 [g].

Kreyszig, 1.1.19
Carlos Oscar Sorzano, Aug. 31st, 2014

In dropping a stone or an iron ball, air resistance is practically negligible.


Experiments show that the acceleration of the motion is constant (equal to
g = 9.80[m/s2 ], called the acceleration of gravity). Model this as an ODE for
y(t), the distance fallen as a function of time t. If the motion starts at time
t = 0 from rest (i.e., with velocity v = y 0 = 0), show that you obtain the familiar
law of free fall
1 2
y= gt
2
Solution: Let us understand the physical meaning of each of the variables
involved:

y(t) is the distance fallen at time t


y 0 (t) is the speed of the object at time t

7
y 00 (t) is its acceleration at time t
The fact that acceleration is constant along the fall implies

y 00 = g

Let us dene the variable


v = y0
Then, the free fall ODE can be written as

v0 = g

dv = gdt
v = gt + c
But the object is at rest at t = 0, that is

v(0) = 0 = g(0) + c c = 0

Now we solve the equation


v = y0
for y
dy = vdt = gtdt
1
y = gt2 + c
2
At time t=0 the object had not moved, that is

1
y(0) = 0 = g(0)2 + c c = 0
2
Finally, the solution of the falling ODE is

1 2
y= gt
2

Kreyszig, 1.2.4
Carlos Oscar Sorzano, Aug. 31st, 2014

Graph a direction eld (by a CAS or by hand) for the ODE

y 0 = 2y y 2

In the eld graph several solution curves by hand, particularly those passing
through the points (0, 0), (0, 1), (0, 2), (0, 3).
Solution: In MATLAB

[x,y]=meshgrid(-1:0.25:5,-2:0.25:4);
f = @(x,y) 2*y-y.2;
dy=feval(f,x,y);
dx=ones(size(dy));
quiver(x,y,dx,dy);
axis([-1 5 -2 4])

8
xlabel('x')
ylabel('y')
hold on

% (0,0)
[xa,ya] = ode45(f,[0,5],0);
[xb,yb] = ode45(f,[0,-1],0);
plot(xa,ya,'b','LineWidth',2)
plot(xb,yb,'b','LineWidth',2)

% (0,1)
[xa,ya] = ode45(f,[0,5],1);
[xb,yb] = ode45(f,[0,-1],1);
plot(xa,ya,'r','LineWidth',2)
plot(xb,yb,'r','LineWidth',2)

% (0,2)
[xa,ya] = ode45(f,[0,5],2);
[xb,yb] = ode45(f,[0,-1],2);
plot(xa,ya,'k','LineWidth',2)
plot(xb,yb,'k','LineWidth',2)

% (0,3)
[xa,ya] = ode45(f,[0,5],3);
[xb,yb] = ode45(f,[0,-1],3);
plot(xa,ya,'g','LineWidth',2)
plot(xb,yb,'g','LineWidth',2)

1
y

2
1 0 1 2 3 4 5
x

Kreyszig, 1.2.5
Carlos Oscar Sorzano, Aug. 31st, 2014

9
Graph a direction eld (by a CAS or by hand) for the ODE

1
y0 = x
y
In the eld graph several solution curves by hand, particularly that one passing
through the point (1, 12 ).
Solution: In MATLAB

[x,y]=meshgrid(-2:0.15:2,0.15:0.15:2);
f = @(x,y) x-1./y;
dy=feval(f,x,y);
dx=ones(size(dy));
quiver(x,y,dx,dy);
axis([-2 2 0.15 2])
xlabel('x')
ylabel('y')
hold on

% (1,0.5) [xa,ya] = ode45(f,[1,1.2],0.5);


[xb,yb] = ode45(f,[1,-2],0.5);
plot(xa,ya,'r','LineWidth',2)
plot(xb,yb,'r','LineWidth',2)

1.8

1.6

1.4

1.2
y

0.8

0.6

0.4

0.2
2 1.5 1 0.5 0 0.5 1 1.5 2
x

Kreyszig, 1.2.11
Carlos Oscar Sorzano, Aug. 31st, 2014

An ODE is autonomous if it does not show x (the independent variable)


explicitly in f
y 0 = f (x, y)
For instance,
y 0 = sin2 (y)

10
1
y 0 = 5y 2
What will the level curves f (x, y) = const (also called isoclines, of equal incli-
nation) of an autonomous ODE look like? Give reason.
Solution: They are lines parallel to the x axis, since all points with the same x
have the same inclination (slope of the tangent). For example, for the equation

y 0 = sin2 (y)

we would have in MATLAB

[x,y]=meshgrid(-pi:0.25:pi,-pi:0.25:pi);
f = @(x,y) (sin(y)).2;
dy=feval(f,x,y);
dx=ones(size(dy));
quiver(x,y,dx,dy);
axis([-pi pi -pi pi])
xlabel('x')
ylabel('y')
hold on

% Isoclines
contour(x,y,dy./dx,0.25,'r','LineWidth',2)
contour(x,y,dy./dx,0.75,'g','LineWidth',2)

0
y

3
3 2 1 0 1 2 3
x

Kreyszig, 1.2.15
Carlos Oscar Sorzano, Aug. 31st, 2014

Two forces act on a parachutist, the attraction by the earth mg (m is the


mass of person plus equipment, g = 9.8[m/s2 ] the acceleration of gravity) and
the air resistance, assumed to be proportional to the square of the velocity v(t).
Using Newton's second law of motion (mass acceleration = resultant of the

11
forces), set up a model (an ODE for v(t)). Graph a direction eld (choosing
m and the constant of proportionality equal to 1). Assume that the parachute
opens when v = 10[m/s]. Graph the corresponding solution in the eld. What is
the limiting velocity? Would the parachute still be sucient if the air resistance
were only proportional to v(t)?
Solution: The following equation for the velocity v reects the physical knowl-
edge of the problem
mv 0 = mg v 2
With m = 1[kg] and = 1[N s2 /kg], we have

v0 = g v2

If the parachute opens at v = 10[m/s] it means

v(0) = 10

we would have in MATLAB (see red curve)

[x,v]=meshgrid(0:0.1:2,0:0.5:10);
f = @(x,v) 9.8-v.2;
dv=feval(f,x,v);
dx=ones(size(dv));
quiver(x,v,dx,dv);
axis([0 2 0 10])
xlabel('t')
ylabel('v')
hold on

% Solution
[t10,v10]=ode45(f,[0 2],10);
plot(t10,v10,'r','LineWidth',2)

If the air resistance were proportional to v(t), then (see black curve)

v0 = g v

It can be seen that the decrease of speed is much slower:

12
10

7
v

0 0.5 1 1.5 2
t

Kreyszig, 1.2.17
lvaro Martn Ramos, Dec. 25th, 2014

Apply Euler's method to the ODE

y0 = y
with h = 0.1 and y(0) = 1.
Solution: The method applied to this case would give

y0 = y(0) = 1
y1 = y0 + hf (x0 , y0 ) = 1 + 0.1(y0 ) = 1 + 0.1(1) = 1.1
y2 = y1 + hf (x1 , y1 ) = 1.1 + 0.1(y1 ) = 1.1 + 0.1(1.1) = 1.21
y3 = y2 + hf (x2 , y2 ) = 1.11 + 0.1(y2 ) = 1.21 + 0.1(1.21) = 1.331
...

Kreyszig, 1.2.20
Carlos Oscar Sorzano, Aug. 31st, 2014

Apply Euler's method to the ODE

y 0 = 5x4 y 2 y(0) = 1
with h = 0.2. The true solution is

1
y=
(1 + x)5
Solution: The method applied to this case would give

y0 = y(0) = 1
y1 = y0 + hf (x0 , y0 ) = 1 + 0.2(5x40 y02 ) = 1 + 0.2(5(0)4 (1)2 ) = 1
y2 = y1 + hf (x1 , y1 ) = 1 + 0.2(5x41 y12 ) = 1 + 0.2(5(0.2)4 (1)2 ) = 0.9984
y3 = 0.9729
y4 = 0.8502
...

13
In MATLAB

f = @(x,y) -5*x.4.*y.2;

% Euler
y=zeros(10,1);
x=zeros(10,1);
x(1)=0; y(1)=1; % y(0)=1
h=0.2;
for k=1:length(y)-1
y(k+1)=y(k)+h*f(x(k),y(k));
x(k+1)=x(k)+h;
end

% ODE45
[xRK,yRK]=ode45(f,[0,1.8],1);

% True solution
xt=0:0.01:1.8;
yt=1./((xt+1).5);
plot(x,y,xRK,yRK,xt,yt)
legend('Euler solution','Runge-Kutta 45','True solution')
xlabel('x')
ylabel('y')

1
Euler solution h=0.2
0.9 RungeKutta 45
True solution
0.8

0.7

0.6

0.5
y

0.4

0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
x

Kreyszig, 1.3.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
y 3 + y 0 + x3 = 0

14
Solution: We can rearrange the equation as

 3
0 x3 x
y = 3 =
y y

We see that the equation has the form

y
y0 = f
x
so that it can be reduced to a separable form by making the change of variables

y
u= y = xu y 0 = u0 x + u
x
Substituting in the ODE
1
u0 x + u = 3
u
u4 + 1
 
1
u0 x = u + 3 =
u u3
Separating variables
u3 1
du = dx
u4 +1 x
Integrating
u3
Z Z
1
4
du = dx
u +1 x
4u3
Z
1
du = log |x| + C
4 u4 + 1
Solving for u
1
log |u4 + 1| = log |x| + C
4
1
log |u4 + 1| 4 = log |x| + C
C
1
|u4 + 1| 4 =
x
C
u4 + 1 = 4
x
And undoing the change of variable

 y 4 C
+1=
x x4

y 4 + x4 = C

Kreyszig, 1.3.7
Carlos Oscar Sorzano, Nov. 2nd, 2014

Solve y
xy 0 = y + 2x3 sin2
x

15
y
by making the change of variables
x =u
Solution: The change of variables
y
x = u implies

y = ux

y 0 = u0 x + u
Substituting in the dierential equation we get

x(u0 x + u) = ux + 2x3 sin2 (u)

x2 u0 = 2x3 sin2 (u)


u0
= 2x
sin2 (u)
du
= 2xdx
sin2 (u)
Integrating we get
1
= x2 + C
tan(u)
1
tan(u) =
C x2
1
u = arctan
C x2
Undoing the change of variable

1
y = ux = x arctan
C x2

Kreyszig, 1.3.8
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
y 0 = (y + 4x)2
by making the change of variables y + 4x = v
Solution:
y + 4x = v y 0 + 4 = v 0 y 0 = v 0 4
Substituting in the ODE
v0 4 = v2
v0 = v2 + 4
v0
=1
v2 + 4
Separating variables
dv
= dx
v2 + 4
Integrating Z Z
dv
2
= dx
v +4

16
Z
1 dv
=x+C
4 ( v2 )2 + 1
1
2 dv
Z
1
v 2 =x+C
2 (2) + 1
1 v
atan = x + C
2 2
Solving for v
v = 2 tan(2x + C)
Undoing the change of variables

y + 4x = 2 tan(2x + C)

y = 4x + 2 tan(2x + C)

Kreyszig, 1.3.9
Carlos Oscar Sorzano, June 15th, 2015

Solve
xy 0 = y 2 + y
y
by making the change of variables u= x.
Solution: y
u= y = ux y 0 = u0 x + u
x
Substituting in the ODE

x(u0 x + u) = (ux)2 + ux

Dividing by x
u0 x + u = u2 x + u
u0 x = u2 x
u0 = u2
du
= dx
u2
Integrating
u1 = x + C
1
u=
x+C
Undoing the change of variables

y 1
=
x x+C
Finally,
x
y=
x+C

Kreyszig, 1.3.19

17
Carlos Oscar Sorzano, Aug. 31st, 2014

If the growth rate of the number of bacteria at any time t is proportional


to the number present at t and doubles in 1 week, how many bacteria can be
expected after 2 weeks? After 4 weeks?
Solution: The growth rate of the number of bacteria is A0 (t). If it is propor-
tional to the number of bacteria, we have

A0 = A
whose solution can be obtained by separating variables

dA = Adt
dA
= dt
A
Integrating
log |A| = t + C
Solving for A
A = Cet
If the number of bacteria doubles every week, we have

A(t + 7) = 2A(t)
Ce(t+7) = 2Cet
log(2)
e7 =2= = 0.0990
7
After 2 weeks we will have
log(2)
A(t + 14) = Ce(t+14) = Cet e14 = A(t)e 7 14
= A(t)e2 log(2) = A(t)(elog(2) )2 = A(t)22 = 4A(t)

Similarly, after 4 weeks, we will have

log(2)
28
A(t + 28) = A(t)e 7 = A(t)e4 log(2) = A(t)(elog(2) )4 = A(t)24 = 16A(t)

Kreyszig, 1.3.20
Carlos Oscar Sorzano, Aug. 31st, 2014

1. If the birth rate and death rate of the number of bacteria are proportional
to the number of bacteria present, what is the population as a function of
time.

2. What is the limiting situation for increasing time? Interpret it.

Solution:
1. The following model describes the situation

A0 = b A d A = (b d )A
Similarly to Problem 1.3.19, its solution is

A = Ce(b d )t = A(0)e(b d )t

18
2. If b = d , the number of bacteria stays stable from t = 0. If b > d ,
the number of bacteria grows exponentially. On the contrary, if b < d ,
the number of bacteria exponentially decreases to 0.

Kreyszig, 1.3.23
Carlos Oscar Sorzano, Aug. 31st, 2014

BoyleMariotte's law for ideal gases. Experiments show for a gas at


low pressure P (and constant temperature) the rate of change of the volume
V (P ) equals VP . Solve the model.
Solution: The following ODE models the system

V
V0 =
P
V0 1
=
V P
Separating variables
dV dP
=
V P
Integrating
C
log |V | = log |P | + C = log
P
C
V =
P

Kreyszig, 1.3.26
Carlos Oscar Sorzano, Aug. 31st, 2014

Gompertz growth in tumors. The Gompertz model is y 0 = Ay log(y)


(A > 0), where y(t) is the mass of tumor cells at time t. The model agrees
well with clinical observations. The declining growth rate with increasing y>1
corresponds to the fact that cells in the interior of a tumor may die because
of insucient oxygen and nutrients. Use the ODE to discuss the growth and
decline of solutions (tumors) and to nd constant solutions. Then solve the
ODE.
Solution: Let us solve the equation

y 0 = Ay log(y)
dy
= Adt
y log(y)
1
y dy
= Adt
log(y)
log | log(y)| = At + C
log(y) = CeAt
y = exp(Cexp(At)) = exp(log(y(0))exp(At))
The following gure shows the growth for y(0) = 0.01 and A=1

19
1

0.9

0.8

0.7

0.6

0.5
A

0.4

0.3

0.2

0.1

0
0 5 10 15 20
t

Kreyszig, 1.4.4
Carlos Oscar Sorzano, Nov. 2nd, 2014

Solve
e3 (dr + 3rd) = 0
Solution: We rewrite the dierential equation as

e3 dr + 3re3 d = 0

which is of the form


P dr + Qd = 0
To check if it is an exact equation we calculate

P
= 3e3

Q
= 3e3
r
Since both partial derivatives are equal, the equation is exact and we look for a
solution of the form
Z Z
U= P dr + C() = e3 dr + C() = e3 r + C()

To determine the constant C() we dierentiate this function with respect to


U
= 3re3 + C 0 ()

and compare it to Q
3re3 + C 0 () = Q
3re3 + C 0 () = 3re3
C 0 () = 0

20
Integrating with respect to
C() = C
Finally, the implicit solution of the dierential equation is

e3 r + C = 0

or explicitly
r = Ce3

Kreyszig, 1.4.8
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


ex (cos(y)dx sin(y)dy) = 0
Solution: We may rewrite the ODE as

ex cos(y)dx ex sin(y)dy = 0

That is of the form


P (x, y)dx + Q(x, y)dy = 0
To see if it is exact we calculate

P
= ex ( sin(y))
y
Q
= ex sin(y)
x
P Q
Since
y = x , the ODE is exact. To nd the solution, u that satises

u u
=P =Q
x y
we integrate P with respect to x

ex cos(y)dx = cos(y)ex + C(y)


R
u(x, y) =

If we now dierentiate u with respect to y we should obtain Q


u
= ex ( sin(x)) + C 0 (y) = ex sin(y) C 0 (y) = 0 C(y) = C
y
So the solution to the problem are all functions of the form

u(x, y) = C = cos(y)ex y = acos(Cex )

Kreyszig, 1.4.9
lvaro Martn Ramos, Dec. 25th, 2014

Solve the ODE


e2x (2 cos(y)dx sin(y)dy) = 0

21
Solution: We may rewrite the ODE as

e2x 2 cos(y)dx e2x sin(y)dy) = 0

That is of the form


P (x, y)dx + Q(x, y)dy = 0
To see if it is exact we calculate

P
= 2e2x sin(y)
y
Q
= 2e2x sin(y)
x
Since
Q P
=
x y
the ODE is exact. To nd the solution, u, that satises

u
=P
x
u
=Q
y
we integrate P with respect to x
Z
u(x, y) = e2x 2 cos(y)dx = cos(y)e2x + C(y)

If we now dierentiate u with respect to y we should obtain Q


u
= sin(y)e2x + C 0 (y) = e2x sin(y) C 0 (y) = 0 C(y) = C
y
So the solution to the problem are all functions of the form

u(x, y) = C = cos(y)e2x y = acos(Ce2x )

Kreyszig, 1.4.10
Carlos Oscar Sorzano, Jan. 13th, 2015

Solve the dierential equation

ydx + (y + tan(x + y))dy = 0

knowing that cos(x + y) is an integrating factor.


Solution: Let us multiply the whole equation by cos(x + y)

y cos(x + y)dx + (y cos(x + y) + sin(x + y))dy = 0

which is of the form


P (x, y)dx + Q(x, y)dy = 0

22
Let us check if this is an exact equation:

P (x, y)
Py = = cos(x + y) y sin(x + y)
y
Q(x, y)
Qx = = y sin(x + y) + cos(x + y)
x
Since Py = Qx , the equation is exact. We can solve it by integrating with
respect to one of the variables
Z Z
U (x, y) = P (x, y)dx = y cos(x + y)dx = y sin(x + y) + C(y)

We now dierentiate U with respect to y


U (x, y)
Q(x, y) =
y

y cos(x + y) + sin(x + y) = sin(x + y) + y cos(x + y) + C 0 (y)


C 0 (y) = 0
C(y) = C
Finally, the implicit solution of the dierential equation is

U (x, y) = 0

y sin(x + y) + C = 0

Kreyszig, 1.4.11
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE

2 cosh(x) cos(y)dx = sinh(x) sin(y)dy

Solution: We may rewrite the ODE as

2 cosh(x) cos(y)dx sinh(x) sin(y)dy = 0

That is of the form


P (x, y)dx + Q(x, y)dy = 0
To see if it is exact we calculate

P
= 2 cosh(x)( sin(y))
y
Q
= cosh(x) sin(y)
x
P Q
Since
y 6= x , the ODE is not exact. For nding an integrating factor, we
start by calculating

Py Qx = 2 cosh(x)( sin(y)) ( cosh(x) sin(y)) = cosh(x) sin(y)

23
We note that
Qx Py cosh(x) sin(y) 1
= = tan(y)
P 2 cosh(x) cos(y) 2
is a function ofy , f (y). The integrating factor comes
Z   
1 1 1
F = exp tan(y)dy = exp log(cos(y)) = p
2 2 cos(y)

We now multiply the ODE by the integrating factor

1
p (2 cosh(x) cos(y)dx sinh(x) sin(y)dy) = 0
cos(y)
p sin(y)
2 cosh(x) cos(y)dx sinh(x) p dy = 0
cos(y)
At this point, the ODE is exact. We nd its solution by integrating P with
respect to x
Z p p
u(x, y) = 2 cosh(x) cos(y)dx = 2 sinh(x) cos(y) + C(y)

Dierentiating with respect to y we should obtain FQ


u sin(y) sin(y)
= sinh(x) p + C 0 (y) = sinh(x) p C 0 (y) = 0
y cos(y) cos(y)

So the solutions of the ODE are of the form

p
u(x, y) = C = 2 sinh(x) cos(y)

Kreyszig, 1.5.7
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


xy 0 = 2y + x3 ex
Solution: We may rewrite the ODE as

2
y0 y = x2 ex
x
That is of the form
y 0 + p(x)y = r(x)
This is a linear, non-homogeneous equation, whose solution is given by
Z
yh = eh ( eh rdx + C)

where
pdx = x2 dx = 2 log |x|
R R
h =
h
e = eR2 log |x| = x2
(x2 )(x2 ex )dx = ex
R h
e rdx =

24
Finally

y = x2 (ex + C)

Kreyszig, 1.5.13
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


y 0 = 6(y 2.5)tanh(1.5x)
Solution: We may rewrite the ODE as

y 0 6tanh(1.5x)y = 15tanh(1.5x)

That is of the form


y 0 + p(x)y = r(x)
This is a linear, non-homogeneous equation, whose solution is given by
Z
yh = eh ( eh rdx + C)

where

tanh(1.5x)dx = 6 log(cosh(1.5x))
R R
h = pdx = 6 1.5 = 4 log(cosh(1.5x))
e h
= eR4 log(cosh(1.5x)) = cosh4 (1.5x)
(cosh4 (1.5x))(15tanh(1.5x))dx = cosh2.5
R h
e rdx = 4 (1.5x)

Finally
 
4 2.5
y = cosh (1.5x) +C = 2.5 + C cosh4 (1.5x)
cosh4 (1.5x)

Kreyszig, 1.5.15
Carlos Oscar Sorzano, Aug. 31st, 2014

Let H be the homogeneous problem

y 0 + p(x)y = 0

and NH be the non-homogeneous problem

y 0 + p(x)y = r(x)

Show that the sum of two solutions and of the homogeneous equation (H ) is a
solution of (H ), and so is a scalar multiple for any constant a. These properties
are not true for the non-homogeneous problem (N H ).
Solution: Let y1 and y2 be two solutions of the homogeneous problem so that

y10 + p(x)y1 = 0

y20 + p(x)y2 = 0
Adding both equations we have

y10 + y20 + p(x)y1 + p(x)y2 = 0

25
(y1 + y2 )0 + p(x)(y1 + y2 ) = 0
This last equation proves that y1 + y2 is also a solution of the homogeneous
problem. Similarly if we multiply the rst equation by a we have

a(y10 + p(x)y1 ) = 0

ay10 + ap(x)y1 = 0
(ay1 )0 + p(x)(ay1 ) = 0
which proves that ay1 is also a solution of the homogeneous problem.
However, this is not true for the non-homogeneous problem. Let us assume
that y1 and y2 are solutions of the non-homogeneous problem

y10 + p(x)y1 = r(x)

y20 + p(x)y2 = r(x)


Let us check if y1 + y2 is also a solution. For doing so, we substitute y1 + y2
into the ODE

(y1 + y2 )0 + p(x)(y1 + y2 ) = (y10 + p(x)y1 ) + (y20 + p(x)y2 ) = 2r(x) 6= r(x)

The same happens with ay1

(ay1 )0 + p(x)(ay1 ) = a(y10 + p(x)y1 ) = ar(x) 6= r(x)

Kreyszig, 1.5.17
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that the sum of a solution of the non-homogeneous problem and a


solution of the homogeneous one is a solution of the non-homogeneous problem.
Solution: Let yp be a solution of the non-homogeneous problem

yp0 + p(x)yp = r(x)

and yh be a solution of the homogeneous problem

yh0 + p(x)yh = 0

Let us check if yp + yh is a solution of the non-homogeneous problem

(yp + yh )0 + p(x)(yp + yh ) = (yp0 + p(x)yp ) + (yh0 + p(x)yh ) = r(x) + 0 = r(x)

That is, yp + yh is indeed a solution of the non-homogeneous problem.


Kreyszig, 1.5.18
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that the dierence of two solutions of the non-homogeneous problem


is a solution of the homogeneous problem.
Solution: Let y p1 and y p2 be two solutions of the non-homogeneous problem

yp0 1 + p(x)yp1 = r(x)

26
yp0 2 + p(x)yp2 = r(x)
Let us check if y p1 y p2 is a solution of the homogeneous problem

(yp1 yp2 )0 +p(x)(yp1 yp2 ) = (yp0 1 +p(x)yp1 )(yp0 2 +p(x)yp2 ) = r(x)r(x) = 0

That is, yp1 yp2 is indeed a solution of the homogeneous problem.


Kreyszig, 1.5.21
Carlos Oscar Sorzano, Aug. 31st, 2014

Variation of parameter. Another method of obtaining the solution y=


eh ( eh rdx + C) of a non-homogeneous problem
R

y 0 + p(x)y = r(x)

results from the following idea. Write the solution of the homogeneous problem
as R
y = Ce pdx
= Ceh = Cy
where y is the exponential function, which is a solution of the homogeneous
linear ODE
(y )0 + p(x)y = 0
Replace the arbitrary constant C in the homogeneous solution with a function
u to be determined so that the resulting function y = uy is a solution of the
nonhomogeneous linear ODE.
Solution: Let us introduce the function uy into the non-homogeneous ODE
to see the requirements that u must meet

(uy )0 + p(uy ) = u0 y + u(y )0 + puy


= u0 y + u((y )0 + py )
= u0 y + u0
= u0 y
= r

That is, we need

u0 y = r u0 = r
= reh u = reh dx + C
R
eh

So the solution of the non-homogeneous problem is


Z 
y = uy = reh dx + C eh

Kreyszig, 1.5.24
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve y 0 + y = xy
Solution: This is a Bernouilli equation of the form

y 0 + p(x)y = g(x)y a

with p(x) = 1, g(x) = x and a = 1. We do the change of variable

u = y 1a = y 1(1) = y 2

27
Dierentiating

u0 = 2yy 0 = 2y(y xy 1 ) = 2y 2 2x = 2u 2x

u0 + 2u = 2x
This is now a linear, non-homogeneous equation system of the form

u0 + pu = r

whose solution is given by


Z Z
h= pdx = 2dx = 2x

eh ( eh rdx + C) = e2x
R R 2x 
u = e (2x)dx + C
e2x xe2x 21 e2x + C = x 21 + Ce2x

=
Now we undo the change of variable

r
2 1
y = x + Ce2x
2

Kreyszig, 1.5.25
lvaro Martn Ramos, Dec. 25th, 2014

Solve
y 0 = 3.2y 10y 2
Solution: We may rewrite the ODE as

y 0 3.2y = 10y 2

This is a Bernouilli equation of the form

y 0 + p(x)y = g(x)y a

with p(x) = 3.2, g(x) = 10 and a = 2. We do the change of variable

u = y 1a = y 12 = y 1

Dierentiating

1 0 1
u0 = (y 1 )0 = y = 2 (3.2y 10y 2 ) = 3.2y 1 + 10 = 3.2u + 10
y2 y

u0 + 3.2u = 10
This is now a linear, non-homogeneous equation system of the form

u0 + pu = r

whose solution is given by


Z Z
h= pdx = (3.2)dx = 3.2x

28
u = eh ( eh rdx + C) = e3.2x ( e3.2x 10dx + C)
R R
3.2x
= e3.2x ( 10e3.2 + C) = 3.2
10
+ Ce3.2x
Now we undo the change of variable

1 1
y = = 10
u 3.2 + Ce3.2x

Kreyszig, 1.5.28
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve 2xyy 0 + (x 1)y 2 = x2 ex . Hint: set z = y2


Solution: If we do the change of variable

z = y 2 z 0 = 2yy 0

then the ODE is transformed to

xz 0 + (x 1)z = x2 ex
x1
z0 + z = xex
x
This is now a linear, non-homogeneous equation system of the form

z 0 + pz = r

whose solution is given by

x1
Z Z
h= pdx = dx = x log |x|
x
= eh ( Reh rdx + C) = ex+log |x|
R R xlog |x| x 
z e  (xe )dx + C
= ex x e2x dx + C = ex x 21 e2x + C


= x2 ex + Cex
Now we undo the change of variable

r
x x
y2 = e + Cex
2

Kreyszig, 1.5.33
Carlos Oscar Sorzano, Aug. 31st, 2014

Find and solve the model for drug injection into the bloodstream if, begin-
ning at t=0 a constant amount A[g/min] is injected and the drug is simul-
taneously removed at a rate proportional to the amount of the drug present at
time t.
Solution: The ODE

A0 = Kin Kout A A(0) = 0

models the system. This can be rewritten as

A0 + Kout A = Kin

29
which is a linear, non-homogeneous ODE whose solution is
R
h = Kout
R dth = Kout t
eh e rdt + C = eKout x eKo ut tKin dt + C
R 
A =
Kin
= eKout t Kin Kout
1
eKout t + C = Kout + CeKout t

Now we impose the initial condition

Kin Kin
A(0) = 0 = +C C =
Kout Kout
Finally, the solution is

Kin
A(t) = (1 eKout t ) (t > 0)
Kout

Kreyszig, 1.5.34
Carlos Oscar Sorzano, Aug. 31st, 2014

A model for the spread of contagious diseases is obtained by assuming that


the rate of spread is proportional to the number of contacts between infected
and noninfected persons, who are assumed to move freely among each other.
Set up the model. Find the equilibrium solutions and indicate their stability or
instability. Solve the ODE. Find the limit of the proportion of infected persons
as t and explain what it means.
Solution: Let us call y the proportion of infected persons. The growth of
infected persons is proportional to the number of contacts means that

y 0 = ky(1 y) y(0) = y0

The two equilibrium solutions are y=0 (unstable) and y=1 (stable) as can
be seen in the gure below

1.2

0.8
y

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1
t

We can rewrite the ODE as

y 0 ky = ky 2

30
This is a Bernouilli equation of the form

y 0 + py = gy a

with p = k , g = k , a = 2. We do the change of variable

u = y 1a = y 12 = y 1

u0 = y 2 y 0 = y 2 (ky ky 2 ) = (ky 1 k) = k ku
u0 + ku = k
This is a linear, non-homogeneous equation whose solution is
R
h = kdtR= kt
u = eh eh rdt + C = ekt e kdt + C = ekt ekt + C = 1 + Cekt
 R kt  

We undo now the change of variable

1
y=
1 + Cekt
Imposing the initial condition

1 1 1 y0
y0 = C= 1=
1+C y0 y0
Finally
1 y0
y = 1y0 kt =
1+ y0 e
y0 + (1 y0 )ekt
The following gure shows the curve for y0 = 0.1, k = 0.8.

0.9

0.8

0.7

0.6

0.5
y

0.4

0.3

0.2

0.1

0
0 2 4 6 8 10
t

Kreyszig, 1.6.9
Carlos Oscar Sorzano, Jan. 13th, 2015

Which is the set of orthogonal trajectories to the curve family

2
y = cex

31
Solution: To nd the orthogonal trajectories, we dierentiate the set of curves
2
y 0 = 2xcex
That we may rewrite as
y 0 = 2xy = f (x, y)
The set of orthogonal curves must fulll

1 1
y 0 = =
f (x, y) 2xy
1
y y 0 =
2x
1
ydy = dx
2x
Which is a separable dierential equation that can be directly integrated

1 2 1
y = log(x) + C
2 2
y 2 = log(x) + C
2 C
ey =
x
Finally, the curve family can be rewritten as

2
x = Cey

Kreyszig, 1.6.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Electric eld. The lines of electric force of two opposite charges of the
same strength at (1, 0) and (1, 0) are the circles through (1, 0) and (1, 0).
Show that these circles are given by

x2 + (y c)2 = 1 + c2 .
Show that the equipotential lines (which are orthogonal trajectories of those
circles) are the circles given by

(x + c )2 + y 2 = (c )2 1
(dashed in the following gure).

32
Solution: The curve
x2 + (y c)2 = 1 + c2
is the family of all circles pasing by (1, 0) and (1, 0). To show this statement
we show that (1, 0) and (1, 0) fulll this equation

(1)2 + (0 c)2 = 1 + c2

(1)2 + (0 c)2 = 1 + c2
Obviously this family is a set of circles.
To nd the orthogonal trajectories, we dierentiate the curve

2x + 2(y c)y 0 = 0

x + (y c)y 0 = 0
This curve contains the parameter c which should not be there. To eliminate
it, we manipulate the original set of curves to get

x2 + y 2 + c2 2yc = 1 + c2

x2 + y 2 2yc = 1
x2 + y 2 1
c=
2y
So the dierential equation becomes

x2 + y 2 1
 
x+ y y0 = 0
2y

2yx + 2y 2 (x2 + y 2 1) y 0 = 0


2yx + y 2 x2 + 1 y 0 = 0


2yx
y0 = = f (x, y)
y2 x2 + 1
The set of orthogonal curves must fulll

1 y 2 x2 + 1 1 1 1 x2 1
y 0 = = = y + y
f (x, y) 2yx 2x 2 x

1 1 1 x2 1
y 0 y = y
2x 2 x
This ODE is a Bernouilli equation of the form

y 0 + p(x)y = g(x)y a

with a = 1. So we make the change of variable

u = y 1a = y 1(1) = y 2 u0 = 2y y 0

1 1 x2 1
 
1
u0 = 2y y + y
2x 2 x

33
1 2 1 x2
u0 = y +
x x
1 1 x2
u0 = u +
x x
1 1 x2
u0 u =
x x
This is a linear equation whose solution is
R 1
h = x dx = log |x|
eh = e logR|x| = x1
u = eh + c 
h

R e rdx
1 1x2
= x dx + c
 2 x
x 
= x x x+1 + c
= x2 1 + c x

Undoing the change of variable

y 2 = x2 1 + c x

y 2 + x2 c x = 1
 2  2
c c
y 2 + x2 c x + = 1 +
2 2
2 2
c c
   
y 2 + x = 1 +
2 2
2
y 2 + (x c ) = 1 + (c )2
2
(x + c ) + y 2 = (c )2 1

Kreyszig, 1.6.13
Carlos Oscar Sorzano, Aug. 31st, 2014

Temperature eld. Let the isotherms (curves of constant temperature) in


a body in the upper half-plane y>0 be given by

4x2 + 9y 2 = c.

. Find the orthogonal trajectories (the curves along which heat will ow in
regions lled with heat-conducting material and free of heat sources or heat
sinks).
Solution: Let us analyze rst the curves

4x2 + 9y 2 = c
4 2 9 2
x + y =1
c c
!2 !2
x y

c
+ c =1
2 3

34

c c
So they are ellipses of semiaxes
2 and 3 .
Their orthogonal trajectories can be determined by dierentiating the family
of curves:
8x + 18yy 0 = 0
4x + 9yy 0 = 0
4x
y0 = = f (x, y)
9y
The orthogonal trajectories fulll the dierential equation

1 9y
y 0 = =
f (x, y) 4x

dy dx
=
9y 4x
1 1
log |y| = log |x| + K
9 4
9
log |y| = log |x| + K
4
9
y = Kx 4 = Kx2.25
In MATLAB:

close all
h=ezplot('y-x2.25',[-2 2 0 4])
set(h,'Color','red')
hold on
h=ezplot('y-2*x2.25',[-2 2 0 4])
set(h,'Color','red')
h=ezplot('y-0.5*x2.25',[-2 2 0 4])
set(h,'Color','red')
h=ezplot('4*x2+9*y2=1',[-2 2 0 4])
set(h,'Color','blue')
h=ezplot('4*x2+9*y2=8',[-2 2 0 4])
set(h,'Color','blue')
h=ezplot('4*x2+9*y2=20',[-2 2 0 4])
set(h,'Color','blue')
axis square
title 

35
4

3.5

2.5

2
y
1.5

0.5

0
2 1 0 1 2
x

Problema
Carlos Oscar Sorzano, Nov. 4th, 2014

It starts snowing in the morning and continues steadily throughout the day.
A snow- plow that removes snow at a constant rate starts plowing at noon. It
plows 2 km in the rst hour, and 1 km in the second. What time did it start
snowing?
Solution: Let us assume that the snowplow removes snow at a constant rate
[cm3 /h] and the snow falls at a xed rate k[cm3 /h]. Assume that the width of
the snowplow is equal to the road width w[cm]. Assume that it starts to snow
at t = t0 . Then, the height of the snow in the road must fulll the dierential
equation
dh
1[cm]w[cm] [cm/h] = k[cm3 /h] h(t0 ) = 0
dt
whose solution is
k
dh = dt
w
k
h=C+ t
w
The constant C is obtained by the initial condition

h(t0 ) = 0

k kt0
C t0 = 0 C =
w w
So the height becomes
k
h= (t + t0 )[cm]
w
Let us call x(t) the distance that the snowplow has gone since t = 0. The speed
of the snowplow depends on the amount of snow that it can remove by unit of
time
dx
w[cm]h[cm] [cm/h] = [cm3 /h]
dt

36
dx
= =
dt wh k(t + t0 )
dt
dx =
k t + t0

x= log |t + t0 | + C
k
We have the initial condition x(0) = 0 from which

0= log |t0 | + C C = log |t0 |
k k
Consequently, the distance gone by the snowplow is

t
x(t) = (log |t + t0 | log |t0 |) = log + 1

k k t0

From the problem statement we know that x(1) = 2000 and x(2) = 3000, that
is
x(2) = 3000 = k log t20 + 1


x(1) = 2000 = k log t10 + 1

Dividing both equations


2
log + 1

3 t0
=
2 log t10 + 1


1 2
3 log + 1 = 2 log + 1
t0 t0
  2
1  3 2
log + 1 = log +1

t0 t0
 3  2
1 2
+1 = +1
t0 t0
(1 + t0 )3 (2 + t0 )2
3 =
t0 t20
(1 + t0 )3 = t0 (2 + t0 )2
t30 + 3t20 + 3t0 + 1 = t30 + 4t20 + 4t0
(
1 5
t20 + t0 1 = 0 t0 = 2
51
2

The only valid solution is


51
t0 = = 0.618[h] = 37[min]
2
So it started snowing at 11h 23' AM.

37
2 Chapter 2

Kreyszig, 2.1.1
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that
F (x, y 0 , y 00 ) = 0
can be reduced to a rst-order equation in z = y0 .
Solution: If we do the change of variable

z = y 0 z 0 = y 00

Substituting in the original ODE, we have

F (x, z, z 0 ) = 0

that is a rst-order equation.


For example,
1 0
y 00 + y = cosh(x)
x
can be transformed into
1
z0 + z = cosh(x)
x

Kreyszig, 2.1.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that
F (y, y 0 , y 00 ) = 0
can be reduced to a rst-order equation in z = y0 .
Solution: If we do the change of variable

dy 0 dy dz
z = y0 z0 = = z = zy z
dy dx dy
Substituting in the original ODE, we have

F (y, z, zy z) = 0

that is a rst-order equation.


For example,
1
y 00 + y 0 + y 2 = 0
y
can be transformed into
1
zy z + z = y 2
y

Kreyszig, 2.1.4
Carlos Oscar Sorzano, Nov. 2nd, 2014

38
Solve
2xy 00 = 3y 0
Solution: We make the change of variable

z = y0

z 0 = y 00
The dierential equation becomes

2xz 0 = 3z
z0 3
=
z 2x
dz 3dx
=
z 2x
Integrating
3
log |z| = log |x| + C1
2
3
log |z| = log |x 2 | + C1
3
z = C1 x 2
Undoing the change of variable

3
y 0 = C1 x 2
Z
3
y = C1 x 2 dx + C2

2 5
y= C1 x 2 + C2
5
After absorbing constants, the general solution can be rewritten as

5
y = C1 x 2 + C2

Kreyszig, 2.1.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve yy 00 = 3(y 0 )2
Solution: If we do the change of variable

dy 0 dy dz
z = y0 z0 = = z = zy z
dy dx dy
Substituting in the original ODE, we have

y(zy z) = 3z 2

zy y = 3z
dz 3dy
=
z y

39
log |z| = 3 log |y| + C1
z = C1 y 3
Now we solve
y 0 = C1 y 3
y 3 dy = C1 dx
1
2 = C1 x + C2
2y
C1 xy 2 + C2 y 2 = 1

Kreyszig, 2.1.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Hanging cable. It can be shown that the curve y(x) of an inextensible


exible homogeneous cable hanging between two xed points is obtained by
solving p
y 00 = k 1 + (y 0 )2
where the constant k depends on the weight. This curve is called catenary (from
Latin catena = the chain). Find and graph y(x), assuming that and those xed
points are (1, 0) and (1, 0) in a vertical xy -plane.
Solution: If we do the change of variable

z = y 0 z 0 = y 00

Substituting in the original ODE, we have


p
z0 = k 1 + z2
dz
= kdx
1 + z2
asinh(z) = kx + c1
z = y 0 = sinh(kx + c1 )
Since the catenary is symmetric with respect to the middle point, at this point
we have no slope, that is

y 0 (0) = 0 = sinh(c1 ) c1 = 0

Now we solve the ODE


y 0 = sinh(kx)
Z
1
y= sinh(kx)dx = cosh(kx) + c2
k
Imposing the boundary condition

1 1 1
y(1) = 0 = cosh(k) + c2 c2 = cosh(k) = cosh(k)
k k k
So the nal curve is
1 1
y= cosh(kx) cosh(k)
k k

40
0

0.1

0.2

0.3
y

0.4

0.5

0.6

0.7
1 0.5 0 0.5 1
x

Kreyszig, 2.1.13
Carlos Oscar Sorzano, Aug. 31st, 2014

Motion. If, in the motion of a small body on a straight line, the sum of
velocity and acceleration equals a positive constant, how will the distance y(t)
depend on the initial velocity and position?
Solution: If the sum of velocity and acceleration equals a positive constant,
then
y 0 + y 00 = k
We make the change of variable

z = y 0 z 0 = y 00
Then the ODE becomes
z + z0 = k
whose solution is given by
R
h = 1dxR = t
eh ( eh rdt + c1 ) = et ( et kdt + c1 ) = et (ket + c1 ) = k + c1 et
R
z =
Now we solve
z = y 0 = k + c1 et
y = kt c1 et + c2
We now impose the initial conditions

y(0) = y0 = c1 + c2
y 0 (0) = v0 = k + c1 c1 = v0 k
c2 = y0 + c1 = y0 + v0 k
So the nal dependence of motion on the initial conditions is

y = kt + (k v0 )et + y0 + v0 k = y0 + kt + (k v0 )(et 1)

41
Kreyszig, 2.1.17
Carlos Oscar Sorzano, Aug. 31st, 2014

3 1
Verify that the functions x2 and x 2 are a basis of solutions of the ODE

4x2 y 00 3y = 0
Find the particular solution satisfying y(1) = 3, y 0 (1) = 0.
Solution: Let us calculate the derivatives of the two given functions

3
y1 = x2
1
y10 = 3 2
2x
1 1
3 1 2
y100 = 2 2x = 34 x 2
1
2
y2 = x
3
y20 = 12 x 2
5 5
y200 = ( 12 )( 23 )x 2 = 34 x 2
We now substitute these two functions in the ODE to verify if they are solutions
of it
1 3 3 3
4x2 y100 3y1 = 4x2 ( 34 x 2 ) 3x 2 = 3x 2 3x 2 = 0
5 1 1 1
4x2 y200 3y2 = 4x2 ( 34 x 2 ) 3x 2 = 3x 2 3x 2 = 0
So they are two independent (one is not a multiple of the other) solutions of
a second-order ODE, consequently, they are a basis of solutions. The general
solution can be written as
3 1
y = c1 y1 + c2 y2 = c1 x 2 + c2 x 2
The solution satisfying the initial values must fulll

yp (1) = 3 = c1 + c2 3 9
c1 = , c2 =
yp0 (1) = 0 = 23 c1 12 c2 4 4
So
3 3 9 1
yp = x 2 x 2
4 4

2.95

3.05

3.1

3.15

3.2
y

3.25

3.3

3.35

3.4

3.45
0.5 1 1.5
x

42
Kreyszig, 2.1.19
lvaro Martn Ramos, Dec. 27th, 2014

Verify that the functions

ex cos(x), ex sin(x)

are a basis of the ODE


y 00 + 2y 0 + 2y = 0
Find the particular solution satisfying y(0)=0, y'(0)=15.
Solution: Let us calculate the derivatives of the two given functions

y1 = ex cos(x)
y10 = ex cos(x) ex sin(x)
y100 = [ex cos(x) + ex sin(x)] [ex sin(x) + ex cos(x)]
= 2ex sin(x)
y2 = ex sin(x)
y20 = ex sin(x) + ex cos(x)
y200 = [ex sin(x) ex cos(x)] + [ex cos(x) ex sin(x)]
= 2ex cos(x)

We now substitute these two functions in the ODE to verify if they are solutions
of it
y100 + 2y10 + 2y1 = 0
2ex sin(x) + 2[ex cos(x) ex sin(x)] + 2[ex cos(x)] = 0
0=0
Similarly
y200 + 2y20 + 2y2 = 0
2ex cos(x) + 2[ex sin(x) + ex cos(x)] + 2[ex sin(x)]
0=0
So they are two independent(one is not multiple of the other) solutions of
a second-order ODE, consequently, they are a basis of solutions. The general
solution can be written as

y = c1 y1 + c2 y2 = c1 ex cos(x) + c2 ex sin(x)

The solution satisfying the initial values must fulll

y(0) = 0 = c1

y 0 (0) = 15 = c1 [e0 cos(0) e0 sin(0)] + c2 [e0 sin(0) + e0 cos(0)] = c1 + c2


c1 + c2 = 15 c2 = 15
So
yp = 15ex sin(x)

Kreyszig, 2.2.11
lvaro Martn Ramos, Dec. 27th, 2014

43
Solve the ODE
y 00 4y 0 3y = 0
Solution: The characteristic equation is

42 4 3 = 0

whose solutions are



4 16 + 48 48 3 1
= = 1 = , 2 =
8 8 2 2
The general solution is
3 1
y = c1 e 2 x + c2 e( 2 )x

Kreyszig, 2.2.16
Carlos Oscar Sorzano, Aug. 31st, 2014

Find an ODE whose basis of solutions are e2.6x and e4.3x .


Solution: We look for an ODE of the form

y 00 + ay 0 + by = 0

If the exponential ex is to be a solution of the ODE, it must fulll

P () = 2 + a + b = 0

But we already know that = 2.6 and = 4.3 are two solutions, so the
characteristic polynomial can be factorized as

P () = ( 2.6)( + 4.3) = 2 + 1.7 11.18

The corresponding ODE is

y 00 + 1.7y 0 11.18y = 0

Kreyszig, 2.2.17
Carlos Oscar Sorzano, Aug. 31st, 2014


5x 5x
Find an ODE whose basis of solutions are e and xe .
Solution: As in the Problem 2.2.16, we know that the characteristic polynomial
can be factorized as

P () = ( 5)2 = 2 2 5 + 5

The corresponding ODE is


y 00 2 5y 0 + 5y = 0

Kreyszig, 2.2.19
lvaro Martn Ramos, Dec. 27th, 2014

44
Find an ODE whose basis of solutions are e(2+i)x and e(2i)x .
Solution: We look for an ODE of the form

y 00 + ay 0 + by = 0

If those are solutions of the ODE, it must fulll

P () = 2 + a + b = 0

We can solve it
1 p a w
1 = (a + a2 4b) = + i
2 2 2
1 p a w
2 = (a a2 4b) = i
2 2 2
Where p
w= a2 4b
We now that the generic solutions of the dierential equation are of the form

a w
y1 = e( 2 +i 2 )x
a w
y2 = e( 2 i 2 )x
Our solutions are
e(2+i)x , e(2i)x
So
a
2 = a=4
2
And
w
= 1 16 4b = 2 b = 3
2
Therefore the corresponding ODE is

y 00 + 4y 0 + 3y = 0

Kreyszig, 2.2.31
Carlos Oscar Sorzano, Aug. 31st, 2014

Are the functions ekx and xekx linearly independent on any interval?
Solution: Let us call
y1 = ekx
y2 = xekx
The two functions are linearly dependent if we can nd two constants, not all
of them zero, such that
c1 y 1 + c2 y 2 = 0
If c1 is dierent from 0, then
y1 c2
=
y2 c1
If c2 is dierent from 0, then
y2 c1
=
y1 c2

45
That is if they are linearly dependent, one function must be a multiple of the
other or 0. The ratio
y2 xekx
= kx = x
y1 e
is not constant, and consequently, the two functions are linearly independent.
Kreyszig, 2.2.33
lvaro Martn Ramos, Dec. 27th, 2014

Are the functions x2 and x2 ln(x) linearly independent on the interval x > 1
?
Solution: The ratio
x2 1
2
=
x ln(x) ln(x)
is a function of x and not a constant, consequently, the two functions are linearly
independent. If they were linearly dependent, their ratio would be constant.

Kreyszig, 2.2.34
Carlos Oscar Sorzano, Aug. 31st, 2014

Are the functions log(x) and log(x3 ) linearly independent on the interval
x > 1?
Solution: The ratio
log(x3 ) 3 log(x)
= =3
log(x) log(x)
is constant, and consequently, the two functions are linearly dependent (one is
a multiple of the other).
Kreyszig, 2.2.35
Carlos Oscar Sorzano, Aug. 31st, 2014

Are the functions sin(2x) and cos(x) sin(x) linearly independent on the in-
terval x < 0?
Solution: The ratio

sin(2x) 2 cos(x) sin(x)


= =2
cos(x) sin(x) cos(x) sin(x)

is constant, and consequently, the two functions are linearly dependent (one is
a multiple of the other).
Kreyszig, 2.3.5
Carlos Oscar Sorzano, June 15th, 2015

Apply the operator (D 2I)(D + 3I) to the functions e2x , xe2x , and e3x .
Show all steps in detail.

46
Solution:
(D 2I)(D + 3I)(e2x ) = (D 2I)(2e2x + 3e2x )
= (D 2I)(5e2x )
= 10e2x 10e2x
= 0
(D 2I)(D + 3I)(xe2x ) = (D 2I)((1 + 2x)e2x + 3xe2x )
= (D 2I)((1 + 5x)e2x )
= (7 + 10x)e2x 2(1 + 5x)e2x
= 5e2x
(D 2I)(D + 3I)(e3x ) = (D 2I)(3e3x + 3e3x )
= (D 2I)(0)
= 0

Kreyszig, 2.3.14
Carlos Oscar Sorzano, Aug. 31st, 2014

If L = D2 + aD + bI has distinct roots and , show that a particular


solution is
ex ex
y=

Obtain from this a solution xex by letting and applying L'Hpital rule.
Solution: Since and are roots of the polynomial s2 + as + b and we know
that
(D2 + aD + bI)ex = 0
(D2 + aD + bI)ex = 0
ex ex
Let us check whether the function y= is a solution of the ODE

Ly = 0
 
ex ex
1 1
(D2 + aD + bI) = (D2 + aD + bI)ex (D
2
+ aD + bI)ex
1 1
= 0 0
= 0
So y is a solution.
Let us study the behaviour of y as

ex ex (e()x 1)ex
lim = lim

x e()x 1
= e lim

x 1+()x1
= e lim

x ()x
= e lim

x
= xe

Kreyszig, 2.4.3
lvaro Martn Ramos, Dec. 27th, 2014

47
How does the frequency of the harmonic oscillation change if we (i) double
the mass, (ii) take a spring of twice the modulus?
Solution: By the Newton's second law and Hooke's law we know that

ky = my 00
k
y 00 + y=0
m
We can solve its characteristic equation

r
2 k k
+ = 0 = i = i0
m m
(i) If we double the mass

r r
2 k k 1 k 1
+ = 0 = i = i = i 0
2m 2m 2 m 2
1
So the frequency will be lower by a factor .
2
(ii) If we take a spring of twice the modulus

r r
2 k 2k k
+ 2 y = 0 = i = i 2 = i 2w0
m m m

So the frequency will be higher by a factor 2.
Kreyszig, 2.4.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Springs in parallel. What are the frequencies of vibration of a body of


massm = 5[kg] (i) on a spring of modulus k1 = 20[N/m], (ii) on a spring of
modulus k2 = 45[N/m], (iii) on the two springs in parallel?
Solution: For the cases (i) and (ii), with a single spring, the dierential equa-
tion governing the system is

k
F = ky = my 00 y 00 + y=0
m
The frequency of vibration comes from the analysis of the characteristic poly-
nomial of the ODE
r
2 k k
+ = 0 = i0 = i
m m
In the rst case it is

r s
k1 20[N/m]
01 = = = 2[s1 ]
m 5[Kg]

In the second case

r s
k2 45[N/m]
02 = = = 3[s1 ]
m 5[Kg]

48
If we put the springs in parallel, the system would be described by

k1 + k2
F1 + F2 = k1 y k2 y = my 00 y 00 + y=0
m
r s
k1 + k2 65[N/m]
03 = = = 3.6[s1 ]
m 5[Kg]

Kreyszig, 2.4.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Springs in series. What is the frequency of vibration if the two springs


are in series instead of in parallel?
Solution: The force applied on the mass must fulll

F = ky = k(y1 + y2 )

On another side,
F = k1 y1 = k2 y2
Then we can write
y = y1 + y2
F F F
=
k k1 k2
1 1 1 k1 k2
= + k=
k k1 k2 k1 + k2
Then, we can calculate the frequency of oscillation as

r s s
k k1 k2 45 20
0 = = = = 1.66[s1 ]
m (k1 + k2 )m (45 + 20)5

Kreyszig, 2.4.7
Carlos Oscar Sorzano, Aug. 31st, 2014

Pendulum. Find the frequency of oscillation of a pendulum of length L,


neglecting air resistance and the weight of the rod, and assuming to be so
small that sin() practically equals .
Solution: The movement of the pendulum is along an arch whose length is L.
The acceleration is the second derivative of this variable (L)00 , and Newton's
second law of motion states
F = ma
mg sin() = m(L)00
g sin() = (L)00
For a small angle sin()
g = (L)00
g
00 + = 0
L

49
The characteristic polynomial is

g
2 + =0
L
r
g
= i0 = i
L

Kreyszig, 2.4.8
Carlos Oscar Sorzano, Nov. 2nd, 2014

Archimedian principle. This principle states that the buoyancy force


equals the weight of the water displaced by the body (partly or totally sub-
merged). The cylindrical buoy of diameter 60 cm in the following gure is
oating in water with its axis vertical. When depressed downward in the water
and released, it vibrates with period 2 sec. What is its weight?

Solution: Let y be the height of the cylinder that has been submerged. The
force that the buoy experiences is

F = (r2 )y

where is the specic weight of water ( = 980[(cm/s2 )(g/cm3 )] = 980[g/(cm2 s2 )])


and r is the radius of the cylinder (60 cm). By Newton's law:

my 00 = (r2 )y

my 00 + (r2 )y = 0
The oscillation frequency comes from the roots of the characteristic equation

m2 + (r2 ) = 0
r
2
= ir = i0 =
m T
where T is the oscillation period. Solving for T we have

r
2 2 2 m
T = = p =
0 r m r

Finally, the weight of the cylinder is

r2 T 2
m=
4

50
In this particular case

r2 T 2 980[g/(cm2 s2 )]302 [cm2 ]22 [s2 ]


m= = = 280.75[kg]
4 4

Kreyszig, 2.4.14
Carlos Oscar Sorzano, Aug. 31st, 2014

Shock absorber. What is the smallest value of the damping constant of a


shock absorber in the suspension of a wheel of a car (consisting of a spring and
an absorber) that will provide (theoretically) an oscillation free ride if the mass
of the car is 2000 [Kg] and the spring constant equals 4500 [Kg/s2 ]?
Solution: The equation dening motion is

my 00 = ky cy 0

whose characteristic polynomial is

m2 = k c

m2 + c + k = 0

c c2 4km
=
2m
Critical damping is attained if
p
c2 4km = 0 c = 2 km = 4500[Kg/s2 ]2000[Kg] = 3000[Kg/s]

If c 3000[Kg/s], there are no oscillations in the car.


Kreyszig, 2.4.18
Carlos Oscar Sorzano, Aug. 31st, 2014

Logarithmic decrement. Show that the ratio of two consecutive maxi-


mum amplitudes of a damped oscillation

y(t) = Ceat cos(0 t )

is constant, and the natural logarithm of this ratio called the logarithmic decre-
ment, equals
2a
= .
0
Find for the solutions of y 00 + 2y 0 + 5 = 0. .
Solution: Let us calculate the maxima of the oscillation curve

dy
dt =0 = C (aeat cos(0 t ) eat 0 sin(0 t ))

which implies that

a cos(0 t ) + 0 sin(0 t ) = 0
a
tan(0 t ) =
0

51
 
a
0 t = atan + k
0
   
1 a
t= atan + k
0 0
Let t1 denote the time of a maximum and t2 the time of the next maximum
   
1 a
t1 = 0 atan + k1
  0  
1 a 2
t2 = 0 atan 0 + (k1 + 2) = t1 + 0

Let us evaluate the oscillation curve at these two time points

y(t1 ) = Ceat1 cos 


(0 t1 )    
= Ceat1 cos 0 10 atan a0 + k1
   
= Ceat1 cos atan a0 + k1
y(t2 ) = Ceat2 cos ( t )
0 2 
2 
a t1 + 2
= Ce 0 cos 0 (t1 + 0
)
2
 
a t1 +
= Ce 0 cos (0 t1 + 2)
2
 
a t1 +
= Ce 0 cos (0 t1 )

Let us calculate now the ratio

y(t1 ) Ceat1 cos(0 t1 )


2a

y(t2 ) = 2
! = e 0
a t1 +
0
Ce cos(0 t1 )

The logarithm of this quantity is the logarithmic decrement

y(t1 ) 2a
= log =
y(t2 ) 0

The characteristic polynomial of the ODE

y 00 + 2y 0 + 5 = 0

is
2 + 2 + 5 = 0 = 1 2i = a i0
Consequently,
2(1)
= =
2
So, from one maximum to the next, there is a factor

e = 0.043

52
1

0.8

0.6

0.4
y

0.2

0.2

0.4
0 2 4 6 8 10
x

Kreyszig, 2.5.11
lvaro Martn Ramos, Dec. 27th, 2014

Solve the ODE


(x2 D2 3xD + 10I)y = 0
Solution: We may rewrite the ODE as

x2 y 00 3xy 0 + 10y = 0

Which is an equation of the form

x2 y 00 + axy 0 + by = 0

The ODE is an Euler-Cauchy equation, so we try with a solution of the form

y = xm

whose derivatives are


y0 = mxm1
y 00 = m(m 1)xm2
Substituting into the ODE we get

x2 (m(m 1)xm2 ) 3x(mxm1 ) + 10xm = 0

m(m 1) 3m + 10 = 0

m2 4m + 10 = 0 m1 , ,2 = 2 i 6
   
y = x2 (c1 cos 6 log(x) + c2 sin 6 log(x)

Kreyszig, 2.6.5
Carlos Oscar Sorzano, Aug. 31st, 2014

53
Show that the functions x2 and x3 are linearly independent calculating their
ratio and their Wronskian.
Solution: The functions
y1 = x2
y2 = x3
are linearly independent because their ratio

y1 x2 1
= 3 =
y2 x x
is not constant. This independence is conrmed because their Wronskian

y1 y2 x2 x3
0 = = 3x4 2x4 = x4 6= 0
y1 y20 2x 3x2

is not 0 for all x 6= 0.


Kreyszig, 2.6.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the ODE whose basis of solutions are the functions x2 and x2 log(x).
Show the linear independence of the two functions and solve the initial value
problem that satises y(1) = 4 and y 0 (1) = 6.
Solution: This basis is the basis of solutions of the Euler-Cauchy ODE with a
double root at m = 2. So the Euler-Cauchy auxiliary equation

m2 + (a 1)m + b = 0

must be equal to
(m 2)2 = 0 = m2 4m + 4
So a = 3 and b = 4. The corresponding ODE is

x2 y 00 3xy 0 + 4y = 0

To show that the two functions are independent, we calculate their Wron-
skian 2
x x2 log(x) 3 1
log(x) = x3


2x =x
2x log(x) + x 2 2 log(x) + 1
The solution of the Initial Value Problem must be of the form

yp = c1 x2 + c2 x2 log(x)

yp (1) = 4 = c1
yp0 = 2c1 x + 2c2 x log(x) + c2 x
yp0 (1) = 6 = 2c1 + c2 = 8 + c2 c2 = 2
So the solution sought is

yp = x2 (4 2 log(x))

Kreyszig, 2.7.6

54
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the real general solution of

x
y 00 + y 0 + ( 2 + 14 )y = e 2 sin(x)

Solution: The solution of the homogeneous problem is given by the character-


istic polynomial


2 2 1 1 1 4 2 1 1
++ + 4 =0= = i
2 2
The real general solution of the homogeneous problem is

x x
yh = Ae 2 cos(x) + Be 2 sin(x)
x
Since the excitation signal e 2 sin(x) corresponds to one of the basis, we try
a particular function of the form

x x
yp = K1 xe 2 cos(x) + K2 xe 2 sin(x)
x
1 2
yp0 = 2e x [cos(x)(2K2 x K1 (x 2)) sin(x)(2K1 x + K2 (x 2))]
1 2
yp00
 
= 4e sin(x) 4K1 (x 2) + K2 (4 2 x + 
x 4) +
cos(x) K1 (4 2 x + x 4) 4K2 (x 2)

We now substitute in the original equation

x
y 00 + y 0 + ( 2 + 41 )y = 2e 2 (K2 cos(x) K1 sin(x))
x
= e 2 sin(x)

From where
K2 = 0
1
2K1 = 1 K1 =
2
So the particular solution is of the form

1 x
yp = xe 2 cos(x)
2
And the general solution

x  x 
y = yp + yh = e 2 A cos(x) + B sin(x)
2

Kreyszig, 2.7.13
Carlos Oscar Sorzano, Jan. 15th, 2015

Find the real general solution of

8y 00 6y 0 + y = 6 cosh(x) y(0) = 0.2, y 0 (0) = 0.05

55
Solution: The solution of the homogeneous problem is given by the character-
istic polynomial

  
1 1 1 1
82 6 + 1 = 0 = 8 = ,
4 2 4 2

The real general solution of the homogeneous problem is

x x
yh = c1 e 2 + c2 e 4

The excitation function 6 cosh(x) does not belong to the space function of the
homogeneous equation. We try a solution of the form

yp = A cosh(x) + B sinh(x)
yp0 = A sinh(x) + B cosh(x)
yp00 = A cosh(x) + B sinh(x)

Substituting into the dierential equation

8(A cosh(x)+B sinh(x))6(A sinh(x)+B cosh(x))+A cosh(x)+B sinh(x) = 6 sinh(x)



9A 6B = 0 4 6
(9A6B) cosh(x)+(9B6A) sinh(x) = 6 sinh(x) A = ,B =
9B 6A = 6 5 5
The general solution is of the form

x x 4 6
y = c1 e 2 + c2 e 4 + cosh(x) + sinh(x)
5 5
We need now to determine c1 and c2 using the initial values

y(0) = 0.2 = c1 + c2 + 54

17
c1 = 4, c2 =
y 0 (0) = 0.05 = 12 c1 + 41 c2 + 6
5 5

Finally, the solution of the IVP is

x 17 x 4 6
y = 4e 2 + e 4 + cosh(x) + sinh(x)
5 5 5

Kreyszig, 2.8.13
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the transient motion of the mass-spring system modeled by the ODE

(D2 + I)y = cos(t) 6= 1

Solution: The characteristic equation associated to this ODE is

2 + 1 = 0 = i

So, the homogeneous response is of the form

yh = A cos(t) + B sin(t)

56
Note that the external excitation does not have the same frequency as the
internal natural frequency. For that reason, for the particular response to the
external excitation we look a solution of the form

yp = K1 cos(t) + K2 sin(t)
yp0 = K1 sin(t) + K2 cos(t)
yp00 = K1 2 cos(t) K2 2 sin(t)
The ODE becomes

1
K1 (1 2 ) cos(t) + K2 (1 2 ) sin(t) = cos(t) K1 = , K2 = 0
1 2
So the general solution is

1
y = yh + yp = A cos(t) + B sin(t) + cos(t)
1 2
The graph below shows this function for = 1.5, A = B = 1

0
y

3
0 5 10 15 20 25 30
x

Kreyszig, 2.8.24
Carlos Oscar Sorzano, Jan. 15th, 2015

Gun barrel. Solve


y 00 + y = F (t)
t2

1 0t
where F (t) = 2 and y(0) = 0, y 0 (0) = 0. This models an
0 otherwise
undamped system on which a force F acts during some interval of time (see
gure below), for instance, the force on a gun barrel when a shell is red, the
barrel being braked by heavy springs (and then damped by a dashpot, which
we disregard for simplicity). Hint: At both y and y0 must be continuous.

57
Solution: The general solution of the homogeneous equation is given by the
roots of the characteristic equation

2 + 1 = 0 = i

yh = c1 cos(t) + c2 sin(t)
In the interval 0t we look for a particular solution of the form

yp = A + Bt + Ct2
yp0 = B + 2Ct
yp00 = 2C

Substituting into the ODE

t2
2C + (A + Bt + Ct2 ) = 1
2
1
(2C + A) + Bt + Ct2 = 1 2 t2


2C + A = 1
2 1
B=0 A = 1 + 2 , B = 0, C = 2
1
C = 2

The general solution in this interval is of the form

2 t2
y = c1 cos(t) + c2 sin(t) + 1 + 2
2

To determine c1 and c2 we impose the initial conditions

2 2

y(0) = 0 = c1 + 1 + 2 c1 = 1 + 2
y 0 (0) = 0 = c2

Finally, the solution in this interval is

t2
 
2
y= 1 + 2 (1 cos(t)) 2

Note that at t= we have

2
y() = 1 + 22 (1 cos()) 2 = 1 + 4

2
0 2
y () = 1 + 2 sin() 2 = 2
2

In the interval t>0 there is no external force, so the solution is given only by
the homogeneous solution. At t= the solution, and its derivative, must be
continuous, so we have the solution

y = c1 cos(t) + c2 sin(t)

with the initial values

y() = 1 + 42 = c1 cos() + c2 sin() c1 = 1 + 4



2
y 0 () = 2 = c1 sin() + c2 cos() c2 = 2

58
That is the solution in this interval is
 
4 2
y = 1 + 2 cos(t) + sin(t)

Note that this solution is oscillatory and never vanishes because we have disre-
garded damping.
Finally we can write the solution to the initial problem as

 2
1 + 22 (1 cos(t)) t 2

0t
y(t) =
1 + 42 cos(t) + 2 sin(t) otherwise


Kreyszig, 2.9.1
Carlos Oscar Sorzano, Aug. 31st, 2014

Model the RC circuit of the gure below. Find the current due to a constant
E

Solution: To model the circuit we sum the drops of voltage along the RC loop

1
E(t) iR Q=0
C
Zt
1
E(t) iR i( )d = 0
C

Dierentiating
1
E 0 i0 R
i=0
C
1 1
i0 + i = E0
RC R
0
If is constant, E = E0 , then E = 0 and the solution is given by the homogeneous
equation whose characteristic equation is

1 1
+ =0=
RC RC
t
i(t) = Ae RC
If at t=0 we have i(0), then
i(0) = A

59
Finally,
t
i(t) = i(0)e RC

Kreyszig, 2.10.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
e3x
(D2 + 6D + 9I)y = 16
x2 + 1
by variation of parameters.
Solution: Let us nd rst the solution to the homogeneous problem. We need
the roots of the characteristic equation

2 + 6 + 9 = 0 = 3, 3

So the homogeneous solution is

yh = c1 y1 + c2 y2 = c1 e3x + c2 xe3x

The Wronskian of the y1 and y2 functions is

e3x xe3x

3x 2 1 x = e6x

W = = e
3e3x 3xe3x + e3x

3 3x + 1

So the particular solution to the non-homogeneous problem is given by

y2 r y1 r
R R
yp = y1 W dx + y23x W dx
3x e
R xe 16 x2 +1 R e3x 16 ex3x
e3x R e6x dx + xe3x
2 +1
= R 1 e6x dx
3x x 3x
= 16e 2
x +1 dx + 16xe 2
x +1 dx
= 8e3x log(x2 + 1) + 16xe3x atan(x2 + 1)

The general solution is

y = yh + yp = (c1 8 log(x2 + 1))e3x + (c2 + 16atan(x2 + 1))xe3x

3 Chapter 3

Kreyszig, 3.1.1
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that the functions 1, x, x2 , x3 are solutions of

y iv = 0

and form a basis on any interval.


Solution: Let us calculate the fourth derivative of all these functions

60
yi 1 x x2 x3
yi0 0 1 2x 3x2
yi00 0 0 2 6x
yi000 0 0 0 6
yiiv 0 0 0 0

So, the proposed functions are solutions of the ODE. To see if they are linearly
independent, we calculate their Wronskian


1 x x2 x3

0 1 2x 3x2
W = = 12
0 0 2 6x

0 0 0 6

Since they are 4 independent solutions of a 4th order ODE, they are a basis of
solutions.
Kreyszig, 3.1.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that the functions 1, ex cos(2x), ex sin(2x) are solutions of

y 000 + 2y 00 + 5y 0 = 0

and form a basis on any interval.


Solution: Let us write the ODE as

(D3 + 2D2 + 5D)y = 0

D(D2 + 2D + 5)y = 0
D((D + 1)2 + 22 )y = 0
The function y1 = 1 is a solution of the rst factor

Dy = 0

while the functions y2 = ex cos(2x) and y3 = ex sin(2x) are solutions of the


second
((D + 1)2 + 22 )y = 0
So, the proposed functions are solutions of the ODE. To see if they are
linearly independent, we calculate their Wronskian

ex cos(2x) ex sin(2x)

1
x x = 2e2x

W = 0 e (cos(x) + sin(x)) e (cos(x) sin(x))
2ex sin(x) 2ex cos(x)

0

Kreyszig, 3.1.10
Carlos Oscar Sorzano, Jan. 15th, 2015

Are the functions e2x , xe2x and x2 e2x linearly dependent or independent in
the interval x 0?

61
Solution: Let us call f1 (x) = e2x , f2 (x) = xe2x and f3 (x) = x2 e2x . For
checking the linear dependence or not of the three functions we calculate the
Wronskian of the three functions

f1 (x) f2 (x) f3 (x) e2x

xe2x x2 e2x
df1 (x) df2 (x) df3 (x) 2x
W (x) = = 2e
(1 + 2x)e2x 2(1 + x)xe2x
d2 fdx dx dx

2 2 2x
1 (x) d f2 (x) d f3 (x) 4e 4(1 + x)e2x 2(2x2 + 4x + 1)e2x
dx2 dx2 dx2


1
x x2

6x = 2e6x
= e 2 1 + 2x 2(1 + x)x
4 4(1 + x) 2(2x2 + 4x + 1)

Since W (x) > 0 for x 0, then the three functions f1 , f2 and f3 are linearly
independent in this interval. Kreyszig, 3.2.5
lvaro Martn Ramos, Jan. 4th, 2015

Solve
(D4 + 10D2 + 9I)y = 0
Solution: The characteristic polynomial of the ODE is

4 + 102 + 9 = 0 = (2 )2 + (102 ) + 9

= i3, i
So the general solution is

y = A cos(x) + B sin(x) + C cos(3x) + D sin(3x)

Kreyszig, 3.2.6
Carlos Oscar Sorzano, Nov. 14th, 2014

Solve the dierential equation

(D5 + 8D3 + 16D)y = 0

Solution: Let us factorize the dierential operator

(D5 + 8D3 + 16D) = D(D4 + 8D2 + 16) = D(D2 + 4)2

The characteristic equation is

(2 + 4)2 = 0

( 2i)2 ( + 2i)2 = 0
The general solution of the dierential equation is

y = c1 + (c2 + c3 x) cos(2x) + (c4 + c5 x) sin(2x)

Kreyszig, 3.2.7
Carlos Oscar Sorzano, Nov. 14th, 2014

62
Solve the IVP

y 000 + 3.2y 00 + 4.81y 0 = 0 y(0) = 3.4, y 0 (0) = 4.6, y 00 (0) = 9.91

Solution: The characteristic equation is

3 + 3.22 + 4.81 = 0

(2 + 3.2 + 4.81) = 0
= 0, 1.6 1.5i
The general solution of the dierential equation is

y = c1 + e1.6x (c2 cos(1.5x) + c3 sin(1.5x))

Let us calculate the rst and second derivatives of the solution we have

y 0 = e1.6x ((1.5c2 1.6c3 ) sin(1.5x) + (1.5c3 1.6c2 ) cos(1.5x))

y 00 = e1.6x ((4.8c2 + 0.31c3 ) sin(1.5x) + (0.31c2 4.8c3 ) cos(1.5x))


Particularizing at x=0

y(0) = 3.4 = c1 + c2
y 0 (0) = 4.6 = 1.5c3 1.6c2 c1 = 2.4, c2 = 1, c3 = 2
y 00 (0) = 9.91 = 0.31c2 4.8c3

So the particular solution is

y = 2.4 + e1.6x (cos(1.5x) 2 sin(1.5x))

3.6

3.4

3.2

2.8
y

2.6

2.4

2.2

1.8
0 1 2 3 4 5 6 7
x

Kreyszig, 3.2.14
Carlos Oscar Sorzano, Aug. 31st, 2014

Reduction of order. If a solution of a linear, constant-coecient ODE is


known, y1 , we can reduce its order by assuming that

y = uy1

63
1. Extend the method to a variable-coecient ODE

y 000 + p2 (x)y 00 + p1 (x)y 0 + p0 (x)y = 0

Assuming a solution y1 to be known, show that another solution is

y2 = uy1

with Z
u= z(x)dx

and z obtained by solving

y1 z 00 + (3y10 + p2 y1 )z 0 + (3y100 + 2p2 y10 + p1 y1 )z = 0

2. Reduce
x3 y 000 3x2 y 00 + (6 x2 )xy 0 (6 x2 )y = 0
using y1 = x (perhaps obtainable by inspection).

Solution:
1. Let us assume that
y = uy1
then
y0 = u0 y1 + uy10
y 00 = u00 y1 + u0 y10 + u0 y10 + uy100
= u00 y1 + 2u0 y10 + uy100
y 000 = u000 y1 + u00 y10 + 2u00 y10 + 2u0 y100 + u0 y100 + uy1000
= u000 y1 + 3u00 y10 + 3u0 y100 + uy1000
Substituting in the ODE

y 000 + p2 y 00 + p1 y 0 + p0 y = 0

(u000 y1 + 3u00 y10 + 3u0 y100 + uy1000 )+p2 (u00 y1 + 2u0 y10 + uy100 )+p1 (u0 y1 +uy10 )+p0 uy1 = 0
(uy1000 ) + p2 (uy100 ) + p1 (u0 y1 + uy10 ) + p0 uy1 = 0
y1 u000 +(3y10 +p2 y1 )u00 +(3y100 +2p2 y10 +p1 y1 )u0 +(y1000 +p2 y100 +p1 y10 +p0 y1 )u = 0
Since y1 is a solution of the ODE, we have

y1000 + p2 y100 + p1 y10 + p0 y1 = 0

Dening
z = u0
we can write the ODE as

y1 z 00 + (3y10 + p2 y1 )z 0 + (3y100 + 2p2 y10 + p1 y1 )z = 0

as required by the problem.

64
2. Let us divide by x3
   
3 00 6 6 1
y 000 y + 1 y 0
y=0
x x2 x3 x

We can now apply the formula derived in this exercise, in particular


         
00 3 0 3 6
(x)z + 3(1) + x z + 3(0) + 2 (1) + 1 x z =0
x x x2

xz 00 xz = 0
z 00 z = 0
whose characteristic polynomial is

2 1 = 0 = 1

So the solution is
z = c1 ex + c2 ex
Z Z
u= zdx = (c1 ex + c2 ex )dx = c1 ex + c2 ex

and the solution sought

y = uy1 = (c1 ex + c2 ex )x = c1 xex + c2 xex

Finally, the general solution is

y = c1 xex + c2 xex + c3 x

Kreyszig, 3.3.5
lvaro Martn Ramos, Jan. 4th, 2015

Solve
(x3 D3 + x2 D2 2xD + 2I)y = x2
Solution: We can rewrite the ODE as

x3 y 000 + x2 y 00 2xy 0 + 2y = x2

The homogeneous ODE is an Euler-Cauchy equation, so we try a solution of


the form
y = xm
y0 = mxm1
y 00 = m(m 1)xm2
y 000 = m(m 2)(m 1)xm3
Substituting in the equation

x3 m(m 2)(m 1)xm3 + x2 m(m 1)xm2 2xmxm1 + 2xm = 0

(m(m 2)(m 1) + m(m 1) 2m + 2)xm = 0


m3 2m2 m + 2 = 0 = (m 2)(m 1)(m + 1)

65
So m = 2, 1, 1 are the roots of the characteristic polynomial. The general
solution of the homogeneous problem is

yh = c1 x + c2 x1 + c3 x2

For nding a particular solution of the non-homogeneous problem we use the


method of variation parameters whose solution is

3 Z
X Wk
yp = yk rdx
W
k=1

Where yk are the 3 homogeneous solutions and W and Wk are the following
matrices
x x1 x2

W = 1 x2 2x = 2x2 8
x
3
0 2x1 2
0 x x2
W1 = 0 x2 2x = 3
3
1 2x 2 2
x 0 x
W2 = 1 0 2x = x2 2x2
0 1 12
x x 0
W3 = 1 x2 0 = 2
x
0 2x3 1
We write the ODE in the standard form

1 00 2 2
x3 y 000 + x2 y 00 2xy 0 + 2y = x2 y 000 + y 2 y 0 + 3 y = x5
x x x
We now calculate the integrals

3x3 tanh1 ( x2 ) + 6x2 + 8


Z Z
W1 3x 5
rdx = x dx =
W 2x2 8 64x3

x tanh1 ( x2 2)
Z 2
x 2x2 5
Z
W2
rdx = x dx =
W 2x2 8 16x
2 1
Z Z
W3 1 1 log(x)
rdx = 2
x5 dx = 2
log(x2 4) +
W 2x 8 16 32x 128 64
Finally, the particular solution is

3x3 tanh1 ( x 2
2 )+6x +8 x tanh1 ( x
2 2) log(x)
yp = x 64x3 + x1 16x + x2 ( 1
16
1
32x2 1
128 log(x2 4) + 64 )
1
= 12x 2

Finally, the general solution is of the form

1
y = c1 x + c2 x1 + c3 x2
12x2

Kreyszig, 3.3.6

66
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve (D3 + 4D)y = sin(x).


Solution: The homogeneous problem has a characteristic polynomial

3 + 4 = 0 = (2 + 4) = 0, 2i

So the homogeneous solution is given by

yh = c1 + c2 cos(2x) + c3 sin(2x)

To nd a particular solution for non-homogeneous problem we try a function of


the form
yp = K1 cos(x) + K2 sin(x)
yp0 = K1 sin(x) + K2 cos(x)
yp00 = K1 cos(x) K2 sin(x)
yp000 = K1 sin(x) K2 cos(x)
Substituting in the ODE

(K1 sin(x) K2 cos(x)) + 4(K1 sin(x) + K2 cos(x)) = sin(x)

3K1 sin(x) + 3K2 cos(x) = sin(x)


1
K1 = , K2 = 0
3
Finally, the general solution is

1
y = c1 + c2 cos(2x) + c3 sin(2x) sin(x)
3

Kreyszig, 3.3.7
lvaro Martn Ramos, Jan. 4th, 2015

Solve
(D3 9D2 + 27D 27I)y = 27 sin(3x)
Solution: The homogeneous problem has a characteristic equation

3 92 + 27 27 = 0 = ( 3)3 = 0 = 3(3 times)

So the homogeneous solution is given by

yh = (c1 + c2 x + c3 x2 )e3x

To nd a particular solution for non-homogeneous problem we try a function of


the form
yp = K cos(3x) + M sin(3x)
yp0 = 3K sin(3x) + 3M cos(3x)
yp00 = 9K cos(3x) 9M sin(3x)
yp000 = 27K sin(3x) 27M cos(3x)

67
Substituting in the ODE

(27K sin(3x) 27M cos(3x)) 9(9K cos(3x) 9M sin(3x)) + 27(3K sin(3x)

+3M cos(3x)) 27(K cos(3x) + M sin(3x)) = 27 sin(3x)


27K sin(3x) 27M cos(3x) + 81K cos(3x) + 81M sin(3x) 81K sin(3x)
+81M cos(3x) 27K cos(3x) 27M sin(3x) = 27 sin(3x)
Dividing the equation by 27

K sin(3x) M cos(3x) + 3K cos(3x) + 3M sin(3x) 3K sin(3x) + 3M cos(3x)

K cos(3x) M sin(3x) = sin(3x)


(2K + 4M ) sin(3x) + (2M + 2K) cos(3x) = sin(3x)
2K + 4M = 1
2M + 2K = 0
1 1
M = ,K =
4 4
Finally, the general solution is

1
y = (c1 + c2 x + c3 x2 )e3x (cos(3x) sin(3x))
4

Kreyszig, 3.3.8
Carlos Oscar Sorzano, June 15th 2015

Solve the IVP


y iv 5y 00 + 4y = 10e3x
with y(0) = 1, y 0 (0) = y 00 (0) = y 000 (0) = 0.
Solution: The solution of the homogeneous equation comes from the solution
of the characteristic equation

4 52 + 4 = 0 2 = 4, 1

(2 4)(2 1) = 0 = 2, 1
So the homogeneous solution is of the form

yh = K1 e2x + K2 ex + K3 ex + K4 e2x

For the particular solution we look for a function of the form

yp = Ke3x
yp0 = 3Ke3x
yp00 = 32 Ke3x
yp000 = 33 Ke3x
ypiv = 34 Ke3x

Substituting in the dierential equation

34 Ke3x 5(32 Ke3x ) + 4Ke3x = 10e3x

68
1
(34 5 32 + 4)K = 10 K =
4
The general solution of the non-homogeneous equation is

1
y = yh + yp = K1 e2x + K2 ex + K3 ex + K4 e2x + e3x
4
To solve the IVP we calculate the derivatives of the general solution

y0 = 2K1 e2x K2 ex + K3 ex + 2K4 e2x 43 e3x


2
y 00 = 22 K1 e2x + K2 ex + K3 ex + 22 K4 e2x + 34 e3x
3
y 000 = 23 K1 e2x K2 ex + K3 ex + 23 K4 e2x 34 e3x

and impose the initial value conditions

y(0) = 1 = K1 + K2 + K3 + K4 + 41
y 0 (0) = 0 = 2K1 K2 + K3 + 2K4 43
2
y 00 (0) = 0 = 22 K1 + K2 + K3 + 22 K4 + 34
3
y 000 (0) = 0 = 23 K1 K2 + K3 + 23 K4 34

The solution of this equation system is

3 1
K1 = 1, K2 = , K3 = , K4 = 0
2 4
Finally, the solution of the IVP is

3 1 1
y = e2x + ex + ex + e3x
2 4 4

Kreyszig, 3.3.10
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve

x3 y 000 + xy 0 y = x2 y(1) = 1, y 0 (1) = 3, y 00 (1) = 14

Solution: The homogeneous ODE is an Euler-Cauchy equation, so we try with


a solution of the form

y = xm
y0 = mxm1
y 00 = m(m 1)xm2
y 000 = m(m 1)(m 2)xm3

Substituting in the equation

x3 (m(m 1)(m 2)xm3 ) + x(mxm1 ) xm = 0

m(m 1)(m 2) + m 1 = 0
(m 1)(m(m 2) + 1) = 0
(m 1)(m 1)2 = 0

69
So m=1 is a triple root of the characteristic polynomial. The general solution
of the homogeneous problem is

yh = c1 x + c2 x log(x) + c3 x log2 (x)

For nding a particular solution of the non-homogeneous problem we use


the method of variation of parameters whose solution is

3 Z
X Wk
yp = yk rdx
W
k=1

where yk are the 3 homogeneous solutions and W and Wk are the following
matrices

x log2 (x)


x x log(x)

2
W =
1 1 + log(x) 2 log(x) + log (x) = 2
1 2 2
0 x x + x log(x)

2

0 x log(x) x log (x)
0 1 + log(x) 2 log(x) + log2 (x) = x log2 (x)

W1 =

1 2 2
1 x x + x log(x)

2


x 0 x log (x)

W2 =
1 0 2 log(x) + log2 (x) = 2x log(x)
2 2

0 1 x + x log(x)



x x log(x) 0
W3 =
1 1 + log(x) 0 = x
1
0 x 1

We write the ODE in the standard form

1 0 1 1
x3 y 000 + xy 0 y = x2 y 000 + y 3y =
x2 x x
1
We now calculate the integrals (with r= x)
R W1
R x log2 (x) 1 x(log2 (x)2 log(x)+2)
W rdx = 2 x dx = 2
R W2
R 2x log(x) 1
W rdx = R 2 x dx = x(log(x) 1)
W3 x1 x
R
W rdx = 2 x dx = 2

Finally, the particular solution is

= y1 W rdx + y2 W
R 1 R 2 R W3
yp W W rdx + y3 W rdx
2
= x x(log (x)2
2
log(x)+2)
+ x log(x) (x(log(x) 1)) + x log2 (x) x2
2
= x

The general solution is of the form

y = c1 x + c2 x log(x) + c3 x log2 (x) + x2

Imposing the initial conditions

y(x) = c1 x + c2 x log(x) + c3 x log2 (x) + x2 y(1) = 1 = c1 + 1 c1 = 0


y 0 (x) = c1 + c2 (1 + log(x)) + c3 (2 log(x) + log2 (x)) + 2x y 0 (1) = 3 = c2
y 00 (x) = c2 x1 + c3 x2 + x2 log(x) + 2 y 0 (1) = 14 = c2 + 2c3 c3 = 11 2

70
So the particular solution sought is

11
y = 3x log(x) + x log2 (x) + x2
2

Problema
Carlos Oscar Sorzano, June 15th, 2015

Let S be the fraction of a population susceptible of getting a diphtheria


and I the fraction of that population infected by diphtheria. An ill person can
disseminate the disease while he is not recovered. Assume that the number
of contacts between susceptible and infected people occurs at a rate . The
daily fraction of susceptible population that is vaccinated is . Assume that
diphtheria is a disease that can be passed only once. Assume that diphtheria
has a daily death rate 1 and a daily recovery rate 2 . Assume also that the
population size is stable with daily birth and death rates . Propose a disease
dissemination model.
Solution: Let us call N S(t) the instant proportion of non-susceptible people.
The sum of proportions must be 1

S(t) + I(t) + N S(t) = 1

Additionally the proportions follow the equation system

S 0 (t) = S(t)I(t) + S(t) S(t)


I 0 (t) = S(t)I(t) 1 I(t) 2 I(t) I(t)
N S 0 (t) = S(t) + 2 I(t) N S(t)

The term S(t)I(t) accounts for the proportion of susceptible people that gets
infected every day. The term in S 0 (t) accounts for the daily birth rate. The
terms S(t), I(t), N S(t) account for the daily rate of deaths non-related
to diphteria. The term S(t) is the proportion of people that becomes non-
susceptible by vaccination. The term 1 I(t) accounts for the daily rate of deaths
caused by diphtheria, and nally 2 I(t) accounts for the daily rate of people that
recovers from diphtheria and becomes non-susceptible.
We may eliminate one of the variables. For instance, we solve for S in the
rst equation
S(t) = 1 I(t) N S(t)
and substitute in the equation system

I 0 (t) = (1 I(t) N S(t))I(t) 1 I(t) 2 I(t) I(t)


N S 0 (t) = (1 I(t) N S(t)) + 2 I(t) N S(t)

Grouping terms

I 0 (t) = ((1 I(t) N S(t)) 1 2 )I(t)


N S 0 (t) = ( + )N S(t) + (2 )I(t)

71
4 Chapter 4

Kreyszig, 4.1.1
Carlos Oscar Sorzano, Aug. 31st, 2014

Find out, without calculation, whether doubling the ow rate in the following
example has the same eect as halng the tank sizes.

Solution: Original case:

       
y2 lb gal y1 lb gal
y10 = inow-outow = 2 2
100 gal min 100 gal min
       
y1 lb gal y2 lb gal
y20 = inow-outow = 2 2
100 gal min 100 gal min
0
  0   
y1 = 0.02y1 + 0.02y2 y1 0.02 0.02 y1
= y0 = Ay
y20 = 0.02y1 0.02y2 y20 0.02 0.02 y2
Doubling the ow rate:

       
y2 lb gal y1 lb gal
y10 = inow-outow = 4 4
100 gal min 100 gal min
       
y1 lb gal y2 lb gal
y20 = inow-outow = 4 4
100 gal min 100 gal min
y10 = 0.04y1 + 0.04y2 y10
      
0.04 0.04 y1
= y 0 = A1 y
y20 = 0.04y1 0.04y2 y20 0.04 0.04 y2
Halng the tank sizes:

       
y2 lb gal y1 lb gal
y10= inow-outow = 2 2
50 gal min 50 gal min
       
0 y1 lb gal y2 lb gal
y2 = inow-outow = 2 2
50 gal min 50 gal min
y10 = 0.04y1 + 0.04y2 y10
      
0.04 0.04 y1
0 = y 0 = A2 y
y2 = 0.04y1 0.04y2 y20 0.04 0.04 y2
Since A1 = A2 , the eect on the amount of salt in both tanks is the same if we
double the ow rate or halve the tank size. Kreyszig, 4.1.11
lvaro Martn Ramos, Jan. 4th, 2015

72
Solve
4y 00 15y 0 4y = 0
Solution: To convert the ODE into an ODE system we do the following changes
of variables
y = y1
y10 = y2
So that the original ODE can be written as

15
4y20 15y2 4y1 = 0 y20 = y2 + y1
4
Together the system ODE is
 0   
y1 0 1 y1
=
y20 1 15
4 y2

That is of the form


y0 = Ay
The eigenvalues and eigenvectors of A are:

1 = 4, v1 = (1, 4)T
T
2 = 41 , v2 = 1, 14
The general solution of the ODe system is

   
1 4x 1 x
y = c1 v1 e1 x + c2 v2 e2 x = c1 e + c2 e 4
4 41

Kreyszig, 4.1.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
y 000 + 2y 00 y 0 2y = 0
by solving it directly and by reducing it to an ODE system.
Solution: The characteristic equation of the ODE is

3 + 22 + 2 = 0 = 2, 1, 1

So that the general solution is

y = c1 e2x + c2 ex + c3 ex

To convert the ODE into an ODE system we do the following changes of variables

y1 = y
y2 = y10 = y 0
y3 = y20 = y 00

So that the original ODE can be written as

y30 + 2y3 y2 2y1 = 0

73
y30 = 2y3 + y2 + 2y1
Altogether the ODE system is
0
y1 0 1 0 y1
y20 = 0 0 1 y2
y30 2 1 2 y3

y0 = Ay
The eigenvalues and eigenvectors of A are

1 = 2 v1 = (1, 2, 4)T
2 = 1 v2 = (1, 1, 1)T
3 = 1 v3 = (1, 1, 1)T

The general solution of the ODE system is

y = c1 v1 e1
x
+ c2 v2 e2 x+ c3
v3 e3 x
1 1 1
= c1 2 e2x + c2 1 ex + c3 1 ex
4 2x 1 1
+ c2 ex + c3 ex

c1 e
= 2c1 e2x c2 ex + c3 ex
4c1 e2x + c2 ex + c3 ex

Finally, remind that y = y1 , so we are mostly interested in its rst component


that is
y = c1 e2x + c2 ex + c3 ex
That is, the same result as we obtained by the direct method.
Kreyszig, 4.3.1
Carlos Oscar Sorzano, Nov. 14th, 2014

Give the general solution of the equation system

y10 = y1 + y2
y20 = 3y1 y2

Solution: Let us write the equation system as


 0   
y1 1 1 y1
=
y20 3 1 y2

The characteristic polynomial of the system matrix is



1 1
= (1 )(1 ) 3 = ( 2)( + 2) = 0
3 1

The eigenvector of 1 = 2 comes from the equation system

(A 2I)x = 0
   
1 1 0 1 1 0

3 3 0 0 0 0

74
whose eigenvector is x1 = (1, 1).
The eigenvector of 2 = 2 comes from

(A + 2I)x = 0
   
3 1 0 3 1 0

3 1 0 0 0 0
whose eigenvector is x2 = (1, 3).
Finally, the solution of the dierential equation system is

c1 e2t c2 e2t
     
1 2t 1 2t
y = c1 x1 e1 t + c2 x2 e2 t = c1 e + c2 e =
1 3 c1 e2t + 3c2 e2t

Kreyszig, 4.3.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Find a general solution of the ODE system

y10 = 2y1 2y2


y20 = 2y1 + 2y2

Solution: We can write the ODE system as


 0   
y1 2 2 y1
=
y20 2 2 y2

y0 = Ay
The eigenvalues and eigenvectors of A are

1 = 2 + 2i v1 = (i, 1)T
2 = 2 2i v2 = (i, 1)T

The general solution of the ODE system is

1 x
y = c1 v1 e + c2 v2 e2 x 
i (2+2i)x i (22i)x
= c1 e + c2 e
1 1

If we want the solution to be real, we must perform a change of basis. Instead


of the basis functions
 
i (2+2i)x
y1 = e
1
 
i (22i)x
y2 = e = y1
1

we dene the functions

ie(2+2i)x
   2x 
y1 +y2 e sin(2x)
y1 = = Re{y1 } = Re =
2
 2x e
(2+2i)x
 e2x cos(2x)
y1 y2 e cos(2x)
y2 = = Im{y1 } =
2i e2x sin(2x)

75
The general solution can be written as

e2x sin(2x)
   2x   
e cos(2x) 2x c1 sin(2x) + c2 cos(2x)
y = c1 y1 +c2 y2 = c1 +c2 2x = e
e2x cos(2x) e sin(2x) c1 cos(2x) + c2 sin(2x)

Kreyszig, 4.3.7
Carlos Oscar Sorzano, Aug. 31st, 2014

Find a general solution of the ODE system

y10 = y2
y20 = y1 + y3
y30 = y2

Solution: We can write the ODE system as


0
y1 0 1 0  
y
y20 = 1 0 1 1
y2
y30 0 1 0

y0 = Ay
The eigenvalues and eigenvectors of A are

1 =
0 1)T
v1 = (1, 0,
T
2 = 2i v2 = (i,
2, i)T
3 = 2i v2 = (i, 2, i)

The general solution of the ODE system is

1 x
y = c1 v1 e v2 e
+ c2 2x
+ c3 v3 e3
x

1 i
i
= c1 0 + c2 2 ei 2x + c3 2 ei 2x
1 i i

If we want the solution to be real, we must perform a change of basis. Instead


of the basis functions

i

y2 = 2 ei 2x
i
i
y3 = 2 ei 2x = y2
i

we dene the functions



i sin( 2x)
y2 +y3
y2 = 2 = Re{y2 } = Re 2 ei 2x = 2 cos( 2x)
i sin( 2x)


cos( 2x)
y2 y3
y3 = 2i = Im{y2 } = 2 sin(
2x)

cos( 2x)

76
The general solution can be written as

y = c1 y1 + c2 y2 + c3 y3

1 sin( 2x) cos( 2x)

= c1 0 + c2 2 cos( 2x) + c3 2 sin( 2x)

1 sin( 2x) cos( 2x)

2x)
c1+ c2 sin( c3 cos( 2x)
= c2 2 cos( 2x) + c3 2 sin( 2x)

c1 c2 sin( 2x) + c3 cos( 2x)

Kreyszig, 4.3.18
Carlos Oscar Sorzano, Aug. 31st, 2014

Each of the two tanks contains 200 gal of water, in which initially 100 lb
(Tank T1 ) and 200 lb (Tank T2 ) of fertilizer are dissolved. The inow, circula-
tion, and outow are shown in the gure below. The mixture is kept uniform
by stirring. Find the fertilizer contents y1 (t) in T1 and y2 (t) in T2 .

Solution: We can model the system with the following dierential equations:

y1 y2
y10 = 200 16 + 200 4 + 0 12
y1 y2
y20 = 200 16 200 (4 + 12)

Equivalently
 0   16 4
 
y1 200 200 y1
=
y20 16
200
16
200 y2
The eigenvalues and eigenvectors of this matrix are

3
1 = 25 , v1 = ( 12 , 1)T
1
2 = 25 , v2 = ( 12 , 1)T

The general solution of the ODE system is

12
  1
3 1
y = c1 v1 e1 t + c2 v2 e2 t = c1 e 25 t + c2 2 e 25 t
1 1

As stated in the problem at t = 0 we have


   1 1
100 2
y(0) = = c1 + c2 2 c1 = 0, c2 = 200
200 1 1

So the solution sought is


1
t
y = 200 2 e 25
1

77
Kreyszig, 4.4.1
lvaro Martn Ramos, Jan. 4th, 2015

Determine the type and stability of the critical point of

y10 = y1

y20 = 2y2
Then nd a real general solution.
Solution: The proposed ODE system is equivalent to
 0   
y1 1 0 y1
=
y20 0 2 y2

The eigenvalues of the matrix are given by


 
1 0
det = 2 3 + 2 = 0
0 2

p = 3, (> 0)
q = 2(> 0)
= p2 4q = 1(> 0)
So it is an unstable improper node. The general solution is

y1 = c1 et , y2 = c2 e2t

Kreyszig, 4.4.3
Carlos Oscar Sorzano, Aug. 31st, 2014

Determine the type and stability of the critical point of

y10 = y2
y20 = 9y1

Then nd a real general solution and sketch or graph some of the trajectories
in the phase plane.
Solution: The proposed ODE system is equivalent to
 0   
y1 0 1 y1
=
y20 9 0 y2

Critical points are points at which y 0 = 0, in this case the only critical point is

y=0

whose eigenvalues and eigenvectors are

1 = 3i, v1 = ( 31 i, 1)
2 = 3i, v2 = ( 13 i, 1)

This corresponds to a center as can be clearly seen in the gure below

78
2

1.5

2 0.5

0
y

0.5

1.5

2 1.5 1 0.5 0 0.5 1 1.5 2


y1

To nd a real solution we construct the functions


 1 
1 x 3 i i3x
y1 = v1 e = e
 1 1
i
y2 = v2 e2 x = 3 ei3x
1
1
 
y1 +y2 sin(3x)
y1 = 2 = Re{y1 } = 3
 cos(3x)
31 cos(3x)

y1 y2
y2 = 2i = Im{y1 } =
sin(3x)

The general real solution is given by

c1 13 sin(3x) c2 31 cos(3x)
 
y = c1 y1 + c2 y2 =
c1 cos(3x) + c2 sin(3x)

Kreyszig, 4.4.7
lvaro Martn Ramos, Jan. 4th, 2015

Determine the type and stability of the critical point of

y10 = y1 + 2y2

y20 = 2y1 + y2
Then nd a real general solution.
Solution: The proposed ODE system is equivalent to
 0   
y1 1 2 y1
=
y20 2 1 y2

The characteristic equation of the matrix is

2 2 3 = 0

p = 2, (> 0)
q = 3(< 0)

79
So it is a saddle point, always unstable. The eigenvalues and eigenvectors of the
system matrix are
1 = 3, v1 = (1, 1)T
2 = 1, v2 = (1, 1)T
The general solution is given by

   
1 3x 1
y = c1 v1 e1 x + c2 v2 e2 x = c1 e + c2 ex
1 1

Kreyszig, 4.4.14
Carlos Oscar Sorzano, Aug. 31st, 2014

Transformation of parameters. What happens to the critical point of

y10 = y1
y20 = 2y2
if you introduce = t as the new independent variable? trajectories in the
phase plane.
Solution:  0   
y1 1 0 y1
=
y20 0 2 y2
Its critical point is y = 0 and the eigenvalues of the matrix used to calculate the
derivative are 1 and 2, that is, it is an unstable node (because p = 1 + 2 > 0.
If we do the change of variable = t, then

dyi dyi dt dyi


= =
d dt d dt
So the equation system becomes
 dy1    
d 1 0 y1
dy2 =
d
0 2 y2

That is the direction of motion changes, and the two eigenvalues become nega-
tive. Then we have p = 1 + 2 < 0 and q = 1 2 > 0, consequently a stable
node.
Kreyszig, 4.4.17
Carlos Oscar Sorzano, Aug. 31st, 2014

Perturbation. The system


 
0 0 1
y = y
4 0

has a center as its critical point. Replace each aij by aij + b. Find values of
b such that you get (a) a saddle point, (b) a stable and attractive node, (c) a
stable and attractive spiral, (d) an unstable spiral, (e) an unstable node.
Solution: The perturbed system is
 
0 b 1+b
y = y
4 + b b

80
The characteristic polynomial is

|A I| = (b )2 (1 + b)(4 + b) = 2 2b + 4 + 3b

This polynomial is of the form

2 p + q

so
p = 2b
q = 4 + 3b
Saddle point: to get a saddle point we need

4
q < 0 4 + 3b < 0 b <
3
Stable and attractive node: to get a stable and attractive node we need

p < 0, q = 0 (stable and attractive) and q > 0, = p2 4q 0 (node)

4
2b < 0, 4 + 3b = 0 =b
3
(2b)2 4(4 + 3b) 0 b2 3b 4 0 b (, 1] [4, )
The intersection of both sets gives b = 34 .
Stable and attractive spiral: to get a stable and attractive spiral we need

p < 0, q = 0 (stable and attractive) and = p2 4q < 0, p 6= 0 (spiral)

4
2b < 0, 4 + 3b = 0, 2b 6= 0 =b
3
(2b)2 4(4 + 3b) < 0 b2 3b 4 < 0 1 < b < 4
Since { 34 } (1, 4) = , there is no b satisfying all conditions.
Unstable spiral: to get an unstable spiral we need

p>0 or q<0 (unstable) and = p2 4q < 0, p 6= 0 (spiral)

2b > 0 or 4 + 3b < 0 b (0, ) (, 34 ) = (, 34 ) (0, )


(2b)2 4(4 + 3b) < 0 b2 3b 4 < 0 1 < b < 4
Finally,
(, 34 ) (0, ) (1, 4) = (0, 4)


Unstable node: to get an unstable node we need

p>0 or q<0 (unstable) and q > 0, = p2 4q 0 (node)

2b > 0 or 4 + 3b < 0 b (0, ) (, 34 ) = (, 34 ) (0, )


4 + 3b > 0, p2 4q 0 b ( 43 , ) ((, 1] [4, )) = ( 34 , 1] [4, )
Finally
(, 34 ) (0, ) ( 34 , 1] [4, ) = [4, )
 

81
Kreyszig, 4.5.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the location and all critical points by linearization of the ODE

y10 = y2
y20 = y1 + 21 y12
Solution: The ODE system can be rewritten as
 
0 y2
y =
y1 + 21 y12
Critical points are solutions of the equation system
 
y2
= 0 y1 = 0, 2; y2 = 0
y1 + 12 y12

Case (y1 , y2 ) = (0, 0):


If we linearize around the point (0, 0) we get
!
f1 f1    
y1 y2 0 1 0 1
A= f2 f2 = =
y1 y2
1 + y1 0 y=0 1 0
y=0

And the equation system behaves in the vicinity of (0, 0) as

y0 = Ay

The charactertistic polynomial of A is



1
= 2 + 1 = 0

|A I| =
1

So, p = 0, q = 1 and = p2 4q = 4. Consequently, (0, 0) is a stable


(p 0, q > 0) center (p = 0, < 0).
Case (y1 , y2 ) = (2, 0):
Let us make the change of variables
   
y1 y1 2
=
y2 y2
Then    
y2 y2
y0 = =
(y1 + 2) + 12 (y1 + 2)2 y1 + 21 y12
We now linearize around the point (y1 , y2 ) = (0, 0)
f1 f1
!    
y1 y2 0 1 0 1
A = f2 f2
= =
1 + y1 0 y=0 1 0

y1 y2 y=0

Now, the characteristic polynomial is



1
|A I| = = 2 1 = 0
1

82
So, p = 0, q = 1 and = p2 4q = 4. Consequently, (2, 0) is an unstable
(q < 0) saddle point (q < 0).
Kreyszig, 4.5.9
Carlos Oscar Sorzano, Jan. 15th, 2015

Find the location and type of all critical points by rst converting the ODE
to a system and then linearizing it.

y 00 9y + y 3 = 0

Solution: Let us dene


y1 = y
y2 = y10
Then we may rewrite the ODE as

y20 9y1 + y13 = 0

or the ODE system

y10 = y2
y20 = 9y1 y13 = y1 (3 y1 )(3 + y1 )

There are three critical points at y = y1 = 0, 3, 3, y2 = 0. Let us linearize


the ODE at the three points. For doing so, let us rewrite the ODE system as a
vector dierential equation:
y0 = F(y)
Case y = 0:
!
F1 F1    
0 1 0 1

0 y1 y2
y = y= y= y

F2 F2
9 3y12 0 y 9 0

y1 y2
y1 =0,y2 =0 1 =0,y2 =0

 
0 1
The eigenvalues of A = are 1 = 3 and 2 = 3. Since the two
9 0
eigenvalues are real and of opposite sign, the critical point is a saddle point.
Case y = 3:
   
0 0 1 0 1
y = y= y
9 3y12 0 y =3,y =0 18 0
1 2

whose eigenvalues are 1 = 18i and 2 = 18i. Since the two eigenvalues
are pure imaginary, the critical point is a center.
Case y = 3:
   
0 1 0 1
y0 = y= y
9 3y12 0 y 18 0
1 =3,y2 =0

Again, the critical point is a center.


Kreyszig, 4.5.11
Carlos Oscar Sorzano, June 15th, 2015

83
Find the location and type of all critical points by rst converting the ODE
to a system and then linearizing it.

y 00 + cos(y) = 0

Solution: Let us dene


y1 = y
y2 = y10
Then we may rewrite the ODE as

y20 + cos(y1 ) = 0

or the ODE system


y10 = y2
y20 = cos(y1 )

There are three critical points at
2 + n , y2 = 0. Let us linearize the
y = y1 =
ODE at the two dierent kind of points. For doing so, let us rewrite the ODE
system as a vector dierential equation:

y0 = F(y)

Case y= 2:
!
F1 F1    
0 1 0 1

0 y1 y2
y = y= y= y

F2 F2
sin(y1 ) 0 y 1 0


y1 y2
y1 = 1 = 2 ,y2 =0
2 ,y2 =0
 
0 1
The eigenvalues of A= are 1 = 1, 2 = 1. Since the eigenvalues are
1 0
real and of opposite sign the critical point is a saddle point.
3
Case y= 2 :
!
F1 F1    
0 1 0 1

0 y1 y2
y = y= y= y

F2 F2
sin(y1 ) 0 y 1 0

3
y1 y2
y1 = 3 1 = 2 ,y2 =0
2 ,y2 =0
 
0 1
The eigenvalues of A= are 1 = i, 2 = i. The eigenvalues are pure
1 0
imaginary and, consequently, the critical point is a center.
Kreyszig, 4.6.3
lvaro Martn Ramos, Jan. 4th, 2015

Find a general solution of

y10 = y2 + e3t

y20 = y1 3e3t
Solution: Let us write the ODE system as

 0     
y1 0 1 y1 1
= + e3t
y20 1 0 y2 3

84
The eigenvalues and eigenvectors of the system matrix are

1 = 1, v1 = (1, 1)T

2 = 1, v2 = (1, 1)T
So the general solution of the homogeneous problem is

et
     t  
1 t 1 t e c1
y h = c1 e + c2 e = =Yc
1 1 et et c2

For the particular solution we now that

yp = Y u

Where
u0 = Y 1 g
So
et
et
 
1 1
Y =
2 etet
1 et e t
e3t
    2t 
0 e
u = =
2 et et 3e3t 2e4t
!
e2t
Z  2t 
e 2
u= dt = e4t
2e4t
2
2t
!  
e
et
 t 
e 2 0
yp = Y u = = 3t
et et e4t e
2

Finally,
     
1 t 1 t 0
y = yh + yp = c1 e + c2 e + 3t
1 1 e

Kreyszig, 4.6.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Find a general solution of

y10 = 4y1 + y2 + 0.6t


y20 = 2y1 + 3y2 2.5t

Solution: Let us write the ODE system as

   
4 1 0.6t
y0 = y+
2 3 2.5t

The eigenvalues and eigenvectors of the system matrix are

1 = 5, v1 = (1, 1)T
2 = 2, v2 = (1, 2)T

85
So the general solution of the homogeneous problem is
   
1 5t 1 2t
yh = c1 e + c2 e
1 2

For the particular solution, we try a solution of the type

y = k0 + k1 t

Substituting into the ODE we get


   
4 1 0.6
k1 = (k0 + k1 t) + t
2 3 2.5

From where      
4 1 0.6 0.43
k1 + = 0 k1 =
2 3 2.5 1.12
and    
4 1 0.241
k1 = k0 k0 =
2 3 0.534
So, the general solution is

       
1 5t 1 2t 0.241 0.43
y = c1 e + c2 e + + t
1 2 0.534 1.12

5 Chapter 5

Kreyszig, 5.1.7
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE


y 0 = 2xy
using the power series method.
Solution: Let us expand the solution of the ODE as


X
y= am xm = a0 + a1 x + a2 x2 + a3 x3 + ...
m=0

Then

X
y0 = am mxm1 = a1 + 2a2 x + 3a3 x2 + ...
m=1

Let us write the ODE as


y 0 + 2xy = 0
and substitute the two series


! !
X X
m1 m
am mx + 2x am x =0
m=1 m=0

86

! !
X X
m1 m+1
a1 + 2a2 x + am mx + 2a0 x + 2am x =0
m=3 m=1

Let us do the change of variable m0 = m 2 in the rst sum


! !
X 0 X
a1 + 2a2 x + am0 +2 (m0 + 2)xm +1 + 2a0 x + 2am xm+1 =0
m0 =1 m=1


X 0 X
a1 + 2(a0 + a2 )x + am0 +2 (m0 + 2)xm +1 + 2am xm+1 = 0
m0 =1 m=1

X
a1 + 2(a0 + a2 )x + ((m + 2)am+2 + 2am )xm+1 = 0
m=1

Since the whole series is 0, all its terms must be 0

a1 = 0

a0 + a2 = 0 a2 = a0
Let us analyze now the odd terms

m = 1 3a3 + 2a1 = 0 a3 = 0

m = 3 5a5 + 2a3 = 0 a5 = 0
...
So all odd terms are null. Let us analyze now the even terms

2 1
m = 2 4a4 + 2a2 = 0 a4 = a2 = a0
4 2
2 11
m = 4 6a6 + 2a4 = 0 a6 = a4 = a0
6 32
2 111
m = 6 8a8 + 2a6 = 0 a8 = a6 = a0
8 432
...
And in general, for m even, we have

m 1
am = (1) 2 m a0
2!

The general solution is then

 
21 4 1 6 1 8
y = a0 1 x + x x + x ...
2! 3! 4!

It can be easily checked that this is the Taylor expansion of

2
y = a0 ex

87
Kreyszig, 5.1.11
lvaro Martn Ramos, Jan. 4th, 2015

Solve the ODE


y 00 y 0 x2 y = 0
using the power series method
Solution: Let us expand the solution of the ODE as


X
y= am xm
m=0
Then

y0 am mxm1
P
=
m=1

y 00 am m(m 1)xm2
P
=
m=2
Substituting the series in the ODE


! ! !
X X X
am m(m 1)xm2 am mxm1 + x2 a m xm =0
m=2 m=1 m=0

Let us do the change of variable m0 = m + 1 in the second sum and m0 = m + 4


in the third sum


X X 0 X
am m(m 1)xm2 am0 1 (m0 1)xm 2 + am0 4 xm2 = 0
m=2 m0 =2 m0 =4


X
2a2 + 6a3 x (a1 + 2a2 x) + ((m 1)mam (m 1)am1 + am4 ) xm2 = 0
m=4

The whole series is 0, all terms must be 0

a1
2a2 a1 = 0 a2 =
2
a2 a1
6a3 2a2 = 0 a3 = =
3 3!
When m=4

3a3 a0 a1 a0
12a4 3a3 + a0 = 0 a4 = =
12 4! 12
When m=5

4a4 a1 a4 a1
20a5 4a4 + a1 = 0 a5 = = =
20 5 20
a1 a0 a1 a0 a1 6a1 a0 5a1 a0 a1
= = + = =
5! 60 20 60 5! 5! 60 5! 60 4!
The general solution is then

1 4 1 1 1 1 1
y = a0 (1 x x5 ...) + a1 (x + x2 + x3 + x4 x5 ...)
12 60 2! 3! 4! 5!

88
Kreyszig, 5.1.20
Carlos Oscar Sorzano, Aug. 31st, 2014

In numerics we use partial sums of power series. To get a feel for the accuracy
for various x, experiment with sin(x). Graph partial sums of the Maclaurin
series of an increasing number of terms, describing qualitatively the breakaway
points of these graphs from the graph of sin(x).
Solution: We know that the MacLaurin series of sin(x) is


X (1)m 2m+1 x3 x5
sin(x) = x =x + ...
m=0
(2m + 1)! 3! 5!

We may program this in MATLAB as follows x=[-2*pi:0.001:2*pi]

M=5;
yp=zeros(M+1,length(x));
for m=0:M
yp(m+1,:)=(-1)m/factorial(2*m+1)*x.(2*m+1);
if m>0
yp(m+1,:)=yp(m+1,:)+yp(m,:);
end
end

plot(x,sin(x),'LineWidth',2)
axis([-2*pi 2*pi -2 2])
hold on
plot(x,yp)
legend('sin(x)','m=0','m=1','m=2','m=3','m=4','m=5')

2
sin(x)
m=0
m=1
1.5 m=2
m=3
m=4
m=5
1

0.5

0.5

1.5

2
6 4 2 0 2 4 6

Kreyszig, 5.2.2

89
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that

(n 1)(n + 2) 3 (n 3)(n 1)(n + 2)(n + 4) 5


y2 = x x + x ...
3! 5!
with n=1 becomes
y 2 = P1 = x
and
n(n + 1) 2 (n 2)n(n + 1)(n + 3) 4
y1 = 1 x + x ...
2! 4!
with n=1 becomes

1 1 1
y1 = 1 x2 x4 x6 ... = 1 x log(x)
3 5 2
Solution: Let's start rst with y2 . For a general n, y2 is

(n 1)(n + 2) 3 (n 3)(n 1)(n + 2)(n + 4) 5


y2 = x x + x ...
3! 5!
In particular for n = 1, it becomes

(0)(3) 3 (2)(0)(3)(5) 5
y2 = x x + x ... = x = P1 (x)
3! 5!
as stated by the problem.
y1 is for any n

n(n + 1) 2 (n 2)n(n + 1)(n + 3) 4


y1 = 1 x + x ...
2! 4!
that can be written as

y1 = a0 + a2 x2 + a4 x4 + ...

In general, we have the recursion

(n m)(n + m + 1)
am+2 = am
(m + 2)(m + 1)

which for n=1 becomes

(1 m)(m + 2) (m 1)
am+2 = am = am
(m + 2)(m + 1) (m + 1)

In this way, we note that

a0 = 1
a2 = 11 a0 = 1
a4 = 31 a2 = 13
a6 = 35 a4 = 35 31 = 15
a8 = 57 a6 = 57 51 = 17

90
and, in general,
1
am = a0
m1
Then, we can wwrite y1 as

1 1 1
y1 = 1 x2 x4 x6 x8 ...
3 5 7
1 1+x
We know that the McLaurin series of
2 log 1x in the interval 1 < x < 1 is

1 1+x x3 x5 x7
log =x+ + + + ...
2 1x 3 5 7
If we now calculate
 
x3 x5 x7
1 21 x log 1+x
1x = 1x x+ 3 + 5 + 7 + ...
x4 x6 x8
= 1 x2 3 5 7 ...

which is equal to y1 as stated by the problem.


Kreyszig, 5.2.11
Carlos Oscar Sorzano, Dec. 19th, 2014

Find a solution of

(a2 x2 )y 00 2xy 0 + n(n + 1)y = 0

by reduction to a Legendre equation.


Solution: Let us perform the change of variable

x
u=
a
dy dy du dy 1
= =
dx du dx du a
d2 y d2 y 1
 
d dy 1 du
= =
dx2 du du a dx du2 a2
Substituting into the dierential equation, we get

d2 y 1 dy 1
(a2 a2 u2 ) 2(au) + n(n + 1)y = 0
du2 a2 du a
d2 y dy
(1 u2 ) 2u + n(n + 1)y = 0
du2 du
whose general solution is

y(u) = c1 y1 (u) + c2 y2 (u)

or what is the same x x


y(x) = c1 y1 + c2 y2
a a

Kreyszig, 5.3.2

91
Carlos Oscar Sorzano, Dec. 19th, 2014

Solve
(x + 2)2 y 00 + (x + 2)y 0 y = 0
by the Frobenius method.
Solution: We can make the change of variable z = x + 2. Under this change
the equation can be written as

z 2 y + z y y = 0
1 1
y + y 2 y = 0
z z
We can apply the Frobenius method to this problem because it is of the form

b(z) c(z)
y + y + 2 y = 0
z z
being b(z) = 1 and c(z) = 1 analytical functions at z = 0. We look for a
solution of the form

X
y = zr am z m
m=0
Its derivatives are

dy
= z r1 (m + r)am z m
P
y = dz
m=0

d2 y r2
(m + r)(m + r 1)am z m
P
y = dz 2 =z
m=0

Substituting into the dierential equation:


! ! !
X X X
2 r2 m r1 m r m
z z (m + r)(m + r 1)am z +z z (m + r)am z z am z =0
m=0 m=0 m=0

X
X
X
(m + r)(m + r 1)am z m+r + (m + r)am z m+r am z m+r = 0
m=0 m=0 m=0

X
((m + r)(m + r 1) + (m + r) 1)am z m+r = 0
m=0

X
(m + r + 1)(m + r 1)am z m+r = 0
m=0
The indicial equation comes from the coecient of lowest degree, i.e., m=0
(r + 1)(r 1) = 0
whose solutions are
r1 = 1, r2 = 1
Case r1 = 1
Substituting r=1 in the dierential equation we get


X
(m + 2)mam z m+1 = 0 = 2 1a1 z 2 + 3 2a2 z 3 + 4 3a3 z 4 + ...
m=0

92
which implies a1 = a2 = a3 = ... = 0. So, any function of the form


X
y = z r1 am z m = z(a0 )
m=0

is a solution of the dierential equation. In particular, we may choose any


constant a0 , for instance, a0 = 1, to obtain a basis function

y1 = z

Case r2 = 1
Since the dierence between r2 and r1 is an integer value

r2 r1 = 1 1 = 2

we must look for a solution of the form



= ky1 log(z) + z r2 am z m
P
y2
m=0

= kz log(z) + z 1 am z m
P
m=0

Let us rst calculate



X
y2 = k(log(z) + 1) + z 2 (m 1)am z m
m=0


X
y2 = kz 1 + z 3 (m 1)(m 2)am z m
m=0
We now substitute into the dierential equation


   
2 1 3 m 2 m
P P
z kz +z (m 1)(m 2)am z + z k(log(z) + 1) + z (m 1)am z
m=0 m=0

 
kz log(z) + z 1 am z m = 0
P
m=0

   
m1 m1
P P
kz + (m 1)(m 2)am z + kz log(z) + kz + (m 1)am z
m=0 m=0

 
am z m1 = 0
P
kz log(z) +
m=0

[(m 1)(m 2) + (m 1) 1] am z m1 = 0
P
2kz +
m=0

m(m 2)am z m1 = 0
P
2kz +
m=0

m(m 2)am z m1 = 0
P
(1)a1 + 2kz +
m=3

So, a1 = k = a3 = a4 = a5 = ... = 0. a0 and a2 are free so any solution of the


kind
y2 = z 1 (a0 + a2 z 2 ) = a0 z 1 + a2 z
is a solution of the dierential equation. Actually, we already knew that z was
a solution, so the only novelty brought by this solution is (with a0 = 1).

y2 = z 1

93
Any solution of the dierential equation is of the form

c2 c2
y = c1 y1 + c2 y2 = c1 z + = c1 (x + 2) +
z x+2

Kreyszig, 5.3.4
Carlos Oscar Sorzano, June 15th, 2015

Solve
xy 00 + y = 0
by the Frobenius method.
Solution: Dividing by x we have

1
y 00 + y=0
x
We can apply the Frobenius method to this problem because it is of the form

b(x) 0 c(x)
y 00 + y + 2 y=0
x x
being b(x) = 0 and c(x) = x analytical functions at x = 0. We look for a
solution of the form

X
y = xr am xm
m=0

Its derivatives are


dy
y0 = xr1 (m + r)am xm
P
= dx
m=0

d2 y
y 00 r2
(m + r)(m + r 1)am xm
P
= dx2 =x
m=0

Substituting into the dierential equation:


! !
X X
r2 m r m
x x (m + r)(m + r 1)am x + x am x =0
m=0 m=0


X
X
(m + r)(m + r 1)am xm+r1 + am xm+r = 0
m=0 m=0

If we take out the rst term from the rst summation, we get


X
X
r(r 1)a0 xr1 + (m + r)(m + r 1)am xm+r1 + am xm+r = 0
m=1 m=0

We now make a change of variable to make the rst summation to start at


m=0

X
X
r(r 1)a0 xr1 + (m + r + 1)(m + r)am+1 xm+r + am xm+r = 0
m=0 m=0

94

X
r(r 1)a0 xr1 + ((m + r + 1)(m + r)am+1 + am )xm+r = 0
m=0

The indicial equation comes from the coecient of lowest degree, i.e., the
rst one
r(r 1) = 0
whose solutions are
r1 = 0, r2 = 1
Case r1 = 0
Substituting r=0 in the dierential equation we get


X
((m + 1)mam+1 + am )xm = 0
m=0

Note that this is equal to


X
a0 + ((m + 1)mam+1 + am )xm = 0
m=1

which implies a0 = 0 and (for m 1)


am
(m + 1)mam+1 + am = 0 am+1 =
m(m + 1)
The rst terms are
a1 1
a2 = 12 = 12 a1
a2 1
a3 = 23 = 1223 a1
a3 1
a4 = 34 = 122334 a1
We observe that the follow the general term (for m 1)

(1)m+1
am = a1
m!(m 1)!
So, any function of the form


X X (1)m+1 m
y = x r1 am xm = a1 x
m=0 m=1
m!(m 1)!

is a solution of the dierential equation. In particular, we may choose any


constant a1 , for instance, a1 = 1, to obtain a basis function


X (1)m+1 m 1 2 1 3 1 4
y1 = x =x x + x x + ...
m=1
m!(m 1)! 2!1! 3!2! 4!3!

Case r2 = 1
Since the dierence between r2 and r1 is an integer value, we must look for a
solution of the form


ky1 log(x) + xr2 am xm
P
y2 =
 m=0


P (1)m+1 m
am xm
P
= k m!(m1)! x log(x) + x
m=1 m=0

95
Let us rst calculate the derivatives of y2

!
X (1)m+1 X
y20 = k (1 + m log(x))xm + (m + 1)am xm
m=1
m!(m 1)! m=0


!
X (1)m+1 X
y200 = k m(2 + m log(x))xm1 + (m + 1)mam xm1
m=1
m!(m 1)! m=0

We now substitute into the equation

xy200 + y2 = 0
 
P (1)m+1 m
(m + 1)mam xm +
P
k m!(m1)! m(2 + m log(x))x +
m=1  m=0


(1)m+1 m
am xm = 0
P P
k m!(m1)! x log(x) + x
m=1 m=0
m+1 m+1
(1) m (1) 2 m
+ 1)mam xm +
P P P
m!(m1)! 2kmx + m!(m1)! m k log(x)x + (m
m=1 m=1 m=0

(1)m+1 m
am xm = 0
P P
m!(m1)! k log(x)x + x
m=1 m=0

(1)m+1
P 2 m
m!(m1)! k log(x)(1 + m )x +
m=1

(1)m+1
1)mam xm + m
am xm
P P P
(m + m!(m1)! 2kmx + x =0
m=0 m=1 m=0

From the rst row of previous equation we learn that k = 0, because all terms
in xm log(x) must go (they are equal to 0 in the right-hand side). Then, the
previous equation simplies to


X
X
(m + 1)mam xm + am xm+1 = 0
m=0 m=0


X
X
(m + 1)mam xm + am xm+1 = 0
m=1 m=0

X
X
(m + 2)(m + 1)am+1 xm+1 + am xm+1 = 0
m=0 m=0

X
((m + 2)(m + 1)am+1 + am )xm+1 = 0
m=0

From where
am
am+1 =
(m + 1)(m + 2)
The rst terms are
a0 1
a1 = 12 = 12 a0
a1 1
a2 = 23 = 1223 a0
a2 1
a3 = 34 = 122334 a0
The general term is
(1)m
am = a0
m!(m + 1)!

96
In this way, we see that any function of the form


X (1)m
y2 = a0 xm
m=0
m!(m + 1)!

is solution of the dierential equation. In paticular, for a0 = 1, we get


X (1)m 1 1 2 1 3
y2 = xm = 1 x+ x x + ...
m=0
m!(m + 1)! 1!2! 2!3! 3!4!

General solution: Finally, the general solution of the ODE is


X (1)m+1 m X (1)m
y = K1 y1 + K2 y2 = K1 x + K2 xm
m=1
m!(m 1)! m=0
m!(m + 1)!


By making the change of variable z= x in the original dierential equation

xy 00 + y = 0

The equation is transformed into a Bessel's equation whose general solution is


y = KA xJ1 (2 x) + KB xY1 (2 x)

That is, both solutions (the series expansion and the Bessel's solution) are equiv-
alent (i.e., given K1 and K2 , one can always nd KA and KB that gives the
same function; and viceversa).
Kreyszig, 5.4.3
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
1
xy 00 + y 0 + y = 0
4

by making the change of variable z = x.

Solution: If z= x, then

z0 = 1
2 x
= 21 z 1
dy 0 dy 1 1
y0 = dz z = dz 2z 
0 2
dy dz 2 dy
y 00 = 1
dz dx = 2 z dz+ z 1 ddzy2 1 1
2z
2
1 2 d y 3 dy
= 4 z dz 2 z dz

With these, we can rewrite the ODE as

d2 y
 
1 dy 1 dy 1
z2 z 2 z 3 + z 1 + y=0
4 dz 2 dz 2 dz 4

1 d2 y 1 1 dy 1 1 dy 1
z + z + y=0
4 dz 2 4 dz 2 dz 4
1 d2 y 1 1 dy 1
+ z + y=0
4 dz 2 4 dz 4

97
Multiplying by 4z 2 , we get

d2 y dy
z2 +z + z2y = 0
dz 2 dz
which is Bessel's equation with = 0. Since is an integer, there is no solution
of form
y = c1 J (z) + c2 J (z)
Its general solution needs Bessel's functions of the second kind (that will be seen
in next section). However, for the sake of completeness we already point out
that the general solution is


y = c1 J0 (z) + c2 Y0 (z) = c1 J0 ( x) + c2 Y0 ( x)

Kreyszig, 5.4.5
Carlos Oscar Sorzano, Dec. 19th, 2014

Solve
x2 y 00 + xy 0 + (2 x2 2 )y = 0
by making the change of variables x = z .
Solution: Let us write the dierent elements we need from the change of vari-
ables
dz
dx =
dy
y 0
= dx = dy dz
dz dx = y
d2 y
y 00 d dz
= dx2 = dz (y) dx = (y) = 2 y
Substituting in the dierential equation

z2 2 z
( y) + (y) + (z 2 2 )y = 0
2
z 2 y + z y + (z 2 2 )y = 0
which is a Bessel's equation of parameter . Its general solution is (
/ Z)

y = c1 J (z) + c2 J (z) = c1 J (x) + c2 J (x)

Kreyszig, 5.4.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
x2 y 00 + 14 (x + 34 )y = 0

by making the change of variable y = u x, z = x.

Solution: If z= x, then

z0 = 1

2 x
= 12 z 1

98
On the other side

y = u x = uz
dy dz
y0 du
 1 1
= dz dx = dz z + u 2 z
dy 0 dz
y 00 = dzh dx  
1 d2 u
i
= 1
2 z  dz 2 z + du du
dz + dz + (z 2 ) du
dz z + u 12 z 1
1 2 d2 u du
14 z 3du

= 4z dz 2 z + 2 dz dz z + u
1 1 d2 u 1 2 du 1 2 du 1 3
= 4z dz 2 + 2z dz 4z dz 4 z u
2
1 1 d u 1 2 du 1 3
= 4 z dz 2 + 4 z dz 4z u
So, we can rewrite the ODE as
2
 
4 1 1 d u 1 2 du 1 3
z 4 z + 4z 4z u + 41 (z 2 + 34 )uz = 0
dz 2 dz
2
1 3d u du 1
4 z + 14 z 2
4 zu + 14 z 3 u + 16
3
uz = 0
dz 2 dz
2
1 3d u 1 2 du 1 3 1
4 z dz 2 + 4 z dz + 4 z u 16 uz = 0
1
Multiplying the whole equation by 4z , we get

d2 u du
2
+z z2
+ z 2 u 41 u = 0
dz dz
d2 u du
z2 2 + z + z 2 14 u = 0

dz dz
1
That is Bessel's equation with = . Since is not an integer value, its general
2
solution can be written as

u = c1 J 1 (z) + c2 J 1 (z) = c1 J 1 ( x) + c2 J 1( x)
2 2 2 2

Finally, we undo the change of variable


 
y = uz = c1 J 1 ( x) + c2 J 1 ( x) x
2 2

Kreyszig, 5.4.10
Carlos Oscar Sorzano, Jan. 13th, 2015

Solve
x2 y 00 + (1 2)xy 0 + 2 (x2 + 1 2 )y = 0
by making the change of variables z = x .
Solution: Let us perform the change of variables in two steps. We rst make
the change of variable
1
z = x x = z
1
dz
dx = x1 = z
dy 1
y0
= dx = dy dz
 = y(z  )
dz dx

d2 y 1
y 00 = dxh2 = d
dz y(z ) dz

1
idx 1
1 1
= yz + y z (z )
22 2
= y 2 z + y( 1)z

99
Substituting into the ODE we get

2 22 2 1 1
z (y 2 z + y( 1)z ) + (1 2)z (yz ) + 2 (z 2 + 1 2 )y = 0

(y 2 z 2 + y( 1)z) + (1 2)(yz) + 2 (z 2 + 1 2 )y = 0
y 2 z 2 + y 2 z + 2 (z 2 + 1 2 )y = 0
z 2 y + z y + (z 2 ( 2 1))y = 0
This is Bessel's equation if 2 1 > 0, in that case the general solution is given
2 2
(if
/R ) by

y = c1 J 2 1 (z) + c2 J 2 1 (z) = c1 J 2 1 (x ) + c2 J 2 1 (x )

Kreyszig, 5.5.1
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
x2 y 00 + xy 0 + (x2 16)y = 0
Solution: This is Bessel's equation with = 4. Since is an integer value,
we have to write the general solution making use of Bessel's functions of second
kind:
y = c1 J4 (x) + c2 Y4 (x)

Kreyszig, 5.5.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
xy 00 + 5y 0 + xy = 0
u
by making the change of variable y= x2 .
Solution: If y = ux2
, then

y0 = du
dx x
2
+ u(2x3 )
d2 u 2
y 00 = dx2 x + du dx (2x
3
) + du
dx (2x
3
) + u(6x4 )
2 d2 u 3 du 4
= x dx2 4x dx + 6x u

Substituting in the ODE we get

d2 u
   
du du 2
x x2 2 4x3 + 6x4 u + 5 x + u(2x3 ) + xux2 = 0
dx dx dx

d2 u du du
x1 2
4x2 + 6x3 u + 5x2 10x3 u + x1 u = 0
dx dx dx
d2 u du
x1 2 + x2 + (x1 4x3 )u = 0
dx dx
3
Multiplying the equation by x

d2 u du
x2 +x + (x2 4)u = 0
dx2 dx

100
which is Bessel's equation with = 2. Since is an integer value, the general
solution is given by
u = c1 J2 (x) + c2 Y2 (x)
Undoing the change of variable

y = ux2 = c1 x2 J2 (x) + c2 x2 Y2 (x)

6 Chapter 6

Kreyszig, 6.1.4
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the Laplace transform of cos2 (t).


Solution:
R
L{cos2 (t)} = cos2 (t)est dt
0
R 1+cos(2t) st
= 2 e dt
0
R R
= 1
2 est dt + 21 cos(2t)est dt
h0 i 0 R
1 st
= 1
2 s e + 12 cos(2t)est dt
0 0
R
= 11
2s + 1
2 cos(2t)est dt [Re{s} < 0]
0

Now we make use of the Laplace transform

s
L{cos(t)} =
s2 + 2
to get
1 1 s
L{cos2 (t)} = + [Re{s} < 0]
2s 2 s2 + (2)2

Kreyszig, 6.1.20
Carlos Oscar Sorzano, Aug. 31st, 2014

Non-existence.
2
Show that a function like et does not fulll the condition
2
t
e M ekt
2
Solution:
2 2
et > 0
t
For t>0 we have so that e = et . Let us show that for

any M and k, we can nd t such that

2
et > M ekt = elog(M ) ekt

101
Taking logarithms
t2 > log(M ) + kt
t2 kt log(M ) > 0
Let us nd the point at which the curve crosses 0

p
2 k k 2 + 4 log(M )
t kt log(M ) = 0 t =
2

k+ k2 +4 log(M )
That is for t> 2 we have that

2
et > M ekt

Kreyszig, 6.1.22
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that   r
1
L =
t s
Conclude from this that the conditions for existence are sucient but not nec-
essary for the existence of the Laplace transform.
Solution: n o R R 1
L 1

t
= 1 st

t
e = t 2 est dt
0 0

Let us make the change of variable

d
= st t = , dt =
s s
n o R  1
2
R 1 1
L 1

t
= s e d
s = 2 s 2 e s1 d
0 0

1 R 1 1 1
s 2 2 e d = s 2 1
= s 2
 p
= 2 = s
0
1
So, there exists the Laplace transform of although it is not well dened at
t
t = 0.
Kreyszig, 6.1.26
Carlos Oscar Sorzano, Aug. 31st, 2014

5s+1
Find the inverse Laplace transform of
s2 25
Solution:
n o n o n o
L1 5s+1
s2 25 = 5L1 s
s2 25 + L1 1
s2 25 = 5 cosh(5t) + 1
5 sinh(5t)

where we have made used of the Laplace transforms

n o
s
L 2 2 = cosh(at)
n s a o
a
L s2 a2 = sinh(at)

102
Kreyszig, 6.1.29
lvaro Martn Ramos, Jan. 11th, 2015

Find the inverse Laplace transform of

12 228
6
s4 s
Solution:
12 228 3! 228 1 5!
L1 { 6 } = 2L1 { 4 } L { 6 } = 2t3 1.9t5
s4 s s 5! s
Kreyszig, 6.1.30
lvaro Martn Ramos, Jan. 11th, 2015

Find the inverse Laplace transform of

4s + 32
s2 16
Solution:
4s + 32 s 4
L1 { 2
} = 4L1 { 2 } + 8L1 { 2 } = 4 cosh(4t) + 8 sinh(4t)
s 16 s 16 s 16

Kreyszig, 6.1.33
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the Laplace transform of t2 e3t


Solution: We know that

= s2!3

L t2
L {eat f (t)} = F (s a)

Both together we have that

L t2 e3t 2!

= (s+3)3

Kreyszig, 6.1.39
Carlos Oscar Sorzano, Aug. 31st, 2014

21

Find the inverse Laplace transform of
(s+ 2)4
Solution: We know that

n!
L {tn } = sn+1
at
L {e f (t)} = F (s a)

Then we have the inverse Laplace transform

L1 21 1
 21  3!
s4 = 3! L s4 = 27 t3

and n o
L1 21

(s+ 2)4
= 7 3 2t
2t e

103
Kreyszig, 6.2.3
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the Initial Value Problem

y 00 y 0 6y = 0 y(0) = 11, y 0 (0) = 28

Solution: We know that

L{y} = Y
L{y 0 } = sY y(0)
L{y 00 } = s2 Y sy(0) y 0 (0)

Then, we can write the ODE as

(s2 Y 11s 28) (sY 11) 6Y = 0

(s2 s 6)Y 11s 17 = 0


11s + 17 11s + 17 1 10
Y = 2
= = +
s s6 (s 3)(s + 2) s+2 s3
Its inverse Laplace transform is

y = e2t + 10e3t

which is the particular solution of the IVP satisfying the initial conditions.
Kreyszig, 6.2.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the Initial Value Problem

y 00 2y 0 3y = 0 y(4) = 3, y 0 (4) = 17

Solution: Let us dene

y(t) = y(t + 4) y(t) = y(t 4)

Note that the relationship between the two time variables is

t = t 4

Then
y 0 (t) = y 0 (t)
y 00 (t) = y 00 (t)
Then we can rewrite the IVP as

y 00 2y 0 3y = 0 y(0) = 3, y 0 (0) = 17

We know that
L{y} = Y
L{y 0 } = sY y(0)
L{y 00 } = s2 Y sy(0) y 0 (0)

104
Then, we can write the ODE as

(s2 Y + 3s 17) 2(sY + 3) 3Y = 0

(s2 2s 3)Y + 3s 23 = 0
3s + 23 3s + 23 7 1 13 1
Y = 2
= =
s 2s 3 (s 3)(s + 1) 2s3 2 s+1
Its inverse Laplace transform is

7 3t 13 t
y(t) = e e
2 2
which is the particular solution of the IVP satisfying the initial conditions. If
we undo now the time shift, we get

7 3(t4) 13 (t4)
y(t) = y(t 4) = e e
2 2

Kreyszig, 6.2.15
lvaro Martn Ramos, Jan. 11th, 2015

Solve the Initial Value Problem

y 00 + 3y 0 4y = 6e2t3 y(1.5) = 4, y 0 (1.5) = 5

Solution: We make a change of variable

t = t 1.5 t = t + 1.5

Then
y 0 (t) = y 0 (t)
y 00 (t) = y 00 (t)
Then, we can rewrite the IVP as

y 00 (t) + 3y 0 (t) 4y(t) = 6e2t y(0) = 4, y 0 (0) = 5

Making the Laplace transform of both sides we get

6
(s2 Y 4s 5) + 3(sY 4) 4Y =
s2
6
(s2 + 3s 4)Y 4s 17 =
s2
6
(s + 4)(s 1)Y = + 4s + 17
s2
3 1
Y = +
s1 s2
Its inverse Laplace transform is

y(t) = 3et + e2t

105
which is the particular solution of the IVP satisfying the initial conditions. If
we undo now the time shift,we get

y(t) = y(t 1.5) = 3et1.5 + e2(t1.5)

Kreyszig, 6.2.16
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the Laplace transform of t cos(4t)


Solution: Let us dene f = t cos(at) Let us dierentiate f
f 0 = cos(at) at sin(at)
f 00 = a sin(at) a sin(at) a2 t cos(at) = 2a sin(at) a2 t cos(at)
If we now take the Laplace transform of f 00 we get

a 2a2
L{f 00 } = 2a a2
L{t cos(at)} = a2 F
s2 + a2 s2 + a2
On the other side we know that

L{f 00 } = s2 F sf (0) f 0 (0)


Substituting f (0) = 0, f 0 (0) = 1 we get

L{f 00 } = s2 F 1
Equating both expressions for L{f 00 } we get

2a2
a2 F = s2 F 1
s2 + a2
Solving for F
s2 a2
F =
(s2 + a2 )2
In particular, for a=4 (as in the problem statement, we get

s2 42
L{t cos(4t)} =
(s2 + 42 )2

Kreyszig, 6.2.24
Carlos Oscar Sorzano, Aug. 31st, 2014

20
Find the inverse Laplace transform of
s3 2s2
Solution: We may factorize F as

1 20
F =
s2 s 2
20 1
The inverse Laplace transform of
s2 is 20e2t . The factor
s2 translates into
a double time integral. Let's do it one by one:

Zt
e2t 1
 
1 1 20
L = 20e2 d = 20
s s 2 2
0

106
Zt
e2t 1
   
1 1 20 20 2 20
L = (e 1)d = t +
s2 s 2 2 2 2
0

Kreyszig, 6.3.3
lvaro Martn Ramos, Jan. 11th, 2015

Find the Laplace transform of

t 2(t > 2)

Solution: Let us write the function to transform as

f (t) = (t 2)u(t 2)

e2s
L{(t 2)u(t 2)} = e2s L{t} =
s2

Kreyszig, 6.3.5
Carlos Oscar Sorzano, Aug. 31st, 2014



Find the Laplace transform of et 2 0<t<
Solution: Let us write the function to transform as

f (t) = et u(t) u t
= et u(t) et u t
 
2 2

Let us transform each term separately

1
L{et u(t)} =
s1
n o n o 1
L et u t 2 = L et 2 e 2 u t 2 = e 2 L et 2 u t 2 = e 2 e 2 s
 
s1
Altogether

1 1 1  
L{f } = e 2 e 2 s = 1 e 2 (s1)
s1 s1 s1

Kreyszig, 6.3.8
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the Laplace transform of t2 (1 < t < 2)


Solution: We can rewrite the function to be transformed as

f = t2 (u(t 1) u(t 2)) = t2 u(t 1) t2 u(t 2)

Now, we transform each term separately


 
2 2 1
L{t2 u(t 1)} = es L{(t + 1)2 } = es L{t2 + 2t + 1} = es
+ +
s3 s2 s
 
2 2s 2 2s 2 2s 2 4 4
L{t u(t 2)} = e L{(t + 2) } = e L{t + 4t + 4} = e + 2+
s3 s s

107
The Laplace transform of f is

   
s 2 2 1 2s 2 4 4
L{f } = e 3
+ 2+ e 3
+ 2+
s s s s s s

Kreyszig, 6.3.13
lvaro Martn Ramos, Jan. 11th, 2015

Find the inverse Laplace transform of

6(1 es )
s2 + 9
Solution:

6(1es )
n o n o n o
6es
L1 s2 +9 = L1 6
s2 +9 L1 s2 +9 = 2 sin(3t) 2 sin(3(t ))

Kreyszig, 6.3.17
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the inverse Laplace transform of (1 + e2(s+1) ) (s+1)


s+1
2 +1

Solution: Let us nd rst the inverse Laplace transform of the function

s s s
G(s) = (1 + e2s ) = 2 + 2 e2s
s2 +1 s +1 s +1
The inverse Laplace transform of this function is

g(t) = cos(t)u(t)+cos(t2)u(t2) = cos(t)u(t)+cos(t)u(t2) = cos(t)(u(t)u(t2))

However, we are interested in

F (s) = G(s + 1)

whose inverse Laplace transform is

f (t) = g(t)et = et cos(t)(u(t) u(t 2))

Kreyszig, 6.3.19
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the Initial Value Problem

y 00 + 6y 0 + 8y = (e3t e5t )u(t) y(0) = 0, y 0 (0) = 0

Solution: Let us take the Laplace transform of the whole equation. Since
y(0) = 0 and y 0 (0) = 0, we have

L{y 0 } = sY

L{y 00 } = s2 Y

108
Then the ODE becomes

1 1
s2 Y + 6sY + 8Y =
s+3 s+5
s + 5 (s + 3)
(s2 + 6s + 8)Y =
(s + 3)(s + 5)
2
(s + 4)(s + 2)Y =
(s + 3)(s + 5)
2
Y =
(s + 2)(s + 3)(s + 4)(s + 5)
1 1
3 1 1
Y = + 3
s+2 s+3 s+4 s+5
Its inverse Laplace transform is

 
1 2t 1
y(t) = e e3t + e4t e5t u(t)
3 3

Kreyszig, 6.4.3
Carlos Oscar Sorzano, Jan. 15th, 2015

Sketch the solution of the IVP

y 00 + 4y = (t ) y(0) = 8, y 0 (0) = 0

Solution: Let us take the Laplace transform of the dierential equation

(s2 Y (s) sy(0) y 0 (0)) + 4Y (s) = es

(s2 + 4)Y (s) = 8s + es


8s 1
Y (s) = + 2 es
s2
+4 s +4
8s 1 2
Y (s) = 2 + es
s + 4 2 s2 + 4
Now we take the inverse Laplace transform

1
y(t) = 8 cos(2t) + sin(2(t ))u(t )
2

109
10
8cos(2t)
8 y(t)

10
0 1 2 3 4 5 6 7
t

Kreyszig, 6.4.10
Carlos Oscar Sorzano, June 15th, 2015

Sketch the solution of the IVP


 
y 00 + 5y 0 + 6y = t + u(t ) cos(t) y(0) = 0, y 0 (0) = 0
2
Solution: We rst note that

cos(t) = cos(t )

Then, we can write the dierential equation as

 
y 00 + 5y 0 + 6y = t u(t ) cos(t )
2
Let us take the Laplace transform of the dierential equation

s
s2 Y (s) + 5sY (s) + 6Y (s) = e 2 s + es
s2 + 12
1 s 1
Y (s) = e 2 s + es 2
+ 5s + 6 s2 2 2
s + 1 s + 5s + 6
   
1 1 1 s 1 1 2 1 3 1
Y (s) = e 2 s +es + +
s+2 s+3 10 s2 + 1 10 s2 + 1 5 s + 2 10 s + 3
Now we take the inverse Laplace transform

2(t/2)
e3(t/2) u(t /2)+

y(t) = e 
cos(t)+sin(t) 2 2(t) 3 3(t)
10 5 e + 10 e u(t )

110
0.15
y(t)

0.1

0.05

0.05

0.1

0 5 10 15 20 25
t

Kreyszig, 6.5.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the convolution of eat ? ebt with a 6= b


Solution: Let us dene f (t) = eat and g(t) = ebt . Their convolution can be
calculated thanks to the Laplace transform as

L{f (t) ? g(t)} = F (s)G(s)


1 1
= sa sb
1 1 1 1
=  + ba sb
ab sa 
1 1 1
= ab sa sb

The inverse Laplace transform of this expression is

1
f (t) ? g(t) = (eat ebt )
ab

Kreyszig, 6.5.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the integral equation

Zt
y(t) + y( ) cosh(t )d = t + et
0

Solution: If we take the Laplace transform of this equation we get

s 1 1
Y +Y = 2+
s2 1 s s1

111
 
s 1 1
Y 1+ 2 = +
s 1 s2 s1
1 1
s2 + s1
Y = s
1+ s2 1
s1+s2
s2 (s1)
Y = s2 1+s
s2 1

s+1
Y =
s2
Now, we have the following inverse Laplace transforms

L {s + 1} = et
Rt
L s+1 e d = 1 et

s =
0
Rt
(1 e )d = t + et 1 = t sinh(t) + cosh(t) 1
 s+1
L s2 =
0

Finally,

y = t + et 1

Kreyszig, 6.5.18
Carlos Oscar Sorzano, Aug. 31st, 2014

1
Find the inverse Laplace transform of
(sa)2
Solution: Let us write
1 1
F =
sasa
So its inverse transform is
f (t) = eat ? eat
Let us calculate the convolution

Rt
eat ? eat = ea ea(t ) d
0
Rt
= eat d = teat
0

Finally
 
1 1
L = teat
(s a)2

Kreyszig, 6.6.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the Laplace transform of 3t sinh(4t)


Solution: We know the Laplace transform

4
L{3 sinh(4t)} = 3 = F (s)
s2 42

112
Then, the required Laplace transform can be calculated as

 
0 d 4 8s
L{3t sinh(4t)} = F (s) = 3 2 = 3
ds s 42 (s2 42 )2

Kreyszig, 6.6.3
lvaro Martn Ramos, Jan. 11th, 2015

Find the Laplace transform of

1 3t
te
2
Solution: We know the Laplace transform of

1
L{e3t } =
s+3
Then, the required Laplace transform can be calculated as

 
1 1 1 1 d 1 1
L{ te3t } = L{te3t } = (F 0 (s)) = =
2 2 2 2 ds s+3 2(s + 3)2

Kreyszig, 6.6.20
Carlos Oscar Sorzano, Aug. 31st, 2014

s+a
Find the inverse Laplace transform of log s+b
Solution: Let us dene

s+a
F (s) = log = log(s + a) log(s + b)
s+b
Let us calculate its derivative

1 1
G(s) = F 0 (s) =
s+a s+b
Its inverse Laplace transform is

g(t) = eat ebt

But we know that


g(t) = L1 {F 0 (s)} = tf (t)
From which
g(t) eat ebt
f (t) = =
t t

Kreyszig, 6.7.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the ODE system

y10 + y2 = 0
y1 + y20 = 2 cos(t)

113
with y1 (0) = 1, y2 (0) = 0.
Solution: If we take the Laplace transform of both equations, we get

(sY1 y1 (0)) + Y2 = 0
Y1 + (sY2 y2 (0)) = 2 s2s+1

Taking into account the initial values

sY1 1 + Y2 = 0
Y1 + sY2 = 2 s2s+1

which can be rewritten as


    
s 1 Y1 1
= s
1 s Y2 2 s2 +1
   1  
Y1 s 1 1
=
Y2 1  s 2 s2s+1
 
s 1 1
= s211 s
1 s 2 s2 +1
 s 
= s2 +1
1
s2 +1
Taking the inverse Laplace transform

   
y1 cos(t)
=
y2 sin(t)

Kreyszig, 6.7.3
Carlos Oscar Sorzano, Dec. 19th, 2014

Solve the ODE system


y10 = y1 + 4y2
y20 = 3y1 4y2
with y1 (0) = 3, y2 (0) = 4.
Solution: If we take the Laplace transform of both equations, we get

sY1 y1 (0) = Y1 + 4Y2


sY2 y2 (0) = 3Y1 4Y2
Substituting the initial values

sY1 3 = Y1 + 4Y2
sY2 4 = 3Y1 4Y2
which can be rewritten as
    
s+1 4 Y1 3
=
3 s+4 Y2 4

3 4

4 s+4 3s + 28 3s + 28
Y1 = =
2 + 5s + 16
= 2
s + 1 4 s s + 25 + 39
4
3 s+4

114

s+1 3

3 4 4s + 13 4s + 13
Y2 = =
2
= 2
s + 1 4 s + 5s + 16 s + 25 + 39
4
3 s+4
Their inverse Laplace transforms are
 
y1 (t) = L1 3s+28
2
 (s+ 52 ) + 39
4   
= L1 5 2
3s
+ L1 28
2
(s+ 2 ) + 4  (s+ 52 )+ 39
39
4

39
= 3L1 s
5 2
+ 28 2
L 1 2
2
 (s+ 2) + 4 (s+ 25 ) + 39
39 39
  4
39 56 39
= 3 cos 2 t + 39 sin 2 t

 
y2 (t) = L1 4s+13
2
 (s+ 52 ) + 39
4   
= L1 5 2
4s
+ L 1 13
2
(s+ 2 ) + 4  (s+ 52 )+ 39
39
4

39
1 s 2 1
= 4L 2 + 13 L 2
2
 ( 2) q (s+ 25 ) + 39
s+ 5 + 39 4
39 4
 
39 26 39
= 4 cos 2 t + 3 sin 2 t

7 Chapter 11

Kreyszig, 11.1.14
Carlos Oscar Sorzano, Aug. 31st, 2014

x2 (between < x < ) which is


Find the Fourier series of the function
assumed to be periodic outside with period 2
Solution: Since x2 is an even function in the domain < x < , we only
need to compute the a0 and an terms, since the bn terms will all be 0.

1
R 2
1 x3 2
a0 = 2 x dx = 2 3 = 3

R 2 2 2

an = 1
x cos(nx)dx = 1 (n x 2) sin(nx)+2nx
n3
cos(nx)


4
= n2 cos(n) = (1)n n42

Finally, the Fourier series of x2 between < x < is


2 X 4
x2 = + (1)n 2 cos(nx)
3 n=1
n

Kreyszig, 11.1.15
Carlos Oscar Sorzano, Aug. 31st, 2014

115
Find the Fourier series of the function x2 (between 0 < x < 2 ) which is
assumed to be periodic outside with period 2
Solution: x2 is not an even or odd function in the domain 0 < x < 2 , so we
need to compute all the terms of the Fourier series

2 2
1 1 x3 8 2
x2 dx =
R
a0 = 2 2 3 = 3
0 0
2 2 2
2
1 1 (n x 2) sin(nx)+2nx cos(nx) 4
x2 cos(nx)dx =
R
an = n3 = n2
0 0
2 2 2
2
1 1 (2n x ) cos(nx)+2nx sin(nx)
x2 sin(nx)dx = = 4
R
bn = n3 n
0 0

Finally, the Fourier series of x2 between 0 < x < 2 is


8 2 X 4 X 4
x2 = + 2
cos(nx) sin(nx)
3 n=1
n n=1
n

Kreyszig, 11.2.13
Carlos Oscar Sorzano, Jan. 15th, 2015

Calculate the Fourier series of period p=1 of the function below

Solution: We apply the denition of the dierent coecients, where L= 1


2

1
RL R2 1
1 x2 2 1
a0 = 2L f (x) = xdx = 2 = 8
L 0 0
1

1
RL n
 R2
an = L f (x) cos L xdx = 2 x cos (2nx) dx
L 0
1  
2nx sin(2nx)+cos(2nx) 2 cos(n) 1
= 2 2
4 n 2 = 2 2
4 n 2 2
4 n 2
 0
(1)n 1 0 n = 2
= 2 2 n2 = 21n2 n 6= 2
1

1
RL n
 R2
bn = L f (x) sin L x dx = 2 x sin (2nx) dx
L 0
1  
cos(2nx) 2 n cos(n)
= 2 sin(2nx)2nx 2
4 n 2 = 2 2
4 n 2 0
0
(1)n+1
= 2n

116
The Fourier series is, then


n n
P  P 
y(x) = a0 + an cos L x + bn sin L x
n=1 n=1
n
1 (1) 1
X X (1)n+1
= + 2 2
cos (2nx) + sin (2nx)
8 n=1 2 n n=1
2n

Kreyszig, 11.3.4
Carlos Oscar Sorzano, Aug. 31st, 2014

Let us assume we have mass-spring system responding to the ODE

my 00 + cy 0 + ky = r(t)

Let r(t) be the function

The solution can be expressed as


X
yn = C 0 + Cn cos(nt + n )
n=1

What happens if we replace r(t) with its derivative, the rectangular wave?
What is the ratio of the new Cn to the old ones?
Solution: Let us consider the Fourier series of the input function r(t)

X
r(t) = c0 + cn cos(nt + n )
n=1

Its derivative, assuming the series is convergent, can be calculated as


X
X
0
r (t) = (cn n sin(nt + n )) = cn n cos(nt + n + 2 )
n=1 n=1

Since the parameters m, c and k are constant, then the system is linear. For this
reason, for the input r(t), each harmonic of the input excites the corresponding
harmonic of the output, that is

cn Cn

If now the amplitude of the input is ncn , then amplitude of the output is nCn

ncn nCn

Kreyszig, 11.3.6

117
Carlos Oscar Sorzano, Aug. 31st, 2014

Find a general solution of the ODE

y 00 + 2 y = sin(t) + sin(t)

with 2 6= 2 , 2 .
Solution: The general solution of the homogeneous equation is

yh = c1 cos(t) + c2 sin(t)

For the particular solution, we look for a solution of the form

yp = a sin(t) + b cos(t) + A sin(t) + B cos(t)

yp0 = a cos(t) b sin(t) + A cos(t) B sin(t)


yp00 = a2 sin(t) b2 cos(t) A 2 sin(t) B 2 cos(t)
Substituting into the dierential equation, we get

[a2 sin(t) b2 cos(t) A 2 sin(t) B 2 cos(t)]+


2 [a sin(t) + b cos(t) + A sin(t) + B cos(t)] =
sin(t) + sin(t)

or what is the same

a( 2 2 ) sin(t) + b( 2 2 ) cos(t)+
+A( 2 2 ) sin(t) + B( 2 2 ) cos(t) =
sin(t) + sin(t)

Equating coecients we nd that

b=B=0
1
a=
2 2
1
A= 2
2
The general solution of the equation is

1 1
y = c1 cos(t) + c2 sin(t) + sin(t) + 2 sin(t)
2 2 2

Kreyszig, 11.3.11
Carlos Oscar Sorzano, June 15th, 2015

Find the eigenvalue and eigenfunctions of

0
y0

y
+ ( + 1) = 0 y(1) = 0, y(e ) = 0
x x3

The following strategy is suggested:

118
Do the change of variable x = et .
Find the general solution without considering boundary constraints.

Apply the boundary conditions to nd the eigenvalues and eigenfunctions


of the ODE.

Solution: 1) Change of variable


Let us analyze the change of variable

x = et t = log(x)

dy dy dt 1
y0 = = = y = yet
dx dt dx x
Substituting in the dierential equation:

 
yet
d et y
et + ( + 1) =0
dt e3t
d ye2t t

e + ( + 1)ye3t = 0
dt
ye2t 2ye2t et + ( + 1)ye3t = 0


y 2y + ( + 1)y = 0 y(0) = 0 = y()


2) Find the general solution
The general solution of this equation (without considering the boundary con-
straints) is given by the roots of the polynomial


s2 2s + ( + 1) = 0 s = 1

That is  
y(t) = et C1 e t + C2 e t

3) Find the eigenvalues and eigenfunctions



Case < 0: If < 0, then > 0 and the boundary conditions imply


y(0) = C1 + C2 = 0 C1 = C2 = 0
y() = e (C1 e + C2 e ) = 0

Case = 0: If = 0, then the general solution is

y(t) = et (C1 + C2 t)

The boundary conditions imply


y(0) = C1 = 0
C1 = C2 = 0
y() = e (C1 + C2 ) = 0

Case > 0: Then the general solution becomes


y(t) = et (C1 cos( t) + C2 sin( t)

119
From the boundary conditions we get

y(0) = C1 = 0
C1 = 0
y() = e (C1 ) = 0

Consequently, the eigenfunctions are the functions of the form



y(t) = et sin( t)

and the associated eigenvalue is . Undoing the change of variable we get the
eigenfunctions

y(x) = x sin( log(x))

Kreyszig, 11.5.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Tranformation to SturmLiouville form. Show that

y 00 + f y 0 + (g + h)y = 0

takes the form


(p(x)y 0 )0 + (q(x) + r(x))y = 0
R
if you set p = exp( f dx), q = pg and r = hp. Why would you do such a
transformation?
Solution: Let us substitute the proposed functions into the Sturm-Liouville
form
(py 0 )0 + (pg + hp)y = 0
p0 y 0 + py 00 + (pg + hp)y = 0
Note that Z 
0
p = f exp f dx = f p

Then
f py 0 + py 00 + (pg + hp)y = 0
Note that p is never 0, then dividing by p

f y 0 + y 00 + (g + h)y = 0

y 00 + f y 0 + (g + h)y = 0
that is the original ODE.
Kreyszig, 11.5.9
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the eigenvalues and eigenfunctions of the following Sturm-Liouville


problem:
y 00 + y = 0 y(0) = 0, y 0 (L) = 0
Solution: We can rewrite the ODE as

(y 0 )0 + y = 0

120
with the constraints
1y(0) + 0y 0 (0) = 0
0y(L) + 1y 0 (L) = 0
That is, this is a Sturm-Liouville problem.
If < 0, = 2 , then the general solution is

y = c1 ex + c2 ex

Imposing the two boundary conditions

y(0) = 0 = c1 + c2
y 0 (L) = 0 = c1 eL c2 eL

Its unique solution is c1 = c2 = 0.


If = 0, then the general solution is

y = c1 + c2 x

Imposing the two boundary conditions

y(0) = 0 = c1
y 0 (L) = 0 = c2

If > 0, = 2 , then the general solution is

y = c1 cos(x) + c2 sin(x)

Imposing the two boundary conditions

y(0) = 0 = c1
y 0 (L) = 0 = c1 sin(L) + c2 cos(L) = c2 cos(L) L =
2 + k = +2k
2L

That is the functions


+2k
y = sin(x) = 2L

are the eigenfunctions of the Sturm-Liouville problem and their eigenvalues are
= 2.
Kreyszig, 11.5.11
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the eigenvalues and eigenfunctions of the following Sturm-Liouville


problem:
0
y0

y
+ ( + 1) = 0 y(1) = 0, y(e ) = 0
x x3
(Set x = et ).
Solution: If we make the change of variable x = et t = log(x), then

dy dy dt dy 1 dy t
y0 = dx = dt dx = dt x= dt e   
0 0
dy dy dt dy t 1 d2 y t dy t d2 y 2t dy 2t
y 00 = dx = dt dx = dt
d
dt e x = dt2 e dt e et = dt2 e dt e

121
We note that
 
d2 y 2t dy 2t dy t

y 0
0 00
y xy 0 dt2 e dt e et dt e d2 y 3t dy
= = = e 2 e3t
x x2 e2t dt2 dt

Then we can rewrite the problem as a function of y(t)

d2 y 3t
 
dy
e 2 e3t + ( + 1)ye3t = 0 y(0) = 0, y() = 0
dt2 dt

d2 y dy
2
2 + ( + 1)y = 0 y(0) = 0, y() = 0
dt dt
We now check if the problem is a Sturm-Liouville problems using Kreyszig 11.5.6
with f = 2, g = 1, h = 1. We calculate
R
p=e (2)dt
= e2t

q = pg = e2t
h = hp = e2t
So, in the Sturm-Liouville form the problem becomes
 
d dy
e2t + (e2t + e2t )y = 0
dt dt
We go back to the problem

d2 y dy
2 + ( + 1)y = 0
dt2 dt
and look for solutions of the form y = est

s2 2s + ( + 1) = 0 s = 1

If < 0, = 2 , then the general solution is of the form

y = c1 es1 t + c2 es2 t

with s1 = 1 + and s2 = 1 . Imposing the two boundary conditions

y(0) = 0 = c1 + c2
y() = 0 = c1 es1 + c2 es2

whose unique solution is c1 = c2 = 0.


If = 0, then the general solution is of the form

y = c1 et + c2 tet

Imposing the two boundary conditions

y(0) = 0 = c1
y() = 0 = c1 e + c2 e

whose unique solution is c1 = c2 = 0.

122
If > 0, = 2 , then the general solution is of the form

y = c1 et cos(t) + c2 et sin(t)

Imposing the two boundary conditions

y(0) = 0 = c1
y() = 0 = c2 e sin() = k

So, all the functions of the form

y = et sin(kt) = elog x sin(k log(x)) = x sin(k log(x)) k Z

are eigenfunctions of the Sturm-Liouville problem, and their associated eigen-


value is = k2 .
Kreyszig, 11.6.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the Fourier-Legendre series of the polynomial (x + 1)2


Solution: The Fourier-Legendre series of the function f is a series expansion
of the form

X hf, Pm i
f= Pm (x)
m=0
kPm k2
where
2
kPm k2 =
2m + 1
and the Legendre polynomials are given by

P0 (x) = 1
P1 (x) = x
(n + 1)Pn+1 (x) = (2n + 1)xPn (x) nPn1 (x)

In particular
1 2
P2 (x) = 2 (3x 1)
1 3
P3 (x) = 2 (5x 3x)
To perform the Fourier-Legendre expansion, let us perform the following
calculations


R1 8
(x + 1)2 , P0 (x) = (x + 1)2 dx = 3
1
2
kP0 k2 = 20+1 =2
1
4


(x + 1)2 , P1 (x) (x + 1)2 xdx =
R
= 3
1
2 2
kP1 k2 = 21+1 = 3
R1
(x + 1)2 21 (3x2 1)dx = 4


(x + 1)2 , P2 (x) = 15
1
2 2
kP2 k2 = 22+1 = 5
R1
(x + 1)2 21 (5x3 3x)dx = 0


(x + 1)2 , P3 (x) =
1
2 2
kP3 k2 = 23+1 = 7

123
Actually, since f is a polynomial of degree 2, and Legendre polynomials are
a basis of polynomials in the domain

[1, 1], we have that all coecients for
m3 are 0 ( (x + 1)2 , Pm (x) = 0).
Finally, the Fourier-Legendre expansion is

h(x+1)2 ,P0 (x)i h(x+1)2 ,P1 (x)i h(x+1)2 ,P2 (x)i


(x + 1)2 = kP0 k2 P0 + kP1 k2 P1 + kP2 k2 P2
8 4 4
1 2
= 3
2 + 3
2 x+ 15
2 2 (3x 1)
3 5
4 21
= + 2x + (3x2 1)
3 32

Kreyszig, 11.9.6
Carlos Oscar Sorzano, Dec. 19th, 2014

Find the Fourier transform of f (x) = e|x| ( < x < ) by integration.


Solution: The denition of the Fourier transform is

Z
1
f() = f (x)eix dx
2

Substituting in this formula the value of f, we have

R
f() = 1
2
f (x)eix dx

R
= 1
2
e|x| eix dx

R
= 2
2
ex eix dx
0
R
= 2
2
e(1+i)x dx
0
2 e(1+i)x
=
q2 (1+i) 0

2 1
= 1+i

8 Chapter 12

Kreyszig, 12.1.2
Carlos Oscar Sorzano, Aug. 31st, 2014

Verify that the function


u = x2 + t 2
is a solution of the wave equation

utt = c2 uxx

for a suitable c.

124
Solution: Let us calculate the dierent partial derivatives needed to substitute
in the wave equation
ut = 2t
utt = 2
ux = 2x
uxx = 2
The wave equation states
2 = c2 2
c = 1. In Matlab:
which is true for
[x,t]=meshgrid(-2:0.15:2,0:0.15:2);
u=x.2+t.2;
surfc(x,t,u)
xlabel('x'); ylabel('t'); zlabel('u')

4
u

0
2
1.5 2
1 1
0
0.5 1
t 0 2
x

Kreyszig, 12.1.5
Carlos Oscar Sorzano, Aug. 31st, 2014

Verify that the function

u = sin(at) sin(bx)
is a solution of the wave equation

utt = c2 uxx
for a suitable c.
Solution: Let us calculate the dierent partial derivatives needed to substitute
in the wave equation

ut = a cos(at) sin(bx)
utt = a2 sin(at) sin(bx)
ux = b sin(at) cos(bx)
uxx = b2 sin(at) sin(bx)

125
The wave equation states

a2 sin(at) sin(bx) = c2 (b2 sin(at) sin(bx))


2
c = ab2 . In Matlab:
which is true for
[x,t]=meshgrid(-3*pi:0.1:3*pi,0:0.1:3*pi);
u=sin(t).*sin(x);
surfc(x,t,u)
xlabel('x'); ylabel('t'); zlabel('u')

0.5

0
u

0.5

1
10
10
5 5
0
5
t 0 10
x

Kreyszig, 12.1.19
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve
uy + y 2 u = 0
Solution: Since the PDE is only depending on y, we can treat x as if it were
a parameter, then we can solve the PDE as if it were an ODE on y

uy = y 2 u

du
= y 2
u
y3
log |u| = + C(x)
3
 3
y
u = C(x)exp
3

Kreyszig, 12.4.11

126
Carlos Oscar Sorzano, Aug. 31st, 2014

Find the type, transform to normal form and solve

uxx + 2uxy + uyy = 0

Solution: The prototypical equation for the method of characteristics is of the


form
Auxx + 2Buxy + Cuyy = F (x, y, u, ux , uy )
which corresponds to the equation in the problem with

A=B=C=1

Consequently,
AC B 2 = (1)(1) 12 = 0
that is, the PDE is a parabolic PDE. Its characteristic equation is

A(y 0 )2 2By 0 + C = 0

(y 0 )2 2y 0 + 1 = 0
(y 0 1)2 = 0
whose solution is
y = c1 + x (x, y) = y x = c1
We now do the change of variables

v=x

w =yx
The standard form of a parabolic PDE is

uww = 0

Integrating in w we have
uw = (w)
Integrating again in w
Z
u= (w)dw + (w) = (w) + (w) = (w)

Undoing the change of variable

u = (y x)

being any function.


Kreyszig, 12.4.19
Carlos Oscar Sorzano, Aug. 31st, 2014

Longitudinal Vibrations of an Elastic Bar or Rod. These vibrations


in the direction of the x-axis are modeled by the wave equation

utt = c2 uxx

127
E
with c2 =
(see Tolstov [C9], p. 275). If the rod is fastened at one end, x = 0,
and free at the other, x = L, we have u(0, t) = 0 and ux (L, t) = 0. Show
that the motion corresponding to initial displacement u(x, 0) = f (x) and initial
velocity zero is

X
u= An sin(pn x) cos(pn ct)
n=0
with
ZL
2
An = f (x) sin(pn x)dx
L
0
and
(2n + 1)
pn =
2L
Solution: Let us rst check that the suggested solution satises the boundary
conditions:

u(0, t) = 0

P
u(0, t) = An sin(pn 0) cos(pn ct) = 0
n=0

ux (L, t) = 0

P
ux = An pn cos(pn x) cos(pn ct)
n=0
P
ux (L, t) = An pn cos(pn L) cos(pn ct) = 0
n=0

But
(2n + 1) (2n + 1)
pn L = L=
2L 2
that is
3 5
pn L = , , , ...
2 2 2
and
cos(pn L) = 0 ux (L, t) = 0
Let us check now the initial conditions u(x, 0) = f (x)

P
P
u(x, 0) = An sin(pn x) cos(pn c0) = An sin(pn x)
n=0 n=0

That is u(x, 0) is a Fourier sine series, but An are precisely the corresponding
Fourier coecients, so the series add up to f (x).
Let us check now that u is a solution of the PDE

P
ut = c An pn sin(pn x) sin(pn ct)
n=0

2
An p2n sin(pn x) cos(pn ct)
P
utt = c
n=0

P
ux = An pn cos(pn x) cos(pn ct)
n=0

An p2n sin(pn x) cos(pn ct)
P
uxx =
n=0

128
The PDE states
utt = c2 uxx

!
X X
c2 An p2n sin(pn x) cos(pn ct) = c2 An p2n sin(pn x) cos(pn ct)
n=0 n=0
The equation above is obviously true, so the proposed function is a solution of
the PDE and it saties the boundary conditions.
Kreyszig, 12.6.11
Carlos Oscar Sorzano, Aug. 31st, 2014

Show that for the completely insulated bar, ux (0, t) = 0, ux (L, t) = 0 and
u(x, 0) = f (x) and separation of variables the solution of the heat equation

ut = c2 uxx

gives the solution

 nx  2
e( )
X cn
t
u(x, t) = A0 + An cos L

n=1
L

with
ZL
1
A0 = f (x)dx
L
0

ZL
2  nx 
An = f (x) cos dx
L L
0
Solution: Let us rst check that the suggested solution satises the boundary
conditions:

ux (0, t) = 0
2
e ( )
cn
t
An n nx
P 
ux = L sin L
L

n=1
2
e( )
cn
t
An n n0
P 
ux (0, t) = L sin L
L =0
n=1

ux (L, t) = 0
2
e ( )
cn
t
An n nL
P 
ux (L, t) = L sin L
L =0
n=1

because  
nL
sin = sin(n) = 0
L
Let us check now the initial conditions u(x, 0) = f (x)
2
e ( )
cn
nx 0
P 
u(x, 0) = A0 + An cos L
L

n=1

nx
P 
= A0 + An cos L
n=1

129
That is u(x, 0) is a Fourier cosine series, but An are precisely the corresponding
Fourier coecients, so the series add up to f (x).
Let us check now that u is a solution of the PDE

2
cn 2 ( cn
nx
e L )t
P  
ut = An cos L L
n=1
2
e( )
cn
t
An n nx
P 
ux = L sin L
L

n=1
2
n 2
e ( )
cn
nx t
P  
uxx = An L cos L
L

n=1

The PDE states


ut = c2 uxx

!
 nx   cn 2 2  n 2  nx  2
L ) t
( cn L ) t
( cn
X X
2
An cos e =c An cos e
n=1
L L n=1
L L
The equation above is obviously true, so the proposed function is a solution of
the PDE and it saties the boundary conditions.
Kreyszig, 12.7.3
Carlos Oscar Sorzano, Aug. 31st, 2014

Using
Z
2 2
u(x, t) = (Ap cos(px) + Bp sin(px))ec p t
dp
0

with
Z Z
1 1
Ap = f (v) cos(pv)dv Bp = f (v) sin(pv)dv

solve the 1D heat equation


ut = c2 uxx
when
1
u(x, 0) = f (x) =
1 + x2
Solution: We simply need to substitute f (x) = 1
1+x2 in the formulas for Ap
and Bp
R |p|
Ap = 1

1
1+v 2 cos(pv)dv = 1
(e ) = e|p|

1
R 1
Bp = 1+v 2 sin(pv)dv = 0

So the solution of the 1D heat problem is

Z
2 2
u(x, t) = e|p| cos(px)ec p t
dp
0

130