MATH323 Using the variation of parameters formula
Using the variation of parameters formula
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
MATH323 2020 January Exam Solutions
1. (Lecture, homework based question)
(a) Inserting y = xn, y′ and y′′ into the equation we find n2 − n + 3n + 1 = 0. Solving for n
to obtain n1 = −1. The solution is
y(x) = C1x
−1 + C2x−1 lnx. [4 marks]
(b) Using the variation of parameters formula
yp(x) = L1(x)x
−1 + L2(x)x−1 lnx.
For finding L1(x) and L2(x) we have to solve
L′1
1
x2
+ L′2
lnx
x2
= 0,
−L′1
1
x2
+ L′2
(
1
x2
− lnx
x2
)
= 4
lnx
x2
.
[2 marks]
Adding the two equations
L′2
1
x2
=
4 lnx
x2
⇒ L′2 = 4 ln x.
L2 = 4
∫
lnxdx = 4(x lnx−
∫
dx) = 4(x lnx− x).
From the first equation
L′1 = −
L′2x lnx
x
= −L′2 lnx = −4 ln2 x.
L1 = −4
∫
ln2 xdx = −4
(
x ln2 x−
∫
x
2 lnx
x
dx
)
=
−4
(
x ln2 x− 2x lnx+ 2 ∫ x
x
dx
)
= −4 (x ln2 x− 2x lnx+ 2x) . [2 marks]
Thus the particular solution is
yp = −4
(
x ln2 x− 2x lnx+ 2x) 1
x
+ 4 (x lnx− x) lnx
x
yp = −4
(
ln2 x− 2 lnx+ 2)+ 4 (ln2 x− lnx) =
−4 ln2 x+ 8 lnx− 8 + 4 ln2 x− 4 lnx = 4 (ln x− 2) . [1 mark]
The general solution is y(x) = C1x
−1 + C2x−1 lnx+ 4 (lnx− 2) . [1 mark]
1
Boundary conditions y(1) = 0, y′(2) =
1
4
C1 − 8 = 0⇒ C1 = 8 .
y′ = −C1
x2
+ C2
(
1
x
x− lnx
)
x2
+ 4
1
x
⇒ 1
4
= −C1
4
+ C2
(1− ln 2)
4
+
4
2
,
1
4
= −2 + C21− ln 2
4
+ 2⇒ C2 = 1
1− ln 2
y(x) =
8
x
+
1
(1− ln 2)
lnx
x
+ 4 (lnx− 2) .
[2 marks]
(c) y1 = e
−x2 , y′1 = −2xe−x2 , y′′1 = −2e−x2 + 4x2e−x2 ,
y′′ − 1
x
y′ − 4x2y = e−x2
(
−2 + 4x2 − 1
x
(−2x)− 4x2
)
= 0 [1 mark]
Guess for the second solution: y2(x) = v(x)y1(x) = v(x)e
−x2 .
y′2(x) = v
′(x)e−x
2 − 2xv(x)e−x2
y′′2 = v
′′e−x
2 − 2xv′e−x2 + v
[
−2e−x2 + 4x2e−x2
]
− 2xv′e−x2 = e−x2 [v′′ − 4xv′ − 2v + 4x2v] .
[1 mark]
Substituting y2(x) and its derivatives into the differential equation:
y′′ − 1
x
y′ − 4x2y = e−x2
[
v′′ − 4xv′ − 2v + 4x2v − 1
x
(−2xv + v′)− 4x2v
]
=
= e−x
2
[
v′′ − 4xv′ − 2v + 4x2v + 2v − 1
x
v′ − 4x2v
]
= 0
v′′ − 4xv′ − 1
x
v′ = 0
[2 marks]
The equation is first order for w = v′(t).
w′ −
(
4x+
1
x
)
w = 0,
dw
dx
=
(
4x+
1
x
)
w ⇒ dw
w
=
(
4x+
1
x
)
dx
lnw =
4x2
2
+ lnx⇒ lnw = ln e2x2 + lnx⇒ w = xe2x2 . [2 marks]
v =
∫
xe2x
2
dx =
1
2
∫
e2x
2
dx2 =
1
4
∫
e2x
2
d(2x2) =
1
4
e2x
2
.
y2(t) = v(x)e
−x2 = 1
4
e2x
2
e−x
2
= 1
4
ex
2
. y(t) = C1e
−x2 + C2
1
4
ex
2
. [2 marks]
2
2. (Lecture, homework based question)
Solution. (a) The Euler-Lagrange equation is
∂F
∂y
− d
dx
(
∂F
∂y′
)
= 0.
The fact that a function satisfies the Euler–Lagrange equation and the boundary conditions
confirms that it is a critical function, and does not guarantee that it is the minimizer. The
nature of a critical function will be elucidated by the second derivative test (Legendre condition):
in order for y(x) to lead to a minimum of the functional J [y], the condition
∂ 2F
∂y′2
> 0
needs to be fulfilled for this function at all a ≤ x ≤ b. [3 marks]
(b) For the given functional
J [y(x)] =
∫ 2
1
(x2y′2 + 12y2 + 4yx4)dx
∂F
∂y
= 24y + 4x4,
∂F
∂y′
= 2x2y′
d
dx
(
∂F
∂y′
)
= 2x2y′′ + 4xy′.
The Euler-Lagrange equation is
2x2y′′ + 4xy′ − 24y − 4x4 = 0⇒ x2y′′ + 2xy′ − 12y = 2x4.
For the corresponding homogeneous equation substituting y = xn
x2n(n− 1)xn−2 + 2xnxn−1 − 12xn = 0
n2 − n+ 2n− 12 = 0 ⇒ n2 + n− 12 = 0
⇒ n1 = 3, n2 = −4, yCF = C1x3 + C2x−4
For a particular integral yp = αx
4, y′p = 4αx
3, y′′p = 12αx
2
Substituting into the equation x4(12α + 8α− 12α) = 2x4 ⇒ α = 1
4
, yp =
x4
4
⇒ y = C1x3 + C2x−4 + x
4
4
From BCs y(1) = −4, y(2) = 127 C1 + C2 + 14 = −4
8C1 +
C2
16
+ 4 = 127
⇒ 8C1 + 8C2 + 2 = −32
8C1 +
C2
16
+ 4 = 127
⇒ 8C2−C2
16
−2 = −32−127 = −159 ⇒ 8C2−C2
16
= −157 ⇒ 127C2 = −157×16
C2 = −2512
127
, C1 =
2512
127
− 1
4
− 4. y = C1x3 − 2512
127x4
+
x4
4
. [8 marks]
3
(c)
F = (x2y′2 + 12y2 + 4yx4),
∂F
∂y′
= 2x2y′,
∂2F
∂y′2
= 2x2 > 0, 1 ≤ x ≤ 2
The extremum is minimum. [3 marks]
(d) The solution of the Euler-Lagrange equation in this case is
y = C1x
3 + C2x
−4
From boundary conditions
C1 + C2 = 1
8C1 +
C1
16
= 8
⇒ C1 = 1, C2 = 0⇒ y(x) = x3.
J [x3] =
∫ 2
1
(x2y′2 + 12y2)dx =
∫ 2
1
(x2(3x2)2 + 12(x3)2)dx
=
∫ 2
1
(9x6 + 12x6)dx = 21
x7
7
|21 = 381
[3 marks]
For y(x) = 7x− 6 which satisfies the same boundary conditions y(1) = 1 and y(2) = 8
J [y] =
∫ 2
1
(x2y′2 + 12y2)dx
= 49
∫ 2
1
x2dx+ 12
∫ 2
1
(7x− 6)2dx = 49x
3
3
+
12
7
∫ 2
1
(7x− 6)2d(7x− 6)
=
49
3
(8− 1) + 12
7
(7x− 6)3
3
|21 =
49
3
7 +
12
7
(
(14− 6)3
3
− 1
3
)
= 406.333
This means that y = x3 is a minimizer for J[y]. [3 marks]
4
(Lecture, homework based question)
3. Solution. (a) If F solves the variational problem and G satisfies the constraint equation
then H = F +λG will also satisfy Euler-Lagrange equation for any λ. This leads to the solution
of the Euler-Lagrange equation for the functional H
∂H
∂y
− d
dx
(
∂H
∂y′
)
= 0 with H = F + λG. (1)
After finding a general solution of equation (1) the constants in the solution and the Langrange
multiplier can be determined from the boundary conditions y(a) = y1 and y(b) = y2 and the
constrained equation. [2 marks]