Anda di halaman 1dari 121

Universidad San Pablo - CEU

Dynamic Systems in Biomedical Engineering

Problems
Author:
Second Year Biomedical
Engineering

Supervisor:
Carlos Oscar S. Sorzano

February 10, 2015

Chapter 1

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

Solve the ODE

y 0 + xe

Solution:
y0 =

x2
2

=0

x2
dy
= xe 2
dx

By separating variables

dy = xe

x2
2

dx

and integrating

xe

dy =
y = e

x2
2

x2
2

dx

+C

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

Solve the ODE

y 0 = 4ex cos(x)

Solution:
y0 =

dy
= 4ex cos(x)
dx

By separating variables

dy = 4ex cos(x)dx
and integrating

Z
dy =

4ex cos(x)dx

Let's integrate by parts:

I1

2I1
I1

=
=
=
=
=
=
=
=

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

Finally

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


Kreyszig, 1.1.6

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
dy =

y=

cosh(5.13x)dx

1
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
y2 =

1 0.2x
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
Since

c1

is an arbitrary constant, we can absorb the

1
2 factor into

general solution is

y = 125e0.2x + c1 x2 + c2 x + c3
Kreyszig, 1.1.10
Carlos Oscar Sorzano, Aug. 31st, 2014

c1 , so that the

1. Verify that

y = ce2.5x

is a solution of the ODE

y 0 + 5xy = 0
2. Determine from
initial condition

y the particular
y(0) = .

solution of the ODE that satises the

3. Graph the solution of the IVP.

Solution:
1. Let us calculate

y0

and substitute it into the ODE


2

y 0 = 5cxe2.5x


2
2
5cxe2.5x + 5x ce2.5x = 0
2

5cxe2.5x + 5cxe2.5x = 0
0=0
So

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

0
x

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

1. Verify that

y 2 4x2 = C

is a solution of the ODE

yy 0 = 4x
2. Determine from
initial condition

y the particular
y(1) = 4.

solution of the ODE that satises the

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
8
6
4

2
0
2
4
6
8
10
3

0
x

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

(y 0 )2 xy 0 + y = 0

is of this kind.

that it has the general solution

singular solution.

The ODE

Show by dierentiation and substitution

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
x y0 = x
4
2

y=

(y 0 )2 xy 0 + y = 0
  

 2
1
1 2
1
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.
correspond to dierent values of

The dierent lines

in the general solution

y = cx c2
The function

y = 41 x2

is the upper envelope of all these functions.

Kreyszig, 1.1.18

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
Note that the units of

are

[time1 ].

t>0

We can also write the general solution

as

A(t) = A(0)e
where the units of

are now

t>0

[time].

A half-life of 3.6 days implies that

A(3.6) =

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

log(2) =
=

3.6

3.6
= 5.1937[days]
log(2)

At this point we can answer the two questions:


1. After 1 day there is:
2. After 1 year there is:

A(1) = A(0)e = 1e 5.1937 = 0.8249[g].


A(365) = A(0)e

365

365

= 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

y=

Solution:

1 2
gt
2

Let us understand the physical meaning of each of the variables

involved:

y(t)
y 0 (t)

is the distance fallen at time

is the speed of the object at time

y 00 (t)

is its acceleration at time

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

y(0) = 0 =

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

Finally, the solution of the falling ODE is

1 2
gt
2

y=
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

Solution:

(0, 0), (0, 1), (0, 2), (0, 3).

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)

2
1

2
x

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

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

y0 = x

1
y

In the eld graph several solution curves by hand, particularly that one passing
through the point

Solution:

(1, 12 ).

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)

2
1.8
1.6
1.4

1.2
1
0.8
0.6
0.4
0.2
2

1.5

0.5

0
x

0.5

1.5

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

An ODE is autonomous if it does not show


explicitly in

f
y 0 = f (x, y)

For instance,

y 0 = sin2 (y)
10

(the independent variable)

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

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)

3
3

0
x

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

Two forces act on a parachutist, the attraction by the earth


mass of person plus equipment,

g = 9.8[m/s2 ]

mg (m

is the

the acceleration of gravity) and

the air resistance, assumed to be proportional to the square of the velocity


Using Newton's second law of motion (mass

11

acceleration

v(t).

resultant of the

forces), set up a model (an ODE for

v(t)).

Graph a direction eld (choosing

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

Solution:

v(t)?

The following equation for the velocity

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
9

6
5

4
3
0

0.5

1
t

1.5

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

Apply Euler's method to the ODE

y0 = y
with

h = 0.1

Solution:
y0
y1
y2
y3
...

and

y(0) = 1.

The method applied to this case would give

=
=
=
=

y(0) = 1
y0 + hf (x0 , y0 ) = 1 + 0.1(y0 ) = 1 + 0.1(1) = 1.1
y1 + hf (x1 , y1 ) = 1.1 + 0.1(y1 ) = 1.1 + 0.1(1.1) = 1.21
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
with

h = 0.2.

The true solution is

y=

Solution:
y0
y1
y2
y3
y4
...

y(0) = 1

1
(1 + x)5

The method applied to this case would give

= y(0) = 1
= y0 + hf (x0 , y0 ) = 1 + 0.2(5x40 y02 ) = 1 + 0.2(5(0)4 (1)2 ) = 1
= y1 + hf (x1 , y1 ) = 1 + 0.2(5x41 y12 ) = 1 + 0.2(5(0.2)4 (1)2 ) = 0.9984
= 0.9729
= 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
RungeKutta 45
True solution

0.9
0.8
0.7

0.6
0.5
0.4
0.3
0.2
0.1
0

0.2

0.4

0.6

0.8

1.2

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

Solve

y 3 + y 0 + x3 = 0

14

1.4

1.6

1.8

Solution:

We can rearrange the equation as

x3
y = 3 =
y
0

 3
x
y

We see that the equation has the form

y0 = f

y
x

so that it can be reduced to a separable form by making the change of variables

u=

y
y = xu y 0 = u0 x + u
x

Substituting in the ODE

1
u0 x + u = 3
u


1
u4 + 1
u0 x = u + 3 =
u
u3
Separating variables

u3
1
du = dx
+1
x

u4
Integrating

Z
1
4
Solving for

u3
du =
4
u +1

1
dx
x

4u3
du = log |x| + C
u4 + 1

u
1
log |u4 + 1| = log |x| + C
4
1

log |u4 + 1| 4 = log |x| + C


C
x
C
u4 + 1 = 4
x
1

|u4 + 1| 4 =

And undoing the change of variable

 y 4
x

+1=

C
x4

y 4 + x4 = C
Kreyszig, 1.3.7
Carlos Oscar Sorzano, Nov. 2nd, 2014

Solve

xy 0 = y + 2x3 sin2

15

y
x

y
x =u
y
The change of variables
x = u implies

by making the change of variables

Solution:

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
C x2
1
u = arctan
C x2
tan(u) =

Undoing the change of variable

y = ux = x arctan

1
C x2

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

Solve

y 0 = (y + 4x)2
by making the change of variables

Solution:

y + 4x = v

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

dv
=
2
v +4
16

Z
dx

1
dv
=x+C
4 ( v2 )2 + 1
Z
1
1
2 dv
=x+C
v 2
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.19
Carlos Oscar Sorzano, Aug. 31st, 2014

If the growth rate of the number of bacteria at any time


to the number present at

is proportional

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)

e7

Ce(t+7) = 2Cet
log(2)
=2=
= 0.0990
7

After 2 weeks we will have

A(t + 14) = Ce(t+14) = Cet e14 = A(t)e

log(2)
14
7

= A(t)e2 log(2) = A(t)(elog(2) )2 = A(t)22 = 4A(t)

Similarly, after 4 weeks, we will have

A(t + 28) = A(t)e

log(2)
28
7

= A(t)e4 log(2) = A(t)(elog(2) )4 = A(t)24 = 16A(t)


17

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
2. If

b = d ,

the number of bacteria stays stable from

t = 0.

If

the number of bacteria grows exponentially. On the contrary, if

b > d ,
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.


low pressure

V (P )

equals

Solution:

P (and constant temperature)


VP . Solve the model.

Experiments show for a gas at

the rate of change of the volume

The following ODE models the system

V0 =

V
P

V0
1
=
V
P
Separating variables

dV
dP
=
V
P
Integrating


C
log |V | = log |P | + C = log
P
V =
Kreyszig, 1.3.26
Carlos Oscar Sorzano, Aug. 31st, 2014

18

C
P

Gompertz growth in tumors.


(A

> 0),

where

y(t)

The Gompertz model is

is the mass of tumor cells at time

t.

y 0 = Ay log(y)

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

1
0.9
0.8
0.7

0.6
0.5
0.4
0.3
0.2
0.1
0

10
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

19

15

20

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
U=

Z
P dr + C() =
C()

To determine the constant

e3 dr + C() = e3 r + 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

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

20

Q
= ex sin(y)
x
Since

P
y

Q
x , the ODE is exact. To nd the solution,

u
=P
x
we integrate

with respect to

u(x, y)
If we now dierentiate

that satises

u
=Q
y

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

with respect to

we should obtain

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

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

with respect to

Z
u(x, y) =

e2x 2 cos(y)dx = cos(y)e2x + C(y)

21

If we now dierentiate

with respect to

we should obtain

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

Solution:

cos(x + y)

is an integrating factor.

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


Let us check if this is an exact equation:

Py =
Qx =
Since

Py = Qx ,

P (x, y)
= cos(x + y) y sin(x + y)
y
Q(x, y)
= y sin(x + y) + cos(x + y)
x

the equation is exact.

We can solve it by integrating with

respect to one of the variables

Z
U (x, y) =

Z
P (x, y)dx =

We now dierentiate

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

with respect to

Q(x, y) =

y
U (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

22

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
Q
P
y 6= x , the ODE is not exact. For nding an integrating factor, we
start by calculating
Since

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


We note that

Qx Py
cosh(x) sin(y)
1
=
= tan(y)
P
2 cosh(x) cos(y)
2

y , f (y). The integrating factor comes





Z
1
1
1
tan(y)dy = exp log(cos(y)) = p
F = exp
2
2
cos(y)

is a function of

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.
respect to

We nd its solution by integrating

x
Z

u(x, y) =

p
p
2 cosh(x) cos(y)dx = 2 sinh(x) cos(y) + C(y)

Dierentiating with respect to

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)
23

with

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

y0

2
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

h =
h
e
=
R h
e rdx =

R
pdx = x2 dx = 2 log |x|
eR2 log |x| = x2
(x2 )(x2 ex )dx = ex
R

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

yh = e

Z
( eh rdx + C)

where

h =
h
e
=
R h
e rdx =

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

pdx = 6

24

Finally

y = cosh4 (1.5x)

2.5
+C
cosh4 (1.5x)

= 2.5 + C cosh4 (1.5x)

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

Let

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


(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

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)


25

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)


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
R
eh ( eh rdx + C) of a non-homogeneous problem

obtaining the solution

y=

y 0 + p(x)y = r(x)
results from the following idea. Write the solution of the homogeneous problem
as

y = Ce
where

pdx

= Ceh = Cy

is the exponential function, which is a solution of the homogeneous

linear ODE

(y )0 + p(x)y = 0
Replace the arbitrary constant

in the homogeneous solution with a function

to be determined so that the resulting function

nonhomogeneous linear ODE.

26

y = uy

is a solution of the

Solution:

Let us introduce the function

to see the requirements that

uy

into the non-homogeneous ODE

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
eh

= reh u =

reh dx + C

So the solution of the non-homogeneous problem is

Z

re dx + C eh
h

y = uy =
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

a = 1.

and

We do the change of variable

u = y 1a = y 1(1) = y 2
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
h=
u =
=

Z
pdx =

2dx = 2x


R
R 2x
eh ( eh rdx + C) = e2x
e (2x)dx + C

e2x xe2x 21 e2x + C = x 21 + Ce2x

Now we undo the change of variable

r
2

y =

27

1
+ 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

u0 = (y 1 )0 =

1 0
1
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
h=

Z
(3.2)dx = 3.2x

pdx =

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

y =

1
1
=
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 .

Solution:

Hint: set

z = y2

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

28

z0 +

x1
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
dx = x log |x|
x

R
R xlog |x| x
= eh ( Reh rdx + C) =
ex+log |x|
e  (xe )dx + C

= ex x e2x dx + C = ex x 21 e2x + C
= x2 ex + Cex
Z

h=

pdx =

Now we undo the change of variable

y =

x x
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, beginning 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
which is a linear, non-homogeneous ODE whose solution is

h =
A =
=

Kout

R dth = Kout t
R
eh
e rdt + C = eKout x eKo ut tKin dt + C
1
eKout t Kin Kout
eKout t + C =

Kin
Kout

+ CeKout t

Now we impose the initial condition

A(0) = 0 =

Kin
Kin
+C C =
Kout
Kout

Finally, the solution is

A(t) =

Kin
(1 eKout t )
Kout

Kreyszig, 1.5.34

29

(t > 0)

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

Solution:

and explain what it means.


Let us call

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

0.6

0.4

0.2

0.2

0.4

0.6

0.8

We can rewrite the ODE as

y 0 ky = ky 2
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



R kt
eh rdt + C = ekt
e kdt + C = ekt ekt + C = 1 + Cekt
u = eh
We undo now the change of variable

y=

1
1 + Cekt
30

Imposing the initial condition

y0 =

1
1
1 y0
C=
1=
1+C
y0
y0

Finally

y =

1
1+

1y0 kt
y0 e

y0
y0 + (1 y0 )ekt

y0 = 0.1, k = 0.8.

The following gure shows the curve for

1
0.9
0.8
0.7

0.6
0.5
0.4
0.3
0.2
0.1
0

10

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

Which is the set of orthogonal trajectories to the curve family


2

y = cex

Solution:

To nd the orthogonal trajectories, we dierentiate the set of curves

y 0 = 2xcex

That we may rewrite as

y 0 = 2xy = f (x, y)
The set of orthogonal curves must fulll

y0 =

1
1
=
f (x, y)
2x
y

1
2x
1
yd
y = dx
2x
yy0 =

Which is a separable dierential equation that can be directly integrated

1 2
1
y = log(x) + C
2
2
31

y2 = log(x) + C
2

ey =

C
x

Finally, the curve family can be rewritten as


2

x = Cey
Kreyszig, 1.6.12
Carlos Oscar Sorzano, Aug. 31st, 2014

Electric eld.
same strength at

The lines of electric force of two opposite charges of the

(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 + y2 = (c )2 1
(dashed in the following gure).

Solution:

The curve

x2 + (y c)2 = 1 + c2

is the family of all circles pasing by


we show that

(1, 0)

and

(1, 0)

(1, 0)

and

(1, 0).

To show this statement

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
32

This curve contains the parameter

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
c=

x2 + y 2 1
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
y0 =

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

The set of orthogonal curves must fulll

y0 =

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

1
1 1 x2 1
y =
y
2x
2 x

This ODE is a Bernouilli equation of the form

y0 + p(x)
y = g(x)y a
with

a = 1.

So we make the change of variable

u = y1a = y1(1) = y2 u0 = 2
y y0


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

x2
1
u0 = u +
x
x
1
1

x2
u0 u =
x
x

u0 =

This is a linear equation whose solution is

R 1
h =
x dx = log |x|
eh = e logR|x| = x1

h
u = eh
+ c 
R e rdx
1 1x2
= x
dx + c
x

 2 x
= x x x+1 + c
= x2 1 + c x
33

Undoing the change of variable

y2 = x2 1 + c x
y2 + x2 c x = 1
 2
 2
c
c
2
2

= 1 +
y + x c x +
2
2




2
2
c
c
y2 + x
= 1 +
2
2
2

y2 + (x c ) = 1 + (c )2
2

(x + c ) + y2 = (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
=1
c
2

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
y0 =

4x
= f (x, y)
9y

The orthogonal trajectories fulll the dierential equation

y0 =

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

d
y
dx
=
9
y
4x
34

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 

4
3.5
3

2.5
2
1.5
1
0.5
0
2

0
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?

35

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
[cm/h] = k
dt

1[cm]w[cm]
whose solution is

h(t0 ) = 0

k
dt
w
k
h=C+ t
w
dh =

The constant

is obtained by the initial condition

h(t0 ) = 0
k
kt0
t0 = 0 C =
w
w

C
So the height becomes

h=
Let us call

x(t)

k
(t + t0 )[cm]
w

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
[cm/h] = [cm3 /h]
dt
dx

=
=
dt
wh
wk(t + t0 )

w[cm]h[cm]

dx =

dt
wk t + t0

log |t + t0 | + C
wk
x(0) = 0 from which

x=
We have the initial condition

0=

log |t0 | + C C =
log |t0 |
wk
wk

Consequently, the distance gone by the snowplow is


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




log t20 + 1




log t10 + 1

From the problem statement we know that


is

x(2) = 3000 =

wk

x(1) = 2000 =

wk

Dividing both equations



2

log
+
1


t0
3


=


2
log t10 + 1
36

and

x(2) = 3000,

that





1
2





3 log + 1 = 2 log + 1
t0
t0



3
2
 2
1




log
+ 1 = log
+1
t0
t0




1
+1
t0

3


=

2
+1
t0

2

(1 + t0 )3
(2 + t0 )2
=
t30
t20
(1 + t0 )3 = t0 (2 + t0 )2
t30 + 3t20 + 3t0 + 1 = t30 + 4t20 + 4t0
(

t20 + t0 1 = 0 t0 =

1 5
2
51
2

The only valid solution is

t0 =

51
= 0.618[h] = 37[min]
2

So it started snowing at 11h 23' AM.

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

Solution:

z = y0 .

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,

y 00 +

1 0
y = cosh(x)
x

z0 +

1
z = cosh(x)
x

can be transformed into

Kreyszig, 2.1.2

37

Carlos Oscar Sorzano, Aug. 31st, 2014

Show that

F (y, y 0 , y 00 ) = 0
z = y0 .

can be reduced to a rst-order equation in

Solution:

If we do the change of variable

dy 0 dy
dz
=
z = zy z
dy dx
dy

z = y0 z0 =

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

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

log |z| =

3
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
38

y=

x 2 dx + C2

y = C1

5
2
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

z = y0 z0 =

dy 0 dy
dz
=
z = zy z
dy dx
dy

Substituting in the original ODE, we have

y(zy z) = 3z 2
zy y = 3z
3dy
dz
=
z
y
log |z| = 3 log |y| + C1
z = C1 y 3
Now we solve

y 0 = C1 y 3
y 3 dy = C1 dx

1
= C1 x + C2
2y 2

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

y 00 = k

p
1 + (y 0 )2

k depends on the weight. This curve is called catenary (from


y(x), assuming that and those xed
(1, 0) and (1, 0) in a vertical xy -plane.

where the constant

Latin catena = the chain). Find and graph


points are

Solution:

If we do the change of variable

z = y 0 z 0 = y 00
39

Substituting in the original ODE, we have

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
y=

sinh(kx)dx =

1
cosh(kx) + c2
k

Imposing the boundary condition

y(1) = 0 =

1
1
1
cosh(k) + c2 c2 = cosh(k) = cosh(k)
k
k
k

So the nal curve is

y=

1
1
cosh(kx) cosh(k)
k
k

0.1

0.2

0.3

0.4

0.5

0.6

0.7
1

0.5

0
x

0.5

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
depend on the initial velocity and position?

40

y(t)

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

h =
z =

1dxR = t
R
eh ( eh rdt + c1 ) = et ( et kdt + c1 ) = et (ket + c1 ) = k + c1 et

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)
Kreyszig, 2.1.17
Carlos Oscar Sorzano, Aug. 31st, 2014

3
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

Solution:

y(1) = 3, y 0 (1) = 0.

Let us calculate the derivatives of the two given functions

y1

= x2

y10

y100

y2

= x

y20
y200

= 12 x 2

1
3 2
2x
1
3 1 2
2 2x
1
2

= 34 x 2

( 12 )( 23 )x 2 = 34 x 2

We now substitute these two functions in the ODE to verify if they are solutions
of it

4x2 y100 3y1

4x2 ( 34 x 2 ) 3x 2 = 3x 2 3x 2 = 0

4x2 y200 3y2

4x2 ( 34 x 2 ) 3x 2 = 3x 2 3x 2 = 0

41

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

y = c1 y1 + c2 y2 = c1 x 2 + c2 x 2
The solution satisfying the initial values must fulll

= 3 = c1 + c2
= 0 = 23 c1 12 c2

yp (1)
yp0 (1)

9
3
c1 = , c2 =
4
4

So

3 3
9 1
yp = x 2 x 2
4
4
2.95
3
3.05
3.1

3.15
3.2
3.25
3.3
3.35
3.4
3.45
0.5

1
x

1.5

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:

y1
y10
y100
y2
y20
y200

Let us calculate the derivatives of the two given functions

=
=
=
=
=
=
=
=

ex cos(x)
ex cos(x) ex sin(x)
[ex cos(x) + ex sin(x)] [ex sin(x) + ex cos(x)]
2ex sin(x)
ex sin(x)
ex sin(x) + ex cos(x)
[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


42

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

Solve the ODE

y 00 4y 0 3y = 0

Solution:

The characteristic equation is

42 4 3 = 0
whose solutions are

48
3
1
16 + 48
=
1 = , 2 =
8
8
2
2

The general solution is


3

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

Solution:

e2.6x

and

e4.3x .

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
43

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

Find an ODE whose basis of solutions are

Solution:

5x

and

xe

5x

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

Find an ODE whose basis of solutions are

Solution:

e(2+i)x

and

e(2i)x .

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

p
1
a
w
(a + a2 4b) = + i
2
2
2
p
1
a
w
2 = (a a2 4b) = i
2
2
2
1 =

Where

w=

p
a2 4b

We now that the generic solutions of the dierential equation are of the form
a

y1 = e( 2 +i 2 )x
y2 = e( 2 i 2 )x
Our solutions are

e(2+i)x , e(2i)x
So

2 =

a
a=4
2
44

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

ekx

Are the functions

Solution:

and

xekx

linearly independent on any interval?

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

If

c2

is dierent from 0, then

c2
y1
=
y2
c1
c1
y2
=
y1
c2

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

x2 ln(x)

and

linearly independent on the interval x > 1

Solution:

The ratio

x2
x2 ln(x)

is a function of

1
ln(x)

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)

45

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


terval

sin(2x)

cos(x) sin(x)

and

linearly independent on the in-

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.14
Carlos Oscar Sorzano, Aug. 31st, 2014

If

L = D2 + aD + bI

has distinct roots

solution is

Solution:

Since

and

xex

and

show that a particular

ex ex

y=
Obtain from this a solution

by letting

and applying L'Hpital rule.

are roots of the polynomial

s2 + as + b

and we know

that

(D2 + aD + bI)ex = 0
(D2 + aD + bI)ex = 0
Let us check whether the function

ex ex
is a solution of the ODE

y=

Ly = 0
(D2 + aD + bI)

So


x

ex e

1
=
(D2 + aD + bI)ex
1
1
= 0
0
= 0

1
2
(D

+ aD + bI)ex

is a solution.

Let us study the behaviour of

ex ex

lim

as

=
=
=
=
=

lim

(e()x 1)ex

e()x 1
x
e lim

1+()x1
x
e lim

()x
x
e lim

xe

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

How does the frequency of the harmonic oscillation change if we (i) double
the mass, (ii) take a spring of twice the modulus?

46

Solution:

By the Newton's second law and Hooke's law we know that

ky = my 00
y 00 +

k
y=0
m

We can solve its characteristic equation

r
k
k
+
= 0 = i
= i0
m
m
2

(i) If we double the mass

r
r
k
k
1
k
1
+
= 0 = i
= i
= i 0
2m
2m
2 m
2
2

1
So the frequency will be lower by a factor .
2

(ii) If we take a spring of twice the modulus

r
r

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

frequency will be higher by a factor


2.
2

So the

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

Springs in parallel.

What are the frequencies of vibration of a body of

m = 5[kg] (i) on a spring of modulus k1 = 20[N/m],


modulus k2 = 45[N/m], (iii) on the two springs in parallel?

mass

Solution:

(ii) on a spring of

For the cases (i) and (ii), with a single spring, the dierential equa-

tion governing the system is

F = ky = my 00 y 00 +

k
y=0
m

The frequency of vibration comes from the analysis of the characteristic polynomial of the ODE

r
k
k
+
= 0 = i0 = i
m
m
2

In the rst case it is

k1
=
m

20[N/m]
= 2[s1 ]
5[Kg]

k2
=
m

45[N/m]
= 3[s1 ]
5[Kg]

01 =
In the second case

02 =

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

F1 + F2 = k1 y k2 y = my 00 y 00 +
47

k1 + k2
y=0
m

k1 + k2
=
m

03 =

65[N/m]
= 3.6[s1 ]
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
0 =

k
=
m

k1 k2
=
(k1 + k2 )m

45 20
= 1.66[s1 ]
(45 + 20)5

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

Pendulum.

Find the frequency of oscillation of a pendulum of length

neglecting air resistance and the weight of the rod, and assuming
small that

Solution:

sin()

practically equals

The movement of the pendulum is along an arch whose length is

The acceleration is the second derivative of this variable


second law of motion states

F = ma
mg sin() = m(L)00
g sin() = (L)00
For a small angle

L,

to be so

sin()
g = (L)00
g
00 + = 0
L

The characteristic polynomial is

2 +

g
=0
L

48

(L)00 ,

L.

and Newton's

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 submerged).

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

be the height of the cylinder that has been submerged. The

force that the buoy experiences is

F = (r2 )y
where
and

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


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

is the oscillation period. Solving for

T =

2
2
2
= p =
0
r
r m

we have

Finally, the weight of the cylinder is

m=

r2 T 2
4

In this particular case

m=

r2 T 2
980[g/(cm2 s2 )]302 [cm2 ]22 [s2 ]
=
= 280.75[kg]
4
4
49

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

Solution:

[Kg]

and the spring constant equals 4500

[Kg/s2 ]?

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

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 decrement, equals

=
Find

for the solutions of

Solution:

2a
.
0

y 00 + 2y 0 + 5 = 0.

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
0


a
0 t = atan
+ k
0

 

1
a
t=
atan
+ k
0
0
tan(0 t ) =

50

Let

t1

denote the time of a maximum and

t1

1
0

atan

t2

1
0

atan

a
 0 
a
0

t2

the time of the next maximum

+ k1


+ (k1 + 2) = t1 +

2
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
0
= Ce
)

cos 0 (t1 +
0
=



2
a t1 +
0
Ce 

2
a t1 +

= Ce

cos (0 t1 + 2)
cos (0 t1 )

Let us calculate now the ratio

y(t1 )
y(t2 )

Ceat1 cos(
0 t1 )
!
2
a t1 +
0
Ce
cos(0 t1 )

2a

= e 0

The logarithm of this quantity is the logarithmic decrement

= log

2a
y(t1 )
=
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

51

0.8

0.6

0.4

0.2

0.2

0.4

10

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
y 00

= mxm1
= 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

52

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

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


y2 x2
=
y20 2x


y1
0
y1
is not 0 for all


x3
= 3x4 2x4 = x4 6= 0
3x2

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

Solution:

y(1) = 4

and

y 0 (1) = 6.

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 Wronskian




x2 log(x)
3 1
=x
2
2x log(x) + x

2
x

2x



log(x)
= x3
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

53

Carlos Oscar Sorzano, Aug. 31st, 2014

Find the real general solution of

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

++ +

1
4

=0=

1 4 2 1
1
= i
2
2

The real general solution of the homogeneous problem is

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

yp

= K1 xe 2 cos(x) + K2 xe 2 sin(x)

yp0

yp00

x
1 2
2e x
1 2
4e

[cos(x)(2K2 x K1 (x 2)) sin(x)(2K1 x + K2 (x 2))]




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

y 00 + y 0 + ( 2 + 41 )y

2e 2 (K2 cos(x) K1 sin(x))

x
e 2

sin(x)

From where

K2 = 0
2K1 = 1 K1 =

1
2

So the particular solution is of the form

yp =

1 x
xe 2 cos(x)
2

And the general solution

y = yp + yh = e 2




x
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

54

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

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
yp0
yp00

=
=
=

A cosh(x) + B sinh(x)
A sinh(x) + B cosh(x)
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)



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

y = c1 e 2 + c2 e 4 +
We need now to determine

c1

and

c2

4
6
cosh(x) + sinh(x)
5
5

using the initial values

y(0) = 0.2 = c1 + c2 + 54
y 0 (0) = 0.05 = 12 c1 + 41 c2 +


6
5

c1 = 4, c2 =

17
5

Finally, the solution of the IVP is

y = 4e 2 +

17 x
4
6
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)

55

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

K1 (1 2 ) cos(t) + K2 (1 2 ) sin(t) = cos(t) K1 =

1
, K2 = 0
1 2

So the general solution is

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

1
cos(t)
1 2

= 1.5, A = B = 1

The graph below shows this function for


3

10

15
x

20

25

30

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

Gun barrel.

where

F (t) =

Solve

y 00 + y = F (t)
1
0

t2
2

0t
otherwise

undamped system on which a force

and

y(0) = 0, y 0 (0) = 0.

This models an

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

56

and

y0

must be continuous.

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
yp0
yp00

= A + Bt + Ct2
= B + 2Ct
= 2C

Substituting into the ODE

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

t2
2

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

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

1
C = 2
The general solution in this interval is of the form

y = c1 cos(t) + c2 sin(t) + 1 +
To determine

c1

c2

and

y(0)
y 0 (0)

2
t2
2
2

we impose the initial conditions

=
=

0 = c1 + 1 +
0 = c2

2
2

c1 = 1 +

2
2

Finally, the solution in this interval is

y=
Note that at

t=



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

we have


2
y() = 1 + 22 (1 cos()) 2 = 1 +
2
2
0
y () = 1 + 2 sin() 2 = 2
In the interval

t>0

4
2

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 +


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

4
2

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 disregarded damping.
Finally we can write the solution to the initial problem as


y(t) =


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

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

Solution:

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

E(t) iR
1
E(t) iR
C

1
Q=0
C

Zt
i( )d = 0

Dierentiating

E 0 i0 R
i0 +
If is constant,

1
i=0
C

1
i = E0
RC

E = E0 , then E 0 = 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
58

Finally,
t

i(t) = i(0)e RC
Kreyszig, 2.10.6
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve

(D2 + 6D + 9I)y = 16

e3x
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


e3x
W =
3e3x

y1

and

y2

functions is





xe3x
3x 2 1

= e
3
3xe3x + e3x



x
= e6x
3x + 1

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

yp

y1 r
y2 r
W dx + y23x W dx
3x
e
R xe 16 x2 +1

y1

=
=
=

R e3x 16 ex3x
2 +1
e3x R e6x
dx + xe3x
dx
R 1 e6x
x
3x
3x
16e
dx
+
16xe
dx
2
2
x +1
x +1
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

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

59

yi
yi0
yi00
yi000
yiiv

1
0
0
0
0

x
1
0
0
0

x2
2x
2
0
0

x3
3x2
6x
6
0

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





W =

1
0
0
0

x
1
0
0

x2
2x
2
0

x3
3x2
6x
6





= 12


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


1

W = 0
0

ex cos(2x)
x
e (cos(x) + sin(x))
2ex sin(x)

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




= 2e2x

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

Are the functions


the interval

e2x , xe2x

and

x2 e2x

x 0?

60

linearly dependent or independent in

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

W (x)

Since



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

2x
df1 (x)
df2 (x)
df3 (x)

(1 + 2x)e2x

= 2e
dx
dx
2
2
d2 fdx
2x
(x)
d
f
(x)
d
f
(x)
1
2
3
4e
4(1 + x)e2x


dx2
dx2

dx2

1
x
x2


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

4 4(1 + x) 2(2x2 + 4x + 1)

W (x) > 0

x 0,

for

then the three functions

f1 , f2

and

x2 e2x
2(1 + x)xe2x
2(2x2 + 4x + 1)e2x

f3

Kreyszig, 3.2.5

independent in this interval.

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

61

are linearly

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
3

2.8
2.6
2.4
2.2
2
1.8

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

Reduction of order.
known,

y1 ,

If a solution of a linear, constant-coecient ODE is

we can reduce its order by assuming that

y = uy1
62

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=

and

z(x)dx

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
y 00
y 000

=
=
=
=
=

u0 y1 + uy10
u00 y1 + u0 y10 + u0 y10 + uy100
u00 y1 + 2u0 y10 + uy100
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.

63

2. Let us divide by

x3

y 000

3 00
y +
x




6
1
6
0

1
y

y=0
x2
x3
x

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



 
 




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

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
u=

Z
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
y0
y 00
y 000

=
=
=
=

xm
mxm1
m(m 1)xm2
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)
64

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

yp =

3
X

Z
yk

k=1
Where

yk

Wk
rdx
W

W and Wk

x x1 x2
1 x2 2x = 2x2 8
x
3
2
0 2x1
0 x
x2
0 x2 2x = 3
3
1 2x 2 2
x 0 x
1 0 2x = x2 2x2

0 1 12
x x
0
1 x2 0 = 2
x
0 2x3 1

are the 3 homogeneous solutions and

matrices

W1

W2

W3

are the following

We write the ODE in the standard form

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

1 00
2
2
y 2 y 0 + 3 y = x5
x
x
x

We now calculate the integrals

W1
rdx =
W

3x3 tanh1 ( x2 ) + 6x2 + 8


3x
5
x
dx
=
2x2 8
64x3

Z 2
x tanh1 ( x2 2)
x 2x2 5
W2
rdx =
x
dx
=
W
2x2 8
16x
Z
Z
W3
1
1
1
log(x)
2
rdx =
x5 dx =

log(x2 4) +
2
2
W
2x 8
16
32x
128
64
Z

Finally, the particular solution is

yp

2
3x3 tanh1 ( x
2 )+6x +8
64x3

= x
1
= 12x
2

+ x1

x tanh1 ( x
2 2)
16x

+ x2 ( 1
16

Finally, the general solution is of the form

y = c1 x + c2 x1 + c3 x2
Kreyszig, 3.3.6

65

1
12x2

1
32x2

1
128

log(x2 4) +

log(x)
64 )

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

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

1
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
yp0
yp00
yp000

=
=
=
=

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

66

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.10
Carlos Oscar Sorzano, Aug. 31st, 2014

Solve

x3 y 000 + xy 0 y = x2

Solution:

y(1) = 1, y 0 (1) = 3, y 00 (1) = 14

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

a solution of the form

y
y0
y 00
y 000

=
=
=
=

xm
mxm1
m(m 1)xm2
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
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)


67

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


the method of variation of parameters whose solution is

yp =

3
X

Z
yk

k=1
where

yk

Wk
rdx
W

are the 3 homogeneous solutions and

and

Wk

are the following

matrices

W1

W2

W3



x x log(x)
x log2 (x)

1 1 + log(x) 2 log(x) + log2 (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)
1
2
2

1
x
x + x log(x)

2

x 0
x log (x)

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

0 1
x + x log(x)


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

We write the ODE in the standard form

x3 y 000 + xy 0 y = x2 y 000 +
We now calculate the integrals (with

R
R
R

W1
W rdx
W2
W rdx
W3
W rdx

R
=
R
= R
=

r=

1
1
1 0
y 3y =
x2
x
x

1
x)

x(log2 (x)2 log(x)+2)


x log2 (x) 1
2
x dx =
2
2x log(x) 1
dx
=
x(log(x)
1)
2
x
x1
x
dx
=
2x
2

Finally, the particular solution is

yp

R 1
R 2
R W3
= y1 W
rdx + y2 W
W
W rdx + y3
W rdx
2
log(x)+2)
= x x(log (x)2
+
x
log(x)
(x(log(x)
1)) + x log2 (x) x2
2
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
So the particular solution sought is

y = 3x log(x) +

11
x log2 (x) + x2
2

68

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
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
y10 = inow-outow =

Doubling the ow rate:


 


 

y2
lb
gal
y1
lb
gal
= inow-outow =
4

4
100 gal
min
100 gal
min

 


 

lb
gal
lb
gal
y1
y2
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
y10

Halng the tank sizes:


 


 

gal
y1 lb
gal
y2 lb
= inow-outow =
2

2
50 gal
min
50 gal
min

 


 

y1 lb
gal
y2 lb
gal
0
y2 = inow-outow =
2

2
50 gal
min
50 gal
min







y10 = 0.04y1 + 0.04y2
y10
0.04 0.04
y1

=
y 0 = A2 y
0
y2 = 0.04y1 0.04y2
y20
0.04 0.04
y2
y10

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.


lvaro Martn Ramos, Jan. 4th, 2015

69

Kreyszig, 4.1.11

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

4y20 15y2 4y1 = 0 y20 =

15
y2 + y1
4

Together the system ODE is

 0 
0
y1
=
y20
1

 
y1
15
y2
4
1

That is of the form

y0 = Ay
The eigenvalues and eigenvectors of

are:

1 = 4, v1 = (1, 4)T
2 = 41 , v2 = 1, 14

T

The general solution of the ODe system is

y = c1 v1 e1 x + c2 v2 e2 x = c1

 
 
x
1
1 4x
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
y2
y3

=
=
=

y
y10 = y 0
y20 = y 00

So that the original ODE can be written as

y30 + 2y3 y2 2y1 = 0


70

y30 = 2y3 + y2 + 2y1


Altogether the ODE system is

0
0
y1
y20 = 0
y30
2


0
y1
1 y2
2
y3

1
0
1

y0 = Ay
The eigenvalues and eigenvectors of

1 = 2
2 = 1
3 = 1

are

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

The general solution of the ODE system is

=
=

=
Finally, remind that

x
c1 v1 e1
+ c2 v2 e2 x+ c3
v3 e3 x

1
1
1
c1 2 e2x + c2 1 ex + c3 1 ex
1
1

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

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
y20

Solution:

=
=

y1 + y2
3y1 y2

Let us write the equation system as

 0 
y1
1
=
y20
3

 
1
y1
1
y2

The characteristic polynomial of the system matrix is


1

3



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

The eigenvector of

1 = 2

comes from the equation system

1
3

(A 2I)x = 0
 
1 0
1

3 0
0
71

1 0
0 0

whose eigenvector is

x1 = (1, 1).
2 = 2 comes

The eigenvector of

whose eigenvector is

from

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

3 1 0
0 0

0
0

x2 = (1, 3).

Finally, the solution of the dierential equation system is

y = c1 x1 e1 t + c2 x2 e2 t = c1


 
 

c1 e2t c2 e2t
1 2t
1 2t
e + c2
e
=
c1 e2t + 3c2 e2t
1
3

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
=
y20
2

 
2
y1
2
y2

y0 = Ay
The eigenvalues and eigenvectors of

1 = 2 + 2i
2 = 2 2i

are

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

The general solution of the ODE system is

1 x
= 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

y1
y2

 
i (2+2i)x
=
e
1
 
i (22i)x
=
e
= y1
1

we dene the functions

1
y

y1 +y2
2

2
y

y1 y2
2i

ie(2+2i)x
= Re{y1 } = Re
(2+2i)x
 2x e

e cos(2x)
= Im{y1 } =
e2x sin(2x)


72



 2x

e sin(2x)
=
e2x cos(2x)

The general solution can be written as


1 +c2 y
2 = c1
y = c1 y



 2x


e2x sin(2x)
e cos(2x)
2x c1 sin(2x) + c2 cos(2x)
+c2 2x
= e
e2x cos(2x)
c1 cos(2x) + c2 sin(2x)
e 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
y20 = 1
y30
0

1
0
1

0  
y
1 1
y2
0

y0 = Ay
The eigenvalues and eigenvectors of

1 =
0
2i
2 =
3 = 2i

are

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

The general solution of the ODE system is

=
=

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

i
i
1

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

y2

y3

= 2 ei 2x
i

i
= 2 ei 2x = y2
i

we dene the functions

2
y

y2 +y3
2

3
y

y2 y3
2i

i
sin(
2x)

= Re{y2 } = Re 2 ei 2x = 2 cos( 2x)

i
sin( 2x)

cos(
2x)

= Im{y2 } = 2 sin(
2x)
cos( 2x)
73

The general solution can be written as

+c y

= c1 y1 + c2 y

2 3 3

cos( 2x)
sin(
2x)
1

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


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

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

= c2 2 cos( 2x)
+
c
3 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

y1 (t)

by stirring. Find the fertilizer contents

Solution:

T1

in

and

y2 (t)

in

T2 .

We can model the system with the following dierential equations:

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

y10
y20
Equivalently

 0   16
y1
200
=
16
y20
200

4
200
16
200

 
y1
y2

The eigenvalues and eigenvectors of this matrix are

3
1 = 25
,
1
2 = 25
,

v1 = ( 12 , 1)T
v2 = ( 12 , 1)T

The general solution of the ODE system is

y = c1 v1 e1 t + c2 v2 e2 t = c1

12
1

e 25 t + c2

y(0) =

100
200

e 25 t

t = 0 we have
 1
1
2
= c1
+ c2 2 c1 = 0, c2 = 200
1
1

As stated in the problem at

1

So the solution sought is

1
y = 200

1
74

e 25

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 
1
y1
=
y20
0

0
2

 
y1
y2

The eigenvalues of the matrix are given by

det


1
0

0
2

= 2 3 + 2 = 0

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
=
y20
9
Critical points are points at which

y 0 = 0,

 
1
y1
0
y2
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

75

2
1.5
1

0.5
0
0.5
1
1.5
2
2

1.5

0.5

0
y1

0.5

1.5

To nd a real solution we construct the functions

1 x

y1

v1 e

y2

v2 e2 x

1
y

y1 +y2
2

2
y

y1 y2
2i

 1 
3 i i3x
=
e
 1 1
i
= 3 ei3x
1


1
3


sin(3x)
= Re{y1 } =

 cos(3x)
31 cos(3x)
= Im{y1 } =
sin(3x)

The general real solution is given by


1 + c2 y
2 =
y = c1 y


c1 13 sin(3x) c2 31 cos(3x)
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
=
y20
2

2
1

 
y1
y2

The characteristic equation of the matrix is

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

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

y = c1 v1 e1 x + c2 v2 e2 x = c1

 
 
1 3x
1
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
=
y20
0

0
2

 
y1
y2

y = 0 and the eigenvalues of the matrix used to calculate the


p = 1 + 2 > 0.
change of variable = t, then

Its critical point is

derivative are 1 and 2, that is, it is an unstable node (because


If we do the

dyi dt
dyi
dyi
=
=
d
dt d
dt
So the equation system becomes

 dy1 
d
dy2
d


1
=
0

 
0
y1
2
y2

That is the direction of motion changes, and the two eigenvalues become negative. 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

y =

0
4


1
y
0

has a center as its critical point. Replace each

aij

by

aij + b.

Find values of

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

y =


b
1+b
y
4 + b
b
77

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

q < 0 4 + 3b < 0 b <

4
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

2b < 0, 4 + 3b = 0

(node)

4
=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

2b < 0, 4 + 3b = 0, 2b 6= 0

(spiral)

4
=b
3

(2b)2 4(4 + 3b) < 0 b2 3b 4 < 0 1 < b < 4


Since

{ 34 } (1, 4) = ,

there is no

satisfying all conditions.

Unstable spiral: to get an unstable spiral we need

p>0
2b > 0

or

q<0

(unstable) and

= p2 4q < 0, p 6= 0

(spiral)

4 + 3b < 0 b (0, ) (, 34 ) = (, 34 ) (0, )

or

(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
2b > 0

or

or

q<0

(unstable) and

q > 0, = p2 4q 0

(node)

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, )
78

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

y2
y1 + 21 y12

y =

Critical points are solutions of the equation system

Case

y2
y1 + 12 y12


= 0 y1 = 0, 2; y2 = 0

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

If we linearize around the point

!
f1
y2
f2

y2

f1
y1
f2
y1

A=

(0, 0)

we get



0
1
=
1
0 y =0

0
1 + y1

=
y=0

And the equation system behaves in the vicinity of

(0, 0)


1
0

as

y0 = Ay
A is

1
|A I| =
1

The charactertistic polynomial of



= 2 + 1 = 0

p = 0, q = 1 and = p2 4q = 4.
(p 0, q > 0) center (p = 0, < 0).
Case (y1 , y2 ) = (2, 0):

So,

Consequently,

(0, 0)

Let us make the change of variables

  

y1
y1 2
=
y2
y2
Then

0 =
y

y2
y1 + 2)2
(
y1 + 2) + 12 (

We now linearize around the point

A =

f1
y1
f2
y1

!
f1
y2

f2
y2


=

y2
y1 + 21 y12

(
y1 , y2 ) = (0, 0)

=

0
1 + y1

=0
y



1
0
=
0 y =0
1

Now, the characteristic polynomial is

|A I| =
1


1
= 2 1 = 0

79

1
0

is a stable

p = 0, q = 1 and = p2 4q = 4.
< 0) saddle point (q < 0).

So,
(q

Consequently,

(2, 0)

is an unstable

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
y2

=
=

y
y10

Then we may rewrite the ODE as

y20 9y1 + y13 = 0


or the ODE system

y10
y20

= y2
= 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 =

y = 0:
F1
y2
F2
y2

F1
y1
F2
y1

The eigenvalues of


y=

y1 =0,y2 =0

A =


0
9

1
0


1
0 y

0
9 3y12


y=
1 =0,y2 =0

0
9


1
y
0


are

1 = 3

2 = 3.

and

Since the two

eigenvalues are real and of opposite sign, the critical point is a saddle point.
Case

y = 3:

whose




0
1
0
1
y =
y=
y
9 3y12 0 y =3,y =0
18 0
1
2

18i and 2 = 18i. Since the two


eigenvalues are 1 =
0

are pure imaginary, the critical point is a center.


Case

y = 3:
y0 =

0
9 3y12


1
0 y


y=
1 =3,y2 =0

0
18


1
y
0

Kreyszig, 4.6.3

Again, the critical point is a center.


lvaro Martn Ramos, Jan. 4th, 2015

Find a general solution of

y10 = y2 + e3t
80

eigenvalues

y20 = y1 3e3t

Solution:

Let us write the ODE system as

 0 
0
y1
=
y20
1

1
0

   
y1
1
+
e3t
y2
3

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


 
 t
1
1 t
e
t
e + c2
e =
1
1
et


y h = c1

et
et

 
c1
=Yc
c2

For the particular solution we now that

yp = Y u
Where

u0 = Y 1 g
So


et
Y
et
 t
  2t 
1 e
e
e3t
e
0
=
u =
et
3e3t
2e4t
2 et
!
Z  2t 
e2t
e
2
u=
dt =
e4t
2e4t
2
!  
 t

2t
e
e
et
0
2
yp = Y u =
= 3t
e4t
e
et et
1

et
et


t

1
=
2

Finally,


 
 
1
1 t
0
et + c2
e + 3t
1
1
e

y = yh + yp = c1
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

y =

4
2




1
0.6t
y+
3
2.5t

81

The eigenvalues and eigenvectors of the system matrix are

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

yh = c1

 
 
1 5t
1 2t
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


k1 =
From where

4
2




1
0.6
(k0 + k1 t) +
t
3
2.5






1
0.6
0.43
k1 +
= 0 k1 =
3
2.5
1.12

4
2

and


k1 =

4
2




1
0.241
k0 k0 =
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

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

y=

am xm = a0 + a1 x + a2 x2 + a3 x3 + ...

m=0
Then

y0 =

am mxm1 = a1 + 2a2 x + 3a3 x2 + ...

m=1
Let us write the ODE as

y 0 + 2xy = 0
82

and substitute the two series

!
am mxm1

+ 2x

m=1

a1 + 2a2 x +

!
am xm

!
am mx

m1

+ 2a0 x +

Let us do the change of variable

a1 + 2a2 x +

!
m+1

2am x

m0 = m 2
!

am0 +2 (m + 2)x

m0 +1

in the rst sum

+ 2a0 x +

m0 =1

!
2am x

am0 +2 (m0 + 2)xm +1 +

m0 =1

a1 + 2(a0 + a2 )x +

2am xm+1 = 0

m=1

((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

1
2
m = 2 4a4 + 2a2 = 0 a4 = a2 = a0
4
2
11
2
m = 4 6a6 + 2a4 = 0 a6 = a4 = a0
6
32
2
111
m = 6 8a8 + 2a6 = 0 a8 = a6 =
a0
8
432
...
m

m+1

m=1

a1 + 2(a0 + a2 )x +

And in general, for

=0

m=1

m=3

=0

m=0

even, we have

am = (1) 2

m a0
2!

The general solution is then



1
1
1
y = a0 1 x2 + x4 x6 + x8 ...
2!
3!
4!
83

=0

It can be easily checked that this is the Taylor expansion of


2

y = a0 ex
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

y=

am xm

m=0
Then

y0
y 00

m=1

am mxm1
am m(m 1)xm2

m=2
Substituting the series in the ODE

!
am m(m 1)x

m2

m=2

!
am mx

m1

+x

m=1

Let us do the change of variable

!
am x

=0

m=0

m0 = m + 1

in the second sum and

m0 = m + 4

in the third sum

am m(m 1)xm2

am0 1 (m0 1)xm 2 +

m0 =2

m=2

2a2 + 6a3 x (a1 + 2a2 x) +

am0 4 xm2 = 0

m0 =4

((m 1)mam (m 1)am1 + am4 ) xm2 = 0

m=4
The whole series is 0, all terms must be 0

2a2 a1 = 0 a2 =
6a3 2a2 = 0 a3 =

a1
2

a2
a1
=
3
3!

When m=4

12a4 3a3 + a0 = 0 a4 =

3a3 a0
a1
a0
=

12
4!
12

When m=5

20a5 4a4 + a1 = 0 a5 =
=

a4
a1
4a4 a1
=

=
20
5
20

a1
a0
a1
a0
a1
6a1
a0
5a1
a0
a1

= +

=
=
5!
60 20
60
5!
5!
60
5!
60
4!
84

The general solution is then

y = a0 (1

1 4
1
1
1
1
1
x x5 ...) + a1 (x + x2 + x3 + x4 x5 ...)
12
60
2!
3!
4!
5!

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

Solution:

sin(x).

We know that the MacLaurin series of

sin(x) =

sin(x)

is

x
x5
(1)
x2m+1 = x
+
...
(2m + 1)!
3!
5!
m=0
m

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
m=2
m=3
m=4
m=5

1.5

0.5

0.5

1.5

85

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

Show that

y2 = x
with

n=1

(n 1)(n + 2) 3 (n 3)(n 1)(n + 2)(n + 4) 5


x +
x ...
3!
5!

becomes

y 2 = P1 = x
and

y1 = 1
with

n=1

n(n + 1) 2 (n 2)n(n + 1)(n + 3) 4


x +
x ...
2!
4!

becomes

1
1
1
y1 = 1 x2 x4 x6 ... = 1 x log(x)
3
5
2

Solution:

Let's start rst with

y2 = x
In particular for

y2 .

For a general

n, y2

is

(n 1)(n + 2) 3 (n 3)(n 1)(n + 2)(n + 4) 5


x +
x ...
3!
5!
n = 1,

y2 = x

it becomes

(0)(3) 3 (2)(0)(3)(5) 5
x +
x ... = x = P1 (x)
3!
5!

as stated by the problem.

y1

is for any

y1 = 1

n(n + 1) 2 (n 2)n(n + 1)(n + 3) 4


x +
x ...
2!
4!

that can be written as

y1 = a0 + a2 x2 + a4 x4 + ...
In general, we have the recursion

am+2 =
which for

n=1

(n m)(n + m + 1)
am
(m + 2)(m + 1)

becomes

am+2 =

(m 1)
(1 m)(m + 2)
am =
am
(m + 2)(m + 1)
(m + 1)

In this way, we note that

a0
a2
a4
a6
a8

= 1
= 1
1 a0 = 1
= 31 a2 = 13
= 35 a4 = 35 31 = 15
= 57 a6 = 57 51 = 17
86

and, in general,

am =
y1

Then, we can wwrite

1
a0
m1

as

1
1
1
y1 = 1 x2 x4 x6 x8 ...
3
5
7
We know that the McLaurin series of

1
2

log

1+x
1x in the interval

1 < x < 1

1
1+x
x3
x5
x7
log
=x+
+
+
+ ...
2
1x
3
5
7
If we now calculate

1 21 x log

which is equal to

y1

1+x
1x


1x x+

1 x2

x3
3

x4
3

x5
5

x6
5

x7
7

x8
7


+ ...

...

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

u=

x
a

dy
dy du
dy 1
=
=
dx
du dx
du a


d2 y
d dy 1 du
d2 y 1
=
=
dx2
du du a dx
du2 a2
Substituting into the dierential equation, we get

(a2 a2 u2 )

d2 y 1
dy 1
2(au)
+ n(n + 1)y = 0
du2 a2
du a

(1 u2 )

d2 y
dy
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

y(x) = c1 y1

x
a

Kreyszig, 5.3.2

87

+ c2 y2

x
a

is

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

y +
b(z) = 1

being

and

c(z) = 1

b(z)
c(z)
y + 2 y = 0
z
z
analytical functions at

solution of the form

y = zr

z = 0.

We look for a

am z m

m=0
Its derivatives are

y =

dy
dz
d2 y
dz 2

= z r1
=z

(m + r)am z m

m=0

P
r2

(m + r)(m + r 1)am z m

m=0

Substituting into the dierential equation:

r2

!
(m + r)(m + r 1)am z

+z

r1

m=0

(m + r)am z

m=0

(m + r)(m + r 1)am z m+r +

m=0

(m + r)am z m+r

m=0

!
m

m=0

am z m+r = 0

m=0

((m + r)(m + r 1) + (m + r) 1)am z m+r = 0

m=0

(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

(m + 2)mam z m+1 = 0 = 2 1a1 z 2 + 3 2a2 z 3 + 4 3a3 z 4 + ...

m=0

88

!
am z

=0

which implies

a1 = a2 = a3 = ... = 0.
y = z r1

So, any function of the form

am z m = z(a0 )

m=0
is a solution of the dierential equation.
constant

a0 ,

for instance,

a0 = 1,

In particular, we may choose any

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

y2

=
=

ky1 log(x) + z r2

am z m

m=0

kz log(z) + z 1

am z m

m=0
Let us rst calculate

y 2 = k(log(z) + 1) + z 2

(m 1)am z m

m=0

y2 = kz 1 + z 3

(m 1)(m 2)am z m

m=0
We now substitute into the dierential equation

(m 1)(m 2)am z
+ z k(log(z) + 1) + z
(m 1)am z
m=0



P
kz log(z) + z 1
am z m = 0
m=0





P
P
m1
m1
kz +
(m 1)(m 2)am z
+ kz log(z) + kz +
(m 1)am z
m=0
m=0



P
kz log(z) +
am z m1 = 0

kz

+z

m=0

2kz +

m=0

[(m 1)(m 2) + (m 1) 1] am z m1 = 0

m=0

2kz +

m(m 2)am z m1 = 0

m=0

(1)a1 + 2kz +

m(m 2)am z m1 = 0

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
a solution, so the only novelty brought by this solution is (with

y2 = z 1
89

a0 = 1).

was

Any solution of the dierential equation is of the form

y = c1 y1 + c2 y2 = c1 z +

c2
c2
= c1 (x + 2) +
z
x+2

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

Solve

by making the change of

Solution:

If

z=

x,

1
xy 00 + y 0 + y = 0
4

variable z =
x.

then

z0
y0

=
=

y 00

=
=

= 21 z 1
2 x
dy 0
dy 1 1
dz z = dz 2z
0
dy dz
1
2 dy
dz dx = 2 z
dz+
2
d
y
dy
1
2
3
4 z
dz 2 z
dz

z 1 ddzy2

1 1
2z

With these, we can rewrite the ODE as

z2

1
4

z 2

d2 y
dy
z 3
2
dz
dz

1
dy 1
+ z 1
+ y=0
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
2
1 d y 1 1 dy 1
+ z
+ y=0
4 dz 2
4
dz
4
Multiplying by

4z 2 ,

we get

z2

dy
d2 y
+z
+ z2y = 0
2
dz
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 .
90

Solution:

Let us write the dierent elements we need from the change of vari-

ables

dz
dx
0

y
y 00

=
dy
dz
= dx
= dy

dz dx = y
2
d y
d
dz
= dx2 = dz (y)
dx
= (
y ) = 2 y

Substituting in the dierential equation

z
z2 2
( 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 (

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

variable y = u x, z =
x.

by making the change of

Solution:

If

z=

x,

then

z0

2 x

= 12 z 1

On the other side

y
y0
y 00

u x = uz
 1 1
dy dz
du
dz dx = dz z + u 2 z

=
=
=

dy 0 dz
dzh dx 
1
1 d2 u
2 z  dz 2 z

du
du
dz + dz

1 2 d2 u
du
4z
dz 2 z + 2 dz
2
1 1 d u
1 2 du
4z
dz 2 + 2 z
dz
1 1 d2 u
1 2 du
4z
dz 2 + 4 z
dz

=
=
=

+ (z 2 )

14 z 3

du
dz z

i
+ u 12 z 1

du
dz z + u
1 2 du
1 3
u
4z
dz 4 z
1 3
z
u
4

So, we can rewrite the ODE as

z4

2
1 1 d u
4z
dz 2
2
1 3d u
4 z dz 2

Multiplying the

+ 14 z 2


du 1 3
4 z u + 41 (z 2 + 34 )uz = 0
dz

du 1
3
4 zu + 14 z 3 u + 16
uz = 0
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
whole equation by 4z
, we get
+ 14 z 2

z2

d2 u
du
+z
+ z 2 u 41 u = 0
dz 2
dz
91

/ Z)

z2


du
d2 u
+z
+ z 2 14 u = 0
dz 2
dz

That is Bessel's equation with

1
2 . Since

is not an integer value, its general

solution can be written as

= c1 J 1 ( x) + c2 J

u = c1 J 1 (z) + c2 J

1 (z)
2

1(
2

x)

Finally, we undo the change of variable


y = uz =

x
c1 J 1 ( x) + c2 J 1 ( x)

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

Solve

x2 y 00 + (1 2)xy 0 + 2 (x2 + 1 2 )y = 0
z = x .

by making the change of variables

Solution:

Let us perform the change of variables in two steps. We rst make

the change of variable

z
dz
dx
0

y 00

= x x = z
1
= x1 = z
1
dy
dz
)
= dx
= dy

dz dx
 = y(z


d2 y
dxh2

= yz
= y 2 z

d
dz

22

y(z

dz

idx 1
1 1
+ y z
(z )
+ y(

1)z

Substituting into the ODE we get


2

z (
y 2 z

22

+ 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
(if


/R

2 1 > 0,

in that case the general solution is given

) 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

92

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
by making the change of variable

Solution:

If

y = ux

y0
y 00

y=

u
x2 .

, then

2
+ u(2x3 )
= du
dx x
d2 u 2
3
3
= dx2 x + du
) + du
) + u(6x4 )
dx (2x
dx (2x
2
4
u
= x2 ddxu2 4x3 du
dx + 6x

Substituting in the ODE we get


x

d2 u
x2 2
dx
x1

4x

3 du

dx

+ 6x




du 2
3
u +5
x + u(2x ) + xux2 = 0
dx

d2 u
du
du
4x2
+ 6x3 u + 5x2
10x3 u + x1 u = 0
dx2
dx
dx
x1

du
d2 u
+ x2
+ (x1 4x3 )u = 0
2
dx
dx

Multiplying the equation by

x2

x3

d2 u
du
+x
+ (x2 4)u = 0
dx2
dx

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)

Chapter 6

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

Find the Laplace transform of

cos2 (t).

93

Solution:
L{cos2 (t)}

0
R

cos2 (t)est dt
1+cos(2t) st
e dt
2

R
est dt + 21 cos(2t)est dt
h0
i 0 R
1 st
1
+ 12 cos(2t)est dt
2 s e

11
2s

1
2

1
2

cos(2t)est dt [Re{s} < 0]

Now we make use of the Laplace transform

L{cos(t)} =

s2

s
+ 2

to get

L{cos2 (t)} =

1
1
s
+
2
2s 2 s + (2)2

[Re{s} < 0]

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

Non-existence.

Show that a function like

et

does not fulll the condition

2
t
e M ekt

Solution:

For

k,

any

and

t>0

we have

we can nd

et > 0

so that

2
2
t
e = et .

Let us show that for

such that
2

et > M ekt = elog(M ) ekt


Taking logarithms

t2 > log(M ) + kt
t2 kt log(M ) > 0
Let us nd the point at which the curve crosses 0

t2 kt log(M ) = 0 t =

That is for

t>

k+

k2 +4 log(M )
we have that
2
2

et > M ekt
Kreyszig, 6.1.22
Carlos Oscar Sorzano, Aug. 31st, 2014

94

k 2 + 4 log(M )
2

Show that


L


=

Conclude from this that the conditions for existence are sucient but not necessary for the existence of the Laplace transform.

Solution:

1 st

e
t

t 2 est dt

Let us make the change of variable

R
0

= st t =

d
, dt =
s
s

 1
2
s

e d
s =

1 R
1
s 2 2 e d
0

2 s 2 e s1 d

0
1

= s 2

1
So, there exists the Laplace transform of

t = 0.

1
2

= s 2

p
s

although it is not well dened at

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

Find the inverse Laplace transform of

Solution:
L1

5s+1
s2 25

5L1

s
s2 25

5s+1
s2 25

+ L1

1
s2 25

= 5 cosh(5t) +

1
5

where we have made used of the Laplace transforms

cosh(at)

sinh(at)

s2 a2
a
s2 a2

Kreyszig, 6.1.29
lvaro Martn Ramos, Jan. 11th, 2015

Find the inverse Laplace transform of

12 228
6
s4
s

Solution:
L1 {

12 228
3!
228 1 5!
L { 6 } = 2t3 1.9t5
6 } = 2L1 { 4 }
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
95

sinh(5t)

Solution:
L1 {

4s + 32
s
4
} = 4L1 { 2
} + 8L1 { 2
} = 4 cosh(4t) + 8 sinh(4t)
s2 16
s 16
s 16

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

Find the Laplace transform of

Solution:

t2 e3t

We know that

= s2!3
= F (s a)


L t2
L {eat f (t)}
Both together we have that



L t2 e3t

2!
(s+3)3

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

Find the inverse Laplace transform of

Solution:

21

(s+ 2)4

We know that

n!
= sn+1
= F (s a)

L {tn }
L {e f (t)}
at

Then we have the inverse Laplace transform

L1

 21

and

L1

s4

21

(s+ 2)4

21 1
3! L

 3!
s4

= 27 t3

7 3 2t
2t e

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}
L{y 0 }
L{y 00 }

= Y
= sY y(0)
= 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
96

Y =

11s + 17
11s + 17
1
10
=
=
+
s2 s 6
(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 00 (t)

=
=

y0 (t)
y00 (t)

Then we can rewrite the IVP as

y00 2
y 0 3
y = 0 y(0) = 3, y0 (0) = 17
We know that

L{
y}
L{
y0 }
L{
y 00 }

= Y
= sY y(0)
y (0) y0 (0)
= s2 Y s

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
7 1
13 1
3s + 23
=
=

Y = 2
s 2s 3
(s 3)(s + 1)
2s3
2 s+1
Its inverse Laplace transform is

7 13
y(t) = e3t et
2
2
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 4) =

7 3(t4) 13 (t4)
e
e
2
2

97

Kreyszig, 6.2.15
lvaro Martn Ramos, Jan. 11th, 2015

Solve the Initial Value Problem

y 00 + 3y 0 4y = 6e2t3

Solution:

y(1.5) = 4, y 0 (1.5) = 5

We make a change of variable

t = t 1.5 t = t + 1.5
Then

y 0 (t) = y0 (t)
y 00 (t) = y00 (t)
Then, we can rewrite the IVP as

y00 (t) + 3
y 0 (t) 4
y (t) = 6e2t y(0) = 4, y0 (0) = 5
Making the Laplace transform of both sides we get

(s2 Y 4s 5) + 3(sY 4) 4Y =
(s2 + 3s 4)Y 4s 17 =

6
s2

6
s2

6
+ 4s + 17
s2
3
1
Y =
+
s1 s2

(s + 4)(s 1)Y =

Its inverse Laplace transform is

y(t) = 3et + e2t

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

t cos(4t)
f = t cos(at) Let us

Find the Laplace transform of

Solution:

Let us dene

dierentiate

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

L{f 00 } = 2a

s2

f 00

we get

a
2a2
a2 L{t cos(at)} = 2
a2 F
2
+a
s + a2
98

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
+ a2

s2

Solving for

F =
In particular, for

a=4

s2 a2
(s2 + a2 )2

(as in the problem statement, we get

L{t cos(4t)} =

s2 42
(s2 + 42 )2

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

Find the inverse Laplace transform of

Solution:

We may factorize

20
s3 2s2

as

F =

1 20
s2 s 2

20
1
2t
. The factor 2 translates into
s2 is 20e
s
a double time integral. Let's do it one by one:
The inverse Laplace transform of

1 20
s s 2

Zt


=

20e2 d = 20

e2t 1
2

1 20
s2 s 2

Zt


=

20 2
20
(e
1)d =
2
2

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)

99



e2t 1
t +
2

L{(t 2)u(t 2)} = e2s L{t} =

e2s
s2

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

2
Let us write the function to transform as

Find the Laplace transform of

Solution:

et

f (t) = et u(t) u t

0<t<



= et u(t) et u t

Let us transform each term separately

L{et u(t)} =

1
s1

n
n



o
o
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

1
s1

Altogether

L{f } =

1
1
1 
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

Solution:

t2

(1 < t < 2)

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
+
+
s3
s2
s


2
4
4
L{t2 u(t 2)} = e2s L{(t + 2)2 } = e2s L{t2 + 4t + 4} = e2s
+
+
s3
s2
s
L{t2 u(t 1)} = es L{(t + 1)2 } = es L{t2 + 2t + 1} = es

The Laplace transform of

L{f } = e

is

2
2
1
+ 2+
s3
s
s


e

Kreyszig, 6.3.13
lvaro Martn Ramos, Jan. 11th, 2015

Find the inverse Laplace transform of

6(1 es )
s2 + 9
100

2s

2
4
4
+ 2+
s3
s
s

Solution:
L1

6(1es )
s2 +9

= L1

6
s2 +9

L1

6es
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

Solution:

s+1
(1 + e2(s+1) ) (s+1)
2 +1

Let us nd rst the inverse Laplace transform of the function

G(s) = (1 + e2s )

s
s
s
= 2
+
e2s
s2 + 1
s + 1 s2 + 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:
y(0) = 0

Let us take the Laplace transform of the whole equation.

and

y 0 (0) = 0,

we have

L{y 0 } = sY
L{y 00 } = s2 Y
Then the ODE becomes

s2 Y + 6sY + 8Y =

1
1

s+3 s+5

(s2 + 6s + 8)Y =

s + 5 (s + 3)
(s + 3)(s + 5)

(s + 4)(s + 2)Y =

2
(s + 3)(s + 5)

Y =

2
(s + 2)(s + 3)(s + 4)(s + 5)
101

Since

Y =

1
3

s+2

1
1
1
+
3
s+3 s+4 s+5

Its inverse Laplace transform is


y(t) =


1 2t
1 5t
3t
4t
e
e
+e
e
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
1
8s
+
es
s2 + 4 s2 + 4
8s
1 2
Y (s) = 2
+
es
s + 4 2 s2 + 4
Y (s) =

Now we take the inverse Laplace transform

y(t) = 8 cos(2t) +

1
sin(2(t ))u(t )
2

10
8cos(2t)
y(t)

8
6
4
2
0
2
4
6
8
10

4
t

Kreyszig, 6.5.6

102

Carlos Oscar Sorzano, Aug. 31st, 2014

eat ? ebt with a 6= b


f (t) = eat and g(t) = ebt .

Find the convolution of

Solution:

Let us dene

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
ab sa
 + ba sb

1
1
1

ab sa
sb

The inverse Laplace transform of this expression is

1
(eat ebt )
ab

f (t) ? g(t) =
Kreyszig, 6.5.12

Carlos Oscar Sorzano, Aug. 31st, 2014

Solve the integral equation

Zt
y(t) +

y( ) cosh(t )d = t + et

Solution:

If we take the Laplace transform of this equation we get

1
1
s
= 2+
s2 1
s
s1


1
1
s
= 2+
Y 1+ 2
s 1
s
s1
Y +Y

Y =

1
s2

1
s1
s
s2 1

1+

s1+s2
s2 (s1)
s2 1+s
s2 1

Y =
Y =

s+1
s2

Now, we have the following inverse Laplace transforms

L {s + 1}


L s+1
s
L

 s+1
s2

et
Rt
e d = 1 et

Rt

(1 e )d = t + et 1 = t sinh(t) + cosh(t) 1

Finally,

y = t + et 1
103

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

1
(sa)2

Find the inverse Laplace transform of

Solution:

Let us write

F =

1
1
sasa

So its inverse transform is

f (t) = eat ? eat


Let us calculate the convolution

eat ? eat

Rt

ea ea(t ) d

= eat

Rt

d = teat

0
Finally

1
(s a)2

= teat

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

Find the Laplace transform of

Solution:

3t sinh(4t)

We know the Laplace transform

L{3 sinh(4t)} = 3

s2

4
= F (s)
42

Then, the required Laplace transform can be calculated as

d
L{3t sinh(4t)} = F (s) =
ds
0

4
3 2
s 42


= 3

8s
(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

L{e3t } =

1
s+3

Then, the required Laplace transform can be calculated as

1
1
1
1 d
L{ te3t } = L{te3t } = (F 0 (s)) =
2
2
2
2 ds
104

1
s+3


=

1
2(s + 3)2

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

Find the inverse Laplace transform of

Solution:

log

s+a
s+b

Let us dene

F (s) = log

s+a
= log(s + a) log(s + b)
s+b

Let us calculate its derivative

G(s) = F 0 (s) =

1
1

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

f (t) =

g(t)
eat ebt
=
t
t

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

Solve the ODE system

y10 + y2 = 0
y1 + y20 = 2 cos(t)
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

Y1
Y2

s
1

  

1
1
Y1
=
2 s2s+1
s
Y2

1 

1
s 1
2 s2s+1
1 
s


1
s 1
= s211
2 s2s+1
1 s
 s 
s2 +1
=
1


s2 +1

105

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

Y1 =

Y2 =

   
s + 1 4
Y1
3
=
3 s + 4
Y2
4


3 4


4 s+4
3s + 28
3s + 28
=
=
2
2

s + 5s + 16
s + 1 4
s + 25 +
3
s+4


s+1 3


3 4
4s + 13
4s + 13
=
=
2
2

s
+
5s
+
16
s + 1 4
s + 25 +
3
s+4

39
4

39
4

Their inverse Laplace transforms are

y1 (t)




3s

28

+L
2
(s+ 52 )+ 39
4



39
s
2
1
1
2

= 3L
+ 28 39 L
2
5 2
39
(s+ 25 ) + 39
4
 (s+ 2) + 4
 
= 3 cos 239 t + 5639 sin 239 t


4s+13
1
y2 (t) = L
5 2
39
 (s+ 2 ) + 4 


4s
13
1
1
= L
+L
2
5 2
39
(s+ 52 )+ 39
4
(s+ 2 ) + 4 


39
s
2
1
1
2

= 4L
+ 13 39 L
2
2
s+ 5 + 39
(s+ 25 ) + 39
4
4
 ( 2) q
 
39
sin
t
= 4 cos 239 t + 26
3
2
=

3s+28
2
(s+ 52 ) + 39
4
2

5
(s+ 2 )

+ 39
4

106

Chapter 11

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

x2 (between < x < ) which is


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.
Find the Fourier series of the function

a0
an

1
2

x2 dx =

x2 cos(nx)dx =

4
n2 cos(n)


1 x3
2 3

Finally, the Fourier series of

2
3

2 2
1 (n x 2) sin(nx)+2nx cos(nx)

n3

= (1)n n42
x2

< x <

between

is

x2 =

2 X
4
+
(1)n 2 cos(nx)
3
n
n=1

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

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
Find the Fourier series of the function

need to compute all the terms of the Fourier series

a0
an
bn

=
=
=

1
2
1

2
R
0
2
R
0
2
R

x2 dx =

1 x3
2 3

x2 cos(nx)dx =
x2 sin(nx)dx =

Finally, the Fourier series of

x2

8 2
3

2 2
1 (n x 2) sin(nx)+2nx cos(nx)

n3

2 2
1 (2n x ) cos(nx)+2nx sin(nx)

n3

= 4
n

0
2

between

0 < x < 2

is

X
2 X
4
n 4
x =
+
(1) 2 cos(nx)
sin(nx)
3
n
n
n=1
n=1
2

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

Calculate the Fourier series of period

107

p=1

of the function below

4
n2

Solution:

We apply the denition of the dierent coecients, where

a0
an

=
=
=
=

1
2L
1
L

RL

f (x) =

RL

R2

xdx =

x2 2
2
0

=
=
=

1
8

f (x) cos

n
L x

R2

dx = 2 x cos (2nx) dx
0
1


cos(n)
2nx sin(2nx)+cos(2nx) 2
2
= 2 42 n2 412 n2
4 2 n2
0

0
n = 2
(1)n 1
2 2 n2 =
21 2 n 6= 2
L

bn

L=

1
L

RL

f (x) sin

n
L x

R2

dx = 2 x sin (2nx) dx
0
1


n cos(n)
sin(2nx)2nx cos(2nx) 2
0
2
=2
4 2 n2
4 2 n2
L

(1)n+1
2n

The Fourier series is, then

y(x)

a0 +

an cos

n=1

n
L x

bn sin

n=1

n
L x

X
1 X (1)n 1
(1)n+1
+
cos
(2nx)
+
sin (2nx)
8 n=1 2 2 n2
2n
n=1

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

yn = C 0 +

Cn cos(nt + n )

n=1

108

1
2

What happens if we replace


What is the ratio of the new

Solution:

Cn

r(t)

with its derivative, the rectangular wave?

to the old ones?

Let us consider the Fourier series of the input function

r(t) = c0 +

r(t)

cn cos(nt + n )

n=1
Its derivative, assuming the series is convergent, can be calculated as

r (t) =

(cn n sin(nt + n )) =

n=1
Since the parameters
reason, for the input

cn n cos(nt + n + 2 )

n=1

m, c and k are constant, then the system is linear. For this


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
Kreyszig, 11.3.6
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)
109

nCn

Equating coecients we nd that

b=B=0
1
2 2
1
A= 2
2
a=

The general solution of the equation is

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

1
1
sin(t) + 2
sin(t)
2

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


if you set

R
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

p0 = f exp

Z


f dx = f p

Then

f py 0 + py 00 + (pg + hp)y = 0
Note that

is never 0, then dividing by

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
110

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
If

= 0,

c1 = c2 = 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
y 0 (L) = 0

= c1
= c1 sin(L) + c2 cos(L) = c2 cos(L) L =

+ k =

+2k
2L

That is the functions

y = sin(x) =

+2k
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:

(Set

y0
x

0
+ ( + 1)

y
= 0 y(1) = 0, y(e ) = 0
x3

x = et ).

Solution:
y0

y 00

If we make the change of variable

dy dt
dy 1
dy t
dy
dx = dt dx = dt x= dt e 
0
0
dy
dy dt
dy t 1
d
dx = dt dx = dt
dt e
x

111

x = et t = log(x),

d2 y t
dt2 e

dy t
dt e

et =

then

d2 y 2t
dt2 e

dy 2t
dt e

We note that

y
x

0

00

y xy
=
=
x2

d2 y 2t
dt2 e

dy 2t
dt e

et

dy t
dt e

e2t

Then we can rewrite the problem as a function of

dy
d2 y 3t
e
2 e3t
dt2
dt

d2 y 3t
dy
e
2 e3t
dt2
dt

y(t)

+ ( + 1)ye3t = 0 y(0) = 0, y() = 0

dy
d2 y
2
+ ( + 1)y = 0 y(0) = 0, y() = 0
2
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

p=e

(2)dt

= e2t

q = pg = e2t
h = hp = e2t
So, in the Sturm-Liouville form the problem becomes

d
dt

e2t

dy
dt

+ (e2t + e2t )y = 0

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
If

= 0,

c1 = c2 = 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.
112

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 eigenvalue is

= k2 .

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

(x + 1)2
function f is a series

Find the Fourier-Legendre series of the polynomial

Solution:

The Fourier-Legendre series of the

of the form

f=

expansion

X
hf, Pm i
Pm (x)
kPm k2
m=0

where

kPm k2 =

2
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
2 (3x
1
3
2 (5x

P2 (x) =
P3 (x) =

1)
3x)

To perform the Fourier-Legendre expansion, let us perform the following


calculations

(x + 1)2 , P0 (x)

R1

(x + 1)2 dx =

kP0 k2


(x + 1)2 , P1 (x)

=
=

2
20+1
1
R

=2

(x + 1)2 xdx =

kP1 k2


(x + 1)2 , P2 (x)

kP2 k2


(x + 1)2 , P3 (x)

=
=

kP3 k2

8
3

2
21+1
R1
1

2
3

(x + 1)2 21 (3x2 1)dx =

2
22+1
R1
1

4
3

4
15

2
5

(x + 1)2 21 (5x3 3x)dx = 0

2
23+1

113

2
7

Actually, since

is a polynomial of degree 2, and Legendre polynomials are

[1, 1],


(x + 1)2 , Pm (x) = 0).

a basis of polynomials in the domain

m3

are 0 (

we have that all coecients for

Finally, the Fourier-Legendre expansion is

(x + 1)2

=
=

h(x+1)2 ,P0 (x)i


8
3

kP0 k2

4
3
2
3

x+

P0 +

4
15
2
5

h(x+1)2 ,P1 (x)i


kP1 k2

1
2
2 (3x

P1 +

h(x+1)2 ,P2 (x)i


kP2 k2

P2

1)

4
21
+ 2x +
(3x2 1)
3
32

Kreyszig, 11.9.6
Carlos Oscar Sorzano, Dec. 19th, 2014

Find the Fourier transform of

Solution:

f (x) = e|x|

1
f() =
2

f()

=
=

1
2
1
2

2
2

2
2

=
=

f (x)eix dx

Substituting in this formula the value of

( < x < )

The denition of the Fourier transform is

f,

we have

f (x)eix dx
e|x| eix dx

ex eix dx

e(1+i)x dx

0

e(1+i)x
2

q2 (1+i) 0
2 1
1+i

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.
114

by integration.

Solution:

Let us calculate the dierent partial derivatives needed to substitute

in the wave equation

ut
utt
ux
uxx

= 2t
= 2
= 2x
= 2

The wave equation states

2 = c2 2
c = 1. In Matlab:
[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')

which is true for

0
2
1.5

2
1

0.5

1
0

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

Solution:

c.

Let us calculate the dierent partial derivatives needed to substitute

in the wave equation

ut
utt
ux
uxx

=
=
=
=

a cos(at) sin(bx)
a2 sin(at) sin(bx)
b sin(at) cos(bx)
b2 sin(at) sin(bx)
115

The wave equation states

a2 sin(at) sin(bx) = c2 (b2 sin(at) sin(bx))


2

c = ab2 . In Matlab:
[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')
which is true for

0.5

0.5

1
10
10
5

0
5
t

10

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
y

a parameter, then we can solve the PDE as if it were an ODE on

uy = y 2 u
du
= y 2
u
y3
+ C(x)
3
 3
y
u = C(x)exp
3

log |u| =

Kreyszig, 12.4.11

116

if it were

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

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
117

E
(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

with

c2 =

that the motion corresponding to initial displacement


velocity zero is

u=

u(x, 0) = f (x)

and initial

An sin(pn x) cos(pn ct)

n=0
with

2
An =
L

ZL
f (x) sin(pn x)dx
0

and

pn =

Solution:

(2n + 1)
2L

Let us rst check that the suggested solution satises the boundary

conditions:

u(0, t) = 0
u(0, t)

An sin(pn 0) cos(pn ct) = 0

n=0

ux (L, t) = 0
ux
ux (L, t)

n=0

An pn cos(pn x) cos(pn ct)


An pn cos(pn L) cos(pn ct) = 0

n=0
But

pn L =

(2n + 1)
(2n + 1)
L=
2L
2

that is

pn L =

3 5
,
,
, ...
2 2 2

and

cos(pn L) = 0 ux (L, t) = 0
Let us check now the initial conditions

u(x, 0)

u(x, 0) = f (x)

n=0
That is

u(x, 0)

is a Fourier sine series, but

ut
utt
ux
uxx

An are
f (x).

precisely the corresponding

is a solution of the PDE

= c

An pn sin(pn x) sin(pn ct)

n=0

P
2

= c
=

An sin(pn x)

n=0

Fourier coecients, so the series add up to


Let us check now that

An sin(pn x) cos(pn c0) =

n=0

An p2n sin(pn x) cos(pn ct)

An pn cos(pn x) cos(pn ct)

n=0

n=0

An p2n sin(pn x) cos(pn ct)


118

The PDE states

utt = c2 uxx
c2

An p2n sin(pn x) cos(pn ct) = c2

n=0

!
An p2n sin(pn x) cos(pn ct)

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,

u(x, 0) = f (x)

ux (0, t) = 0, ux (L, t) = 0

and

and separation of variables the solution of the heat equation

ut = c2 uxx
gives the solution

u(x, t) = A0 +

An cos

 nx 
L

n=1
with

1
A0 =
L

e(

cn
L

ZL
f (x)dx
0

An =

2
L

ZL
f (x) cos

 nx 
L

dx

Solution:

Let us rst check that the suggested solution satises the boundary

conditions:

ux (0, t) = 0
ux
ux (0, t)

n=1

P
n=1

An n
L sin

nx
L

e (

cn
L

An n
L sin

n0
L

e(

cn
L

An n
L sin

nL
L

=0

ux (L, t) = 0
ux (L, t)

n=1
because


sin

nL
L

=
=

A0 +
A0 +

e (

cn
L

=0


= sin(n) = 0

Let us check now the initial conditions

u(x, 0)

P
n=1

u(x, 0) = f (x)

An cos

nx
L

An cos

nx
L

n=1

119

e (

cn
L

That is

u(x, 0) is a Fourier cosine series,

Let us check now that

is a solution of the PDE

ut

ux

n=1

n=1

uxx

An are precisely the corresponding


f (x).

but

Fourier coecients, so the series add up to

An cos

nx
L

An n
L sin

n 2
L

An

n=1

2

cn 2 ( cn
e L )t
L

nx
L

e(

nx
L

cos

cn
L

e (

cn
L

The PDE states

ut = c2 uxx

An cos

n=1

 nx   cn 2
L

( cn
L ) t

=c

An

 n 2

n=1

cos

 nx 
L

( cn
L ) t

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
u(x, t) =

(Ap cos(px) + Bp sin(px))ec

2 2

p t

dp

0
with

1
Ap =

Z
f (v) cos(pv)dv

1
Bp =

Z
f (v) sin(pv)dv

solve the 1D heat equation

ut = c2 uxx
when

u(x, 0) = f (x) =

Solution:
and

We simply need to substitute

Bp
Ap
Bp

=
=

1
1 + x2
1
1+x2 in the formulas for

f (x) =

1
|p|
)
(e

1
1+v 2

cos(pv)dv =

1
1+v 2

sin(pv)dv = 0

So the solution of the 1D heat problem is

Z
u(x, t) =

2 2

e|p| cos(px)ec

120

p t

dp

= e|p|

Ap

Anda mungkin juga menyukai