1
Introduction to Ordinary Differential
Equations
Introduction
These notes began as a way to introduce some of the techniques using to solve certain special classes of Ordinary
Differential Equations to a Student that was assigned to me from the SEEK DEPT AT CCNY. It turned out that
there was not enough time to express in detail each Method. As soon as I started these notes, I had to stop! because
the student was not mathematically mature to follow along and there simply was not enough time. Consequently,
these notes evolved into a series of problems with detailed solutions while showcasing each of the methods used in a
course offered at CCNY. My hope was that my student would be able to learn by seeing how it is done.
How to solve the General First-Order Linear Ordinary Differential Equation
dy
+ P (t) y = Q(t).
(∗)
dt
First observe that the left hand side of equation is an exact differential. To make it exact, we need a function μ(t)
such that
dy
μ(t)
+ P (t) y μ(t) = Q(t) μ(t).
(∗∗)
dt
and
d μ(t)
= P (t) μ(t)
dt
holds. This means that the function μ(t) (called an integrating factor) must be of the form
μ(t) = e P (t) dt
(1)
y + P (t) y = Q(t)
Thus (**) becomes
e
P (t) dt
d
or
dy
+ P (t) y e
dt e
P (t) dt
P (t) dt
= Q(t) e
e
P (t) dt
.
·y
Next, integrating on both sides of the equation above as follows
P (t) dt
d e
y =
Q(t) e
we obtain
P (t) dt
y =
Q(t) e
P (t) dt
P (t) dt
dt
dt + C.
Finally, it follows that the general solution of (*) is given as
y = e− P (t) dt
Q(t) e P (t) dt dt + C e−
P (t) dt
.
Exercise 1. Use the formula to write down the general solution to the differential equation
y +
1
y = t3 .
t
Exercise 2. Find the solution to the initial-value Problem
t y + 2 y = 4 t2
y(1) = 2.
–To be Continued–
MY STUDENT’S FIRST TEST
Instructions: The first three problems are worth 26 points each while the last two are 11 points
each. Please show all your work and write so that I can read. Good luck!
Problem 1. A 50-gal tank originally contains 10 gallons of fresh water. At t = 0, a brine solution
containing 1 lb of salt per gallon is poured into the tank at the rate of 4 gal/min, while the
well-stirred mixture leaves the tank at the rate of 2 gal/min. Find amount of salt in the tank at
the moment when it begins overflowing.
Solution.
Let Q = Q(t) denote the amount of salt (in pounds) remaining in the tank at time t
(in minutes). Then the rate (i.e., the amount of salt per minute) at which only salt enters the
tank is given by
1 lb 4 gal
4 lb
rate in =
·
=
.
gal min
min
The rate at which only salt leaves the tank is given by
rate out =
Q
lb 2 gal
Q lb
·
=
.
10 + 2t gal min
5 + t min
Next,
dQ
Q lb
= rate in − rate out = 4 −
.
dt
5 + t min
At the instant t = 0, there is no salt in the tank, i.e., Q0 = Q(0) = 0. Now we must solve the
initial-value problem
1
dQ
+
Q = 4;
Q(0) = 0; t ≥ 0.
dt
5+t
C
2t2 + 20t
+
.
5+t
5+t
Imposing the initial condition Q(0) = 0 leads to C = 0 and so the amount of salt in the tank at
any time t ≥ 0 is the solution to the initial-value problem and is given by
.·. the general solution is Q(t) =
Q(t) =
2t2 + 20t
;
5+t
t ≥ 0.
Observe that tank acquires 2 gallons of solution each minute and so a 50 gallon tank which already
contains 10 gallons of water will overflow in 20 minutes, therefore the amount of salt in the tank
when it begins to overflow is Q(20) pounds which is
Q(20) =
1200
2(20)2 + 20(20)
=
= 48 pounds of salt.
5 + 20
25
Problem 2.
A 128-lbs weight is attached to a spring having a spring constant of 64-lbs/ft. The
weight is started in motion with no initial velocity by displacing it 6 in above the equilibrium position an by simultaneously applying to the weight an external force F (t) = 8 sin(4t). Assuming
no air resistance, find the subsequent motion of the weight.
Let u = u(t) be the position of the weight at time t ≥ 0 (t is unit time). Given weight
= 128
= 4 slugs and the
W = 128-lbs and spring constant k = 64-lb/ft. The mass m = W
g
32
k
64
damping constant γ = 0 (we are assuming no damping), ω =
m =
4 = 4. We are also
Solution.
given that u(0) = − 12 ft and u (0) = 0. Now we must solve the initial-value problem
u + ω 2 u = u + 16 u = 2 sin(4t);
1
u(0) = − ; u (0) = 0.
2
This is a non-homogeneous equation with constant coefficients and so the solution to the associated
homogeneous equation is given by uc (t) = c1 sin(ωt) + c2 cos(ωt). Thus we will need a particular
solution up (t) and this is of the form:
up = up (t) = t[A sin(4t) + B cos(4t)]
where the constants A and B are to be determined. Now
up = t[4A cos(4t) − 4B sin(4t)] + [A sin(4t) + B cos(4t)]
and
Next,
up = t [−16A sin(4t) − 16B cos(4t)] + [8A cos(4t) − 8B sin(4t)].
up + 16 up = 8A cos(4t) − 8B sin(4t) = 2 sin(4t).
Therefore, A = 0 and B = − 14 and so up (t) = − 14 t cos(4t). Hence the general solution of the
non-homogeneous equation is
1 u(t) = uc (t) + up (t) = c1 sin(4t) + c2 − t cos(4t).
4
Now u (t) = 4c1 cos(4t) + (−4c2 + t) sin(4t) − 14 cos(4t) so that u(0) = c2 = − 12 and u (0) =
1
. The solution to the given initial-value problem is therefore
4c1 − 14 = 0 ⇔ c1 = 16
u(t) =
1
1 1
sin(4t) −
+ t cos(4t)
16
2
4
Problem 3.
Find the general solution of
y +
1 1
y − 2 y = ln(x)
x
x
if two solutions of the associated homogeneous problem are known to be x and x1 .
Solution.
First, rewrite the given equation as
x2 y + x y − y = x2 ln(x)
and observe that it is a non-homogeneous second degree Cauchy-Euler equation with α = 1 and
β = −1. Thus the characteristic equation is:
r 2 + (α − 1)r + β = r 2 − 1 = 0; where r1 = 1 and r2 = −1.
The solution of the associated homogeneous problem is
yc (x) = c1 xr1 + c2 xr2 = c1 x +
which verifies that the given y1 (x) = x and y2 (x) =
solutions of the associated homogeneous problem
1
x
c2
x
are indeed two linearly independent
x2 y + x y − y = 0.
Next, we will need a particular solution yp (x) of the given non-homogeneous equation of the form
yp (x) = v1 (x) y1(x) + v2 (x) y2 (x)
where the functions v1 (x) and v2 (x) are to be determined. For this, recall that v1 (x) and v2 (x)
are given by
y2 (x) x2 ln(x)
1
1 3
1
dx =
x2 ln(x) dx = x3 ln(x) −
x
v1 (x) = −
W (y1 , y2 )(x)
2
6
18
and
v2 (x) =
y1 (x) x2 ln(x)
1
dx =
W (y1 , y2 )(x)
2
x4 ln(x) dx =
1 5
1 5
x ln(x) −
x .
10
50
Now we see that
1
1 3
1 5
11 5
yp (x) = x
x ln(x) −
x +
x ln(x) −
x
6
18
x 10
50
.
1 4
x (15 ln(x) − 8)
=
225
3
.·. the general solution we seek is
y(x) = yc (x) + yp (x) = c1 x +
1 4
c2
+
x (15 ln(x) − 8)
x
225
Problem 4.
Solve the initial-value problem
(x2 + 1) dx +
Solution.
follows:
1
dy = 0;
y
y(0) = 1.
Observe that the given differential equation is separable. Thus we simply integrate as
dy
2
=
d(C).
(x + 1) dx +
y
So our general solution is
1 3
x + x + ln |y(x)| = C.
3
Imposing the initial condition y(0) = 1 we get that C = 0 and so the solution to the given
initial-value problem is
1 3
y(x) = e− 3 x − x
Problem 5.
Is the differential equation below exact?
(2 + y ex y ) dx + (x ex y − 2 y) dy = 0.
If it is, find the solution.
Observe that M (x, y) = 2 + y ex y and N (x, y) = x ex y − 2 y so that My (x, y) =
xy exy + exy and Nx (x, y) = xy exy + exy . Since My (x, y) = Nx (x, y), the given differential
equation is exact. There exists a function φ(x, y) such that
Solution.
φx (x, y) = M (x, y) = 2 + y ex y
and φy (x, y) = N (x, y) = x ex y − 2 y.
Hence
φ(x, y) =
Now
φy (x, y) =
(2 + y exy )dx = 2x + exy + G(y).
∂
(2x + exy + G(y)) = x exy + G (y) = x exy − 2y.
∂y
This implies that G (y) = −2y and so G(y) = −y 2 .
.·. we give the solution implicitly as φ(x, y) = 2x + exy − y 2 = C where y = f (x).
END OF THE STUDENT’S FIRST TEST (HE FAILED IT BY THE WAY!)
Final Examination of The City College of New York, ( May 2005 )
Problem 1.
Solve the initial value problem:
y − 4 y + 4 y = x2 + 12 e2 x ; y(0) = 1, y (0) = 0.
Solution.
Method 1. We shall use the Laplace Transforms as follows: L {y(x)} = Y (s)
L {y } − 4 L {y } + 4 Y (s) = L {x2 } + 12 L {e2 x }
2!
12
(s2 − 4 s + 4) Y (s) = 3 +
s
s−2
12
2
+
.·. Y (s) = 3
2
s (s − 2)
(s − 2)3
Now we go off and do a partial fraction decomposition of Y (s) as follows:
Y (s) =
2
s3 (s −
2)2
+
B
F
12
A
C
E
G
+ 2 + 3+
+
=
+
3
2
(s − 2)
s
s
s
s−2
(s − 2)
(s − 2)3
So we have
A s2 (s − 2)3 + B s(s − 2)3 + C(s − 2)3 + E s3 (s − 2)2 + F s3 (s − 2) + G s3 = 12 s3 + 2s − 4
1
.
2
s = 2 ⇔ 8G = 96 ⇔ G = 12.
1
1
5
7
B = ; C = ; E = ; F = − ; G = 12.
2
2
8
4
1 1
7
1
1 1
5 1
12
+
−
+
+
+
2
3
2
2s
2s
8 s−2
4 (s − 2)
(s − 2)3
1!
7
1!
1 2!
5 1
2!
−
+
+
+6
1+1
2+1
1+1
s
4s
8 s−2
4 (s − 2)
(s − 2)2+1
s = 0 ⇔ −8 C = −4 ⇔ C =
3
;
8
31
.·. Y (s) =
8s
1
31
+
=
8s
2
A =
Finally, we can write our solution to the initial value problem as
y(x) = L −1 {Y (s)} =
1
1
3
5
7
+ x + x2 + e2 x − x e2 x + 6 x2 e2 x
8
2
4
8
4
Method 2. We shall use the Method of Annihilators (also known as The Method of Undetermined
dy
so that D2 y =
Coefficients) as follows: For each n ∈ N we define the differential operator Dy = dx
d2 y
,
dx2
n
d y
2
2
. . . , Dn y = dx
n etc. We also define the differential operator f (D) = D −4D+4 = (D−2) .
Then the given initial value problem can be written in compact form as
f (D)y = x2 + 12 e2 x ; y(0) = 1, y (0) = 0.
(1)
Notice that D3 (x2 ) = 0 and (D − 2)(12 e2 x ) = 0 and so H(D)(x2 + 12e2 x ) = D3 (D − 2)(x2 +
12e2 x ) = 0. Consider the homogeneous equation
H(D)f (D)y = 0.
(2)
Assuming a solution of (1) of the form y = erx , we see that the characteristic equation of (2) is
r 3 (r − 2)3 = 0 and so the roots are 0, 0, 0, 2, 2, 2. Therefore the general solution of (1) is
y = y(x) = (c1 + c2 x) e2 x + A1 + A2 x + A3 x2 + A4 x2 e2 x
yc (x)
yp (x)
where yc = yc (x) = (c1 + c2 x) e2 x is the solution of the homogeneous equation f (D)y = 0
and yp = yp (x) = A1 + A2 x + A3 x2 + A4 x2 e2 x is a particular solution of the non-homogeneous
equation f (D)y = x2 + 12 e2 x . In order that y(x) be a solution to the given initial value problem,
we must determine the constants c1 c2 , A1, A2 , A3 , and A4 . For the constants A1 , A2 , A3 , A4 we
consider the non-homogeneous equation
f (D)y = f (D)(yc + yp ) = f (D)yc + f (D)yp = f (D)yp = x2 + 12 e2 x .
Then we have
f (D)yp = 4A1 − 4A2 + 2A3 + (4A2 − 8A3 ) x + 4A3 x2 + 2A4 e2 x = x2 + 12 e2 x .
So we have the system of equations:
4A1 − 4A2 + 2A3
4A2 − 8A3
4A3
2A4
for which we find that A1 =
3
8;
A2 =
1
2;
A3 =
1
4;
=
=
=
=
0
0
1
12
A4 = 6. Thus we see that
y(x) = yc (x) + yp (x) = (c1 + c2 x) e2 x +
1
1
3
+ x + x2 + 6 x2 e2 x .
8
2
4
To determine the arbitrary constants c1 and c2 we impose the initial conditions y(0) = 1 and
y (0) = 0 so that
3
5
= 1 ⇒ c1 =
y(0) = c1 +
8
8
and
5
1
7
+ c2 + = 0 ⇒ c2 = −
y (0) =
4
2
4
5
7
1
1
3
− x e2 x + + x + x2 + 6 x2 e2 x
.·. y(x) =
8
4
8
2
4
which agrees with our solution using the Laplace Transforms.
Method 3. Method of Variation of Parameters (which seems to be the easiest way!). YOU
SHOULD TRY! Problem 2.
Solve the ODE
y 1
1
y cos(x y) +
dx + x cos(x y) + ln(x) + y dy = 0
2x
2
e
Solution.
Observe that the given ODE is in differential form: M (x, y) dx + N (x, y) dy = 0
where M (x, y) = y cos(x y) + 2yx and N (x, y) = x cos(x y) + 12 ln(x) + e1y . Now notice that
My (x, y) = cos(x y) − xy sin(x y) + 21x = Nx (x, y) and so the ODE is exact. Thus there is a
function F (x, y) = C with y = f (x) on some open interval I such that Fx (x, y) = M (x, y) and
Fy (x, y) = N (x, y).
y y
F (x, y) =
y cos(x y) +
dx = sin(x y) + ln(x) + φ(y).
2x
2
Fy (x, y) = x cos(x y) +
1
1
1
ln(x) + φ (y) = x cos(x y) + ln(x) + y
2
2
e
.·. φ (y) = e−y and so φ(y) = −
1
ey
Now we implicitly give our solution to the ode as
sin(x y) +
y
1
ln(x) − y = C
2
e
3. Find the general solution to the nonhomogeneous equation
P (D)y =
ex
(where P (D) = (D − 1)2 or
x
y − 2 y + y =
ex
.
x
Notice that we cannot annihilate the function x−1 ex since x−1 is not a polynomial.
Therefore we shall use The Method of Variation of parameters: First consider the associated
homogeneous equation P (D)y = 0 of which y1 (x) = ex and y2 (x) = x ex are two linearly
independent solutions whose Wronskian
Solution.
W [y1 , y2 ] = e2 x (x + 1) − x e2 x = e2 x = 0
for all x. Assume a particular solution of the nonhomogeneous equation of the form
yp (x) = v1 y1 + v2 y2
where v1 and v2 are functions to be determined. The functions v1 and v2 are given as follows:
v1 = −
and
v2 =
x
x ex ex
dx = −
e2 x
x
ex ex
dx =
e2 x
dx = − x
dx
= ln |x|.
x
So
yp (x) = −x ex + x ex ln |x|;
but notice that −x ex is already part of yc (x) = c1 ex + c2 x ex and so
yp (x) = x ex ln |x|.
Thus our general solution to the given nonhomogeneous equation is therefore
y(x) = yc (x) + yp (x) = c1 ex + c2 x ex + x ex ln |x|.
4. Solve the ODE
Solution.
x y − 2 y = x y + x ex
We shall use the Method of Integrating factors. First observe that the equation is a
linear first order nonhomogeneous ODE. Second we assume x = 0. So we write the equation in
standard form (y + p(x) y = q(x)) as follows:
2
y + − − 1 y = ex .
x
2
− p(x) dx
= C e ( x +1) dx = C e2 ln |x| + x = C x2 ex
yc (x) = C e
and
−
p(x) dx
yp (x) = e
2 x
= x e
x
−2
q(x) e
p(x) dx
2 x
ex
dx
x2 ex
= x e
dx = − x e
x
.
Thus the general solution to the given nonhomogeneous ODE is therefore
y(x) = yc (x) + yp (x) = (c1 x2 − x) ex
5. For the ODE
2 x y − y + y = 0
(a) Show that x = 0 is a regular singular point.
(b)
(c)
Find the indicial equation and the recurrence relation corresponding to the larger root.
Find the first four terms of the series solution valid near x > 0 corresponding to the larger
root.
Solution.
Part (a): P (x) = 2 x; Q(x) = −1; R(x) = 1. Now P (x) = 2 x = 0 ⇒ x = 0 which tells
us that x = 0 is a singular point. Next,
lim x p(x) = lim x
x→0
x→0
−1 Q(x)
1
1
= lim x
= − lim
= −
x→0
x→0 2
P (x)
2x
2
and
lim x2 q(x) = lim x2
x→0
x→0
1 R(x)
1
= lim x2
= lim x = 0.
x→0
x→0 2
P (x)
2x
Since the two limits above are finite, then we know that the singular point x = 0 is also regular
and so x = 0 is a regular singular point.
Part (b): Assume a Frobenius series solution y(x) of the form
y(x) =
∞
an xn+r = xr (a0 + a1 x + a2 x2 + a3 x3 + · · · + an xn + · · · )
(1)
n=0
where r is a constant to be determined and x > 0. Substituting this series into the given ODE
we get
2x y (x) − y (x) + y(x) =
∞
2(n + r − 1)(n + r) an xn+r−1 −
n=0
= (2r − 3) r a0 x−1 xr +
∞
n=k+1
(2r − 3) r a0 x−1 xr +
∞
(n + r) an xn+r−1 +
n=0
(2n + 2r − 3)(n + r) an xn+r−1 +
n=1
∞
∞
n=0
n=k
[(2k − 1 + 2r)(k + r + 1) ak+1 + ak ] xk+r = 0
k=0
Since a0 = 0, then the indicial equation is
(2r − 3) r = 0
an xn+r
n=0
an xn+r
∞
.
with roots r1 =
3
2
(larger root) and r2 = 0. The general recurrence relation is
ak+1 = −
ak
, k = 0, 1, 2, . . .
(2k − 1 − 2r)(k + r + 1)
The recurrence relation corresponding to the larger indicial root r1 =
ak+1 = −
ak
,
(k + 1)(2 k + 5)
Now we have
3
2
is
k = 0, 1, 2, . . . .
a0
1·5
a1
−
2·7
a2
−
3·9
..
.
an−1
−
n · (2n + 3)
a1 = −
a2 =
a3 =
..
. =
an =
Therefore
an =
(−1)n a0
, n = 1, 2, 3, . . . .
n! (5 · 7 · 9 · · · · (2n + 3))
The Frobenius series solution for the larger indicial root r1 =
y(x) = c1 y1 (x) = c1 x
3/2
3
2
is
∞
(−1)n xn
x
x2
x3
1−
+
−
+
.
5
70
1890
n!(5 · 7 · 9 · · · 2n + 3)
n=4
It is called a Frobenius Series because the powers of x are allowed to be arbitrary real numbers
instead of the more familiar Taylor Series where the powers of x are only allowed to be nonnegative
integers. Notice that for the smaller indicial root r = 0 we would obtain a traditional Taylor
Series solution.
The recurrence relation corresponding to the indicial root r = 0 is
ak
, k = 0, 1, 2, . . .
ak+1 = −
(2k − 1)(k + 1)
a0
a1 = −
−1 · 1
a1
a2 = −
1·2
a2
a3 = −
3·3
a3
a4 = −
5·4
..
..
. = .
an−1
an = −
(2n − 3) · n
Thus we get that
(−1)n a0
an =
, n = 1, 2, 3, . . .
n!(−1 · 1 · 3 · 5 · · · (2n − 3))
Therefore the Frobenius series corresponding to r = 0 is
∞
∞
1
y(x) = a0 +
a n xn = a 0 1 +
(−1)n
xn
n!(−1 · 1 · 3 · 5 · · · (2n − 3))
n=1
n=1
6. Use separation of variables to replace the partial differential equation:
x t uxx + ux t + t ux = 0,
where u = u(x, t) is a function of x and t, by two ordinary differential equations (Do not Solve
the two O.D.E’s!).
Solution.
This is New! We assume a solution u(x, t) of the form
u(x, t) = X(x) · T (t).
Then
x t uxx + uxt + t ux = x t X (x) · T (t) + X (x) · T (t) + t T (t) X (x) = 0
or
x t X (x) T (t) + X (x) (T (t) + t T (t)) = 0.
Separating the variables by dividing (1) by
t T (t) X (x)
(1)
we get:
1 T (t)
x X (x)
+
= 0.
X (x)
t T (t)
(2)
or
1 T (t)
x X (x)
=
−
= −λ.
X (x)
t T (t)
Hence we can replace the given PDE by the following two ODEs
(3)
⎧
⎨ x X (x) + λ X (x) = 0
⎩
T (t) − λ t T (t) = 0.
7. Use the Laplace Transform method to solve the following ODE:
y + 4 y = 2; y(0) = 1; y (0) = 3
Solution.
This is a forced undamped motion. Recall My Laplace Transform formula for this type
of equation: P (D)y = G(t), y(0) = α and y (0) = β with P (D) = D2 + ab D + ac is
L {y(t)} = F (s) =
(s + ab )y(0) + y (0) + Y (s)
P (s)
where Y (s) = L {G(t)} and P (D) is a second-order harmonic Oscillator. Since P (D) = D2 + 4,
then P (s) = s2 + 4 and so we have a = 1, b = 0 and y(0) = 1, y (0) = 3 and Y (s) =
L {G(t)} = L {2} = 2s . So substituting the values into the formula we get that
s + 3 + 2s
s2 + 4
s
2
1 1
1
3
=
+
+
(by Partial fractions of course!)
2 s
2 s2 + 4
2 s2 + 4
L {y(t)} = F (s) =
Now
s 2 1 −1 1 1
3
L
+ L −1 2
+ L −1
2
s
2
s +4
2
s2 + 4
So that our solution y(t) is given as
y(t) = L −1 {F (s)} =
y(t) = L −1 {F (s)} =
1
3
1
+ cos(2 t) + sin(2 t)
2
2
2
Problem 8.
Find the Fourier Series for
⎧
⎨ x + 2 if − 2 ≤ x ≤ 0;
f (x) =
⎩
2 − x if 0 < x ≤ 2;
where f (x + 4) = f (x) for all x.
y
2
1
−7
−6
−5
−4
−3
−2
−1
−1
1
2
3
4
5
6
7
x
−2
Solution.
This is New!
∞ n π n π 1
x + bn sin
x ,
an cos
f (x) ∼ a0 +
2
L
L
n=1
where
1
an =
L
and
1
bn =
L
L
−L
n π x dx; n = 0, 1, 2, . . .
f (x) cos
L
L
−L
n π x dx; n = 1, 2, . . .
f (x) sin
L
Notice that f (x) is periodic with period p = 4 and since p = 2L we know that L = 2.
Furthermore, observe that because f (x) is even on the interval [−2, 2] then, f (x) sin( nπ
2 x) is odd
and so it follows that
1
0 = bn =
L
L
−L
n π x dx for all n = 1, 2, . . .
f (x) sin
L
So we don’t need to calculate the bn ’s. Now we calculate only the an ’s as follows:
1
a0 =
L
and so
L
2
f (x) dx =
L
−L
0
L
f (x) dx =
1
1
a0 = (2) = 1
2
2
0
2
(2 − x) dx = 2
and
L
n π n π 1
2 L
an =
f (x) cos
f (x) cos
x dx =
x dx
L −L
2
L 0
L
2
n π x dx
(2 − x) cos
=
2
0
2(2 − x) sin n π x x=2
2
n π 2
4
nπ
=
sin
x dx
− 2 2
−
nπ
n π 0
2
2
x=0
4 = 2 2 1 − cos(n π)
n π
0
if n is even
4 n
= 2 2 (1 − (−1)
=
8
for all n.
n π
(2n−1)2 π 2
Now we can write our Fourier Series as
∞
(2n − 1) π 1
x
an cos
f (x) ∼ a0 +
2
2
= 1+
8
π2
Sm (x) = 1 +
n=1
∞
n=1
(2n − 1) π 1
cos
x .
(2n − 1)2
2
m
(2n − 1) π 1
8 x
cos
π2
(2n − 1)2
2
n=1
1.5
1
y
0.5
-1
x
0
1
The Graph of f (x) together with S5 (x)
Can you see how I discover that
∞
1
π2
=
?
8
(2n − 1)2
n=1
Problem 9.
Find the terms of the power series solution through x5 of the ODE:
y − y + xy = 0; y(0) = 1, y (0) = 2
Solution.
Assume a power series solution y(x) of the form
∞
y(x) =
a n xn .
n=0
Then
y =
∞
n an x
n−1
; y =
n=1
∞
(n − 1) n an xn−2 .
n=2
So
y − y + xy =
∞
(n − 1) n an x
n=2
= 2 a2 − a1 +
∞
−
∞
n an x
n−1
n=1
(n − 1) n an x
n=3
= 2a2 − a1 +
n−2
∞ n−2
−
n=k+2
+
∞
n=2
∞
an xn+1
n=0
n an x
n−1
+
n=k+1
∞
n=0
an xn+1
.
n=k−1
(k + 1)(k + 2)ak+2 − (k + 1)ak+1 + ak−1 xk = 0
k=1
Our recurrence relation is
a2 =
1
(k + 1) ak+1 − ak−1
a1 and ak+2 =
; k ≥ 1.
2
(k + 1)(k + 2)
So our power series solution looks like
y(x) = a0 + a1 x + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · + an xn + · · ·
.
x3
x2
x4
x5
x3
x4
x5
−
−
− · · · + a1 x +
+
−
−
− ···
= a0 1 −
3!
4!
4·5·6
2!
3!
4!
30
Imposing the initial conditions y(0) = 1; y (0) = 2 we get that a0 = 1 and a1 = 2. Hence we
write our power series solution as
x4
x5
x2
x3
x4
x5
x3
−
−
− ··· + 2 x +
+
−
−
− ···
y(x) = 1 −
3!
4!
4·5·6
2!
3!
4!
30
10 (a). Solve the ODE:
2 x2 y + x y − y = 0.
Solution. Method 1: First observe that the equation is a second order Cauchy-Euler (Note
Cauchy Euler is pronounced “Co-shee Oiler” ) equation ax2 y + bxy + cy = 0. Assume a
solution y(x) of the form
y(x) = xr .
Then the indicial equation is: ar 2 + (b − a)r + c = 0.
Since a = 2, b = 1 and c = −1 your indicial equation is
1
2(r − 1)r + r − 1 = (r − 1)(2r + 1) = 0 ⇒ r1 = 1; r2 = − .
2
Therefore the general solution is
1
y(x) = c1 xr1 + c2 xr2 = c1 x + c2 x− 2
Method 2: Converting the Cauchy-Euler equation to an equation with constant coefficients.
First we make a change in the independent variable x as follows
x = et and t = ln(x).
Now we seek expressions for
d2 y
dy
.
and
2
dx
dx
Accordingly, we have
dy
dy dt
1 dy
=
=
dx
dt dx
x dt
and
d2 y
d
=
2
dx
dx
dy
dx
d
=
dx
dy dt
dt dx
d2 t dy
+
=
dx2 dt
dt
dx
2
1 d2 y
d2 y
1 dy
+
=
−
.
dt2
x2 dt
x2 dt2
Finally, we have that
1 dy
1 d2 y
d2 y
dy
1 dy
2
+ cy = ax
+ bx
+ cy
+ bx
− 2
ax
dx2
dx
x2 dt2
x dt
x dt
d2 y
dy
= a 2 + (b − a)
+ cy = 0.
dt
dt
2
Since a = 2, b = 1 and c = −1 our Cauchy-Euler equation becomes P (D)y = 0 where
P (D) = 2D2 − D − 1 = (2D + 1)(D − 1). Note the immediate sameness between the
coefficients of indicial equation and the coefficients of the Linear differential operator P (D). In
particular, it says that once you know the indicial equation, then transforming the Cauchy-Euler
equation to an equation with constant coefficients and new independent variable is a very easy
step! Now let’s solve P (D)y = 0 to get the general solution
y(t) = C1 e−1/2t + C2 et .
Since t = ln(x) and et = x we see that C1 e−1/2 t + C2 et = C1 x−1/2 + C2 x which should agree
the the solution we obtained earlier in Method 1. (b)
A mass weighing two pounds stretches a spring 6 inches ( 12 ft). The mass is pulled down 3
inches ( 14 ft) and is given an upward velocity of 1 ft/sec. Find u(t), the displacement of the
mass in feet from its equilibrium position at time t seconds after release. Assume that the
acceleration due to gravity is 32 ft/sec2 and that air resistance is negligible.
Recall: m u + γ u + κ u = F (t). In our case (simple harmonic motion), i.e.,
2
1
= 16
, γ = 0 (no damping) and
all forces is due to the spring and mass only), m = 32
2
κ = 1 = 4, F (t) = 0 (no external force). Accordingly, we must solve the initial-value problem:
Solution.
2
1 1
u + 4 u = 0; u(0) = , u (0) = −1,
16
4
which has a general solution
u(t) = C1 cos(8 t) + C2 sin(8 t).
Imposing the initial conditions leads to C2 = 14 and C1 = − 18 and so our solution is
√
1
5
1
u(t) = − sin(8 t) + cos(8 t) =
cos(8t + δ), (where δ ≈ 0.4636476094)
8
4
8
Note: Mechanical Vibrations are best handled using the Laplace Transform Method! 11. A 200 gallon Tank is half full of pure water. A salt solution with a concentration 5 lb/gal
is flowing into the tank at a rate of 4 gal/min while the well-stirred mixture is flowing out at the
rate of 2 gal/min.
(a)
Find Q(t), the amount of salt in pounds in the tank at time t minutes.
(b)
Find the concentration of salt in the tank when the tank overflows.
Solution.
(a) Let Q = Q(t) denote the amount of salt (in pounds) in the tank at time t minutes. Then
rate-in = 4 gal/min · 5 lb/gal = 20 lb/min
and
rate-out = 2 gal/min ·
Q
Q
lb/gal =
lb/min.
100 + 2 t
50 + t
Now
Q = rate-in − rate-out = 20 −
Q
.
50 + t
We must now solve the initial value problem:
Q +
1
Q = 20; Q(0) = 0,
50 + t
which has solution
Q(t) =
10 t(100 + t)
.
50 + t
(b) The Tank overflows in t = 25 minutes. Therefore there is
Q(25) =
1250
10(25)(100 + 25)
=
≈ 416.67 lbs of salt in the tank when it overflows.
50 + 25
3
So the concentration is
1250
25
=
lbs/gal
3 · 200
12
Consider the O.D.E (ye2xy + x) dx + bxe2xy dy = 0. Find b so that
the O.D.E is exact and then solve the O.D.E with the value of b.
Miscellaneous Problem 1:
Solution.
First note that the equation is of the form M (x, y) dx + N (x, y) dy = 0 where
M (x, y) = ye2xy
and N (x, y) = bxe2xy .
The given O.D.E is exact only if My (x, y) = Nx (x, y).
My (x, y) = 2xye2xy + e2xy and Nx (x, y) = b(2xye2xy + e2xy ) and so we see that the O.D.E will
by exact only if b = 1. If b = 1, then the O.D.E becomes the exact equation
(ye2xy + x) dx + xe2xy dy = 0.
(0)
There exists a function ϕ(x, y) = k (we must find it!!) such that
ϕx (x, y) = M (x, y) = ye2xy + x.
(1)
and
ϕy (x, y) = N (x, y) = xe2xy .
Integrating (1) with respect to x we obtain
y 2xy
x2
e
+ H(y).
+
ϕ(x, y) =
M (x, y) dx = (ye2xy + x) dx =
2y
2
Thus we see that
1
ϕ(x, y) = (e2xy + x2 ) + H(y).
2
To determine H(y) in (4) we differentiate ϕ(x, y) with respect to y as follows:
1
ϕy (x, y) = (2xe2xy ) + H (y) = xe2xy + H (y) = N (x, y) = xe2xy .
2
This shows that H (y) = 0 and so H(y) = c where c is some constant. Finally, we have
1
ϕ(x, y) = (e2xy + x2 ) + c
2
and so we write an implicit solution to the O.D.E in (0) as
1 2xy
(e
+ x2 ) = k
2
where k = −c is a constant. Miscellaneous Problem 2:
(2)
(3)
(4)
Solve the initial value problem
y + 3y = 0; y(0) = −2 and y (0) = 3
Solution.
This is a homogeneous second order linear equation of the form
(D2 + 3D)y = D(D + 3)y = 0.
From this we can see that the characteristic equation is r(r + 3) = 0 which as roots r1 = 0 and
r2 = −3. Hence the general solution of the O.D.E is
y(t) = c1 + c2 e−3t
where constants c1 and c2 are to be determined. Next, we invoke the initial conditions y(0) = −2
and y (0) = 3. Now
y(0) = c1 + c2 = −2
and
y (0) = −3c2 = 3, from which we get that c2 = −1.
From this, it follows that c1 = −1 also. Thus the solution to the initial value problem is now
y(t) = −1 − e−3t .
Consider the following Boundary Value Problem:
X + λ X = 0
(1)
with boundary conditions X(0) = 0, X(L) = 0 and for real numbers λ and interval I = {x| 0 <
x < L}. We seek non-trivial solutions to this equation.
Solution.
First we consider the two cases, λ = 0 and λ > 0.
Case λ = 0: Then (1) becomes
X = 0.
(2)
X(x) = C1 x + C2 .
(3)
Clearly, the general solution is
Imposing the boundary conditions we obtain that X(0) = C2 = 0 and X(L) = C1 L = 0
implying that C1 = 0 and so we get the trivial solution X(x) = 0. Thus we can only obtain
non-trivial solution to (2) when C1 = 0 and C2 is arbitrary. For the eigenvalue λ0 = 0 we assign
the associated eigenfunction φ0 (x) = 1.
Case λ > 0: We set λ = μ2 . Then (1) becomes
X + μ2 X = 0.
(4)
Recall that the general solution to (3) is
X(x) = A cos(μ x) + B sin(μ x).
(5)
Imposing the boundary conditions X(0) = 0 and X(L) = 0 we get that X(0) = A = 0 and so
X(x) = B sin(μ x).
(6)
Imposing the second boundary condition X(L) = 0 we get that
X(L) = B sin(μ L) = 0.
Now observe that if B = 0 we obtain the trivial solution to (4) because both A = 0 and B = 0.
In order to obtain non-trivial solutions to (4) we must have B = 0 and sin(μ L) = 0. It then
follows that μ L = n π for n = 1, 2, 3, . . . , i.e.,
μn =
nπ
, for n = 1, 2, 3, . . . .
L
Now the real number λ > 0 depends on n is given by
λn = μ2n =
n2 π 2
,
L2
for n = 1, 2, 3, . . .
(7)
For each positive integer n, the positive real number λn assigned to n is called an eigenvalue
and to each eigenvalue we assigned a function
n π x
φn (x) = sin(μn x) = sin
L
called an eigenfunction. Thus, for each positive integer n we have
n π Xn (x) = Bn φn (x) = Bn sin
x
L
as a solution to (1).
2
These Problems Are from Some
Textbook use at BMCC (I was asked
to provide solutions!)
Page 72 Problem 35.
Solve the differential equation
y
x3 +
(1)
dx + ( y 2 + ln(x) ) dy = 0.
x
Solution. Notice that the differential equation is in differential form: M (x, y) dx + N (x, y) dy =
0 where M (x, y) = x3 + xy and N (x, y) = y 2 + ln(x). Furthermore, we see that the given
differential equation is Exact since
1
My (x, y) =
= Nx (x, y).
(2)
x
It follows from (2) that there exists a function ψ such that
y
(3)
ψx (x, y) = M (x, y) = x3 +
x
and
(4)
ψy (x, y) = N (x, y) = y 2 + ln(x).
From (3) it follows that
y
x3 +
dx + h(y); i.e.,
ψ(x, y) =
M (x, y) dx + h(y) =
x
1
ψ(x, y) = x4 + y ln | x | + h(y)
(5)
4
Next, from (4) we get that
1
∂
dx + h (y) = ln | x | + h (y).
My (x, y) dx + h (y) =
ψy (x, y) =
M (x, y) dx + h (y) =
∂y
x
Thus
N (x, y) = ψy (x, y)
implies that
y 2 + ln | x | = ln | x | + h (y)
from which it follows that
h (y) = y 2
and so that
1
(6)
h(y) = y 3 + K.
3
Finally, from (5) and (6) we can write our implicit solution to the differential equation as
1 4
1
x + y ln | x | + y 3 = C
4
3
where y is a function of x on some open interval I. Q.E.D
Page 72 Problem 47.
Solve the differential equation
y = (y )2 .
(1)
Solution.
First, let us say that y and x are the dependent and independent variables in the
equation respectively, i.e., we write (1) as
dy 2
d2 y
=
dx2
dx
Now let us try the substitution u =
equation
dy
dx .
Then (1) becomes the separable first-order differential
du
du
= u2 or 2 = dx.
dx
u
It now follows by integrating on both sides of (2) that
−
dx
1
1
dy
= x + C1 or that −
or dy = −
=
.
u
x + C1
dx
x + C1
From the differential equation in (3) we integrate on both sides as follows:
dx
dy = −
x + C1
and so the general solution to (1) is given as
y(x) = − ln | x + C1 | + C2 .
Q.E.D
(2)
(3)
Page 72 Problem 53.
Solve the differential equation
y = 2 y y .
(1)
Solution.
Let us say that y and x are the dependent and independent variables in the equation
respectively, i.e., we write (1) as the following separable equation
dy dy
d dy = 2y
or d
= 2y dy.
dx dx
dx
dx
(2)
Integrating in both sides of (2) as follows
dy
d
=
2y dy
dx
which gives us the following separable equation
dy
dy
= y 2 + A2 or 2
= dx.
dx
y + A2
Integrating on both sides of (3) as follows
dy
=
A2 + y 2
dx;
which gives us
y
1
arctan
= x + B ⇔ y = A tan A(x + B) .
A
A
Therefore, we write the general solution of (1) as:
y(x) = C1 tan[C1 (x + C2 )].
Q.E.D
(3)
Page 86 Problem 9.
The time rate of change of a rabbit population P is proportional to the square root of P . At time
t = 0 (months) the population numbers 100 rabbits and is increasing at the rate of 20 rabbits
per month. How many rabbits will there be in one year? Set up the differential equation and
then solve.
Solution.
We are told that
√
dP
∝ P and that P0 = 100, P (0) = 20.
dt
Thus we write and solve the following initial-value problem
√
dP
= κ P ; P (0) = 100; where κ is the constant of proportionality.
dt
(1)
Separating the variables we get that
Therefore,
√
1
P − 2 dP = κ dt.
1
(κ t + C1 )2 .
(2)
4
√
Invoking the initial condition P (0) = 100 in (2) we get that 2 100 = 20 = C1 . From (2), we
also see that
κ
P (t) = (κ t + 20)
2
2
P = κ t + C1 or that P =
so that P (0) = 202 κ = 10 κ = 20 and so κ = 2. Now we can write the solution to the
initial-value problem in (1) as
1
P (t) = (2 t + 20)2 .
4
In one year (i.e., in 12 months) there will be
P (12) =
Q.E.D
1
1
(2(12) + 20)2 = (44)2 = 11(44) = 484 rabbits
4
4
Page 106 Problem 1.
The acceleration of a Maserati is proportional to the difference between 250 km/h and the velocity
of this sports car. If the machine can accelerate from rest to 100 km/h in 10 seconds, how long
will it take for the car to accelerate from rest to 200 km/h? Set up the differential equation and
solve.
Solution.
Let v denote the velocity of the sports car at any time t 0 (in hours). Then a(t) =
denotes the acceleration of the car at any time t 0 (in hours). We are told that
dv
dt
dv
∝ (250 − v).
dt
Therefore, we must solve the following differential equation
dv
= κ (250 − v); where κ is the constant of proportionality.
dt
(1)
The general solution to this separable equation is obtained as follows
dv
=
κ dt
−
v − 250
which gives
C
= κ t or that v − 250 = C e−κ t .
v − 250
Now we see that we can write
v(t) = 250 + C e−κ t .
ln
(2)
At rest (time t = 0) we are told that the sports car has speed v(0) = 250 + C = 0 so that
C = − 250 and so we get that
v(t) = 250(1 − e−κ t ).
(3)
We are also told that the sport car accelerates from rest to 100 km/h in 10 seconds (i.e, 10 seconds =
1
360 hours). Therefore, using (3) we find that
1 κ
100 = v
= 250(1 − e− 360 ).
360
(3)
Solving (3) for κ we get that
1 − e− 360 = 0.40 or κ = −360 ln(0.60).
κ
From (2) we have the velocity of the sports car any time (t 0 in hours)
v(t) = 250(1 − e360
ln(0.60) t
)
(in km/h)
Thus to find out how long it takes the sports car to accelerate from rest to 200 km/h is obtained
by solving for t as follows:
200 = 250(1 − e360
Q.E.D
ln(0.60) t
) ⇔ 1 − 0.8 = e360 ln(0.60) t
ln(0.20)
≈ 8.75 × 10−3 hours (or about 31.5 seconds)
⇔ t =
360 ln(0.60)
© Copyright 2026 Paperzz