2023 Class Test Solutions
2023 Class Test Solutions
Inserting y = xn
(n(n − 1) − 2n + 2) xn − n(n − 1) xn−1 = 0
| {z } | {z }
n2 −3n+2⇒n=1,2 n=0,1
[2 marks]
Both terms vanish for n = 1 ⇒ y1 = x. [1 mark]
(c)
m2 − 6m + 8 = 0 ⇒ (m − 2)(m − 4) = 0 ⇒ m = 2, 4.
yCF = C1 e2x + C2 e4x .
[1 mark]
Using the variation of parameters formula
yp = L1 (x)e2x + L2 (x)e4x .
For finding L1 (x) and L2 (x)
1
L′1 = −L′2 e2x = −4xe4x ⇒
Z
1 1
L1 = −(xe − e4x dx) = −xe4x + e4x = e4x ( − x)
4x
4 4
[2 marks]
The general solution is
1
y = C1 e2x + C2 e4x + e4x ( − x)e2x + e2x (2x − 1)e4x .
4
3
y = C1 e2x + C2 e4x + xe6x − e6x .
4
[2 marks]
From Boundary conditions
1 3 1
y(0) = ⇒ C1 + C2 − =
4 4 4
1
y(1) = e6 ⇒ C1 e2 + C2 e4 = 0.
4
1 e2
⇒ C1 = −C2 e2 ⇒ C2 − C2 e2 = 1 ⇒ C2 = ⇒ C 1 = − .
1 − e2 1 − e2
e2 2x 1 3
⇒y=− 2
e + 2
e4x + xe6x − e6x .
1−e 1−e 4
[3 marks]
2
2. (Lecture, homework based question)
∂F d ∂F d ∂F ∂F
(a) EL equation: − ′
=0⇒ ′
= 0 ⇒ ′ = const. [1 mark]
∂y dx ∂y dx ∂y ∂y
(b) F = y ′ + x(4 + x2 )y ′2
C1 − 1 1 1
⇒ 1 + 2x(4 + x2 )y ′ = C1 , y′ = 2
=C [2 marks]
2 x(4 + x ) x(4 + x2 )
1 a b + cx
2
= +
x(4 + x ) x 4 + x2
1 1
1 = ax2 + 4a + bx + cx2 ⇒ b = 0, a = , c = − .
4 4
[2 marks]
Hence Z
C 1 x C C
y(x) = − dx = ln |x| − ln(4 + x2 ) + B
4 x 4 + x2 4 8
C x2
= ln 2 +B
8 x +4
[2 marks]
Boundary conditions: y(−∞) = 0 ⇒ B = 0
y(−2) = ln 2 ⇒ C = −8
x2 + 4
⇒ y(x) = ln .
x2
[3 marks]
2
∂ F
(c) Legendre condition: ′2
= 2x(4 + x2 ) < 0 , x ∈ (−∞, −2).
∂y
The extremum is maximum. [2 marks]
y = xn , n(n − 1) + 6n − 14 = n2 + 5n − 14 = (n + 7)(n − 2) = 0
y = Ax−7 + Bx2 [4 marks]
1 1 2
From boundary coditions A = 0, B = , y(x) = x [2 marks]
2 Z 2
1 9
1 R1 1 9 8 x 1
The value of J[y]: J x2 = 0 (x6 x2 + 14x4 x4 )dx = x dx = |10 = . [1 mark]
2 4 0 2 2 2
This must be a minimum, since only one stationary value was found and J[y] > 0 can
obviously be made arbitrarily large. [1 mark]
3
(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 is because
Z b Z b Z b Z b Z b
Hdx = (F + λG)dx = F dx + λ Gdx = F dx + λC
a a a a a
and thus if F is an extremal then so is H (the other term is a constant). This leads to the
solution of the Euler-Lagrange equation for the functional H
∂H d ∂H
− = 0 with H = F + λG. (2)
∂y dx ∂y ′
After finding a general solution of (2) 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]
(b)
H = F + λG = x3 y ′2 + 8xy 2 + λx3 y.
EL equation
d
(2x3 y ′ ) − 16xy − λx3 = 0
dx
1
x3 y ′′ + 3x2 y ′ − 8xy = λx3
2
1
x2 y ′′ + 3xy ′ − 8y = λx2
2
[3 marks]
m
Euler ODE, y = x
C1
yCF = + C2 x 2
x4
[4 marks]
Natural form for yP I is part of yCF . Try
yP I = Ax2 ln x
4
Boundary conditions
lim y(x) = 0 ⇒ C1 = 0
x→0
y(1) = 1 ⇒ C2 = 1. [2 marks]
Constraints Z 1 Z 1
1 3 λ
= x ydx = (x5 + x5 ln x)dx
3 0 0 12
Z 1 6
1 x6
λ 1 x 1 1 λ
= + ln x|0 − dx = − ⇒ λ = −72 .
6 12 |6 {z } 0 6 x 6 6 · 72
| {z }
=0 1
36
[3 marks]
The extremal is
y(x) = x2 (1 − 6 ln x).
[1 mark]
(c)
∂ 2H
= 2x3 ≥ 0, 0 < x < 1
∂y ′2
suggesting that the stationary point is a minimum. [1 mark]